Updates LLVM usage to match
[9dbdaea9a0e6](https://github.com/llvm/llvm-project/commit/9dbdaea9a0e6)

PiperOrigin-RevId: 325354353
This commit is contained in:
A. Unique TensorFlower 2020-08-06 18:41:46 -07:00 committed by Geoffrey Martin-Noble
parent a6978cf4ab
commit e00565b544
2 changed files with 3 additions and 4 deletions

View File

@ -1,2 +1,2 @@
633e3dacf27ea4950b7067803502490597ba96e0 9dbdaea9a0e6f58417b5bd8980e7ea6723fd1783

View File

@ -217,8 +217,7 @@ struct ReshapeMemRefCastOpConverter
SmallVector<Value, 1> sizes; SmallVector<Value, 1> sizes;
UnrankedMemRefDescriptor::computeSizes(rewriter, loc, typeConverter, UnrankedMemRefDescriptor::computeSizes(rewriter, loc, typeConverter,
{target_desc}, sizes); {target_desc}, sizes);
auto void_ptr_type = auto void_ptr_type = LLVM::LLVMType::getInt8PtrTy(rewriter.getContext());
LLVM::LLVMType::getInt8PtrTy(typeConverter.getDialect());
Value ranked_desc_mem = rewriter.create<LLVM::AllocaOp>( Value ranked_desc_mem = rewriter.create<LLVM::AllocaOp>(
loc, void_ptr_type, sizes.front(), llvm::None); loc, void_ptr_type, sizes.front(), llvm::None);
target_desc.setMemRefDescPtr(rewriter, loc, ranked_desc_mem); target_desc.setMemRefDescPtr(rewriter, loc, ranked_desc_mem);
@ -282,7 +281,7 @@ struct ReshapeMemRefCastOpConverter
auto index_arg = cond_block->addArgument(typeConverter.getIndexType()); auto index_arg = cond_block->addArgument(typeConverter.getIndexType());
auto stride_arg = cond_block->addArgument(typeConverter.getIndexType()); auto stride_arg = cond_block->addArgument(typeConverter.getIndexType());
auto pred = rewriter.create<LLVM::ICmpOp>( auto pred = rewriter.create<LLVM::ICmpOp>(
loc, LLVM::LLVMType::getInt1Ty(typeConverter.getDialect()), loc, LLVM::LLVMType::getInt1Ty(rewriter.getContext()),
LLVM::ICmpPredicate::sge, index_arg, zero_index); LLVM::ICmpPredicate::sge, index_arg, zero_index);
Block *body_block = Block *body_block =