From e00565b5446d58128aad16a08cda52f7f8ec43b8 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 6 Aug 2020 18:41:46 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@9dbdaea9a0e6 Updates LLVM usage to match [9dbdaea9a0e6](https://github.com/llvm/llvm-project/commit/9dbdaea9a0e6) PiperOrigin-RevId: 325354353 --- build_tools/llvm_version.txt | 2 +- lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm.cc | 5 ++--- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index c17dc69..bebd16d 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -633e3dacf27ea4950b7067803502490597ba96e0 +9dbdaea9a0e6f58417b5bd8980e7ea6723fd1783 diff --git a/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm.cc b/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm.cc index af64c44..42b7154 100644 --- a/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm.cc +++ b/lib/Dialect/mhlo/transforms/lhlo_legalize_to_llvm.cc @@ -217,8 +217,7 @@ struct ReshapeMemRefCastOpConverter SmallVector sizes; UnrankedMemRefDescriptor::computeSizes(rewriter, loc, typeConverter, {target_desc}, sizes); - auto void_ptr_type = - LLVM::LLVMType::getInt8PtrTy(typeConverter.getDialect()); + auto void_ptr_type = LLVM::LLVMType::getInt8PtrTy(rewriter.getContext()); Value ranked_desc_mem = rewriter.create( loc, void_ptr_type, sizes.front(), llvm::None); target_desc.setMemRefDescPtr(rewriter, loc, ranked_desc_mem); @@ -282,7 +281,7 @@ struct ReshapeMemRefCastOpConverter auto index_arg = cond_block->addArgument(typeConverter.getIndexType()); auto stride_arg = cond_block->addArgument(typeConverter.getIndexType()); auto pred = rewriter.create( - loc, LLVM::LLVMType::getInt1Ty(typeConverter.getDialect()), + loc, LLVM::LLVMType::getInt1Ty(rewriter.getContext()), LLVM::ICmpPredicate::sge, index_arg, zero_index); Block *body_block =