From 3a6580bf75a58c532b80659e577dddcac0bc2add Mon Sep 17 00:00:00 2001 From: Thomas Joerg Date: Thu, 29 Oct 2020 03:01:46 -0700 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@4d11daa659a1 Updates LLVM usage to match [4d11daa659a1](https://github.com/llvm/llvm-project/commit/4d11daa659a1) PiperOrigin-RevId: 339631220 --- build_tools/llvm_version.txt | 2 +- lib/Dialect/mhlo/IR/hlo_ops.cc | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index 9b6f125..4be016e 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -23ed570af1cc165afea1b70a533a4a39d6656501 +4d11daa659a1833a85863ea920174da4d052a8ba diff --git a/lib/Dialect/mhlo/IR/hlo_ops.cc b/lib/Dialect/mhlo/IR/hlo_ops.cc index fe5198e..edc0ab2 100644 --- a/lib/Dialect/mhlo/IR/hlo_ops.cc +++ b/lib/Dialect/mhlo/IR/hlo_ops.cc @@ -2887,15 +2887,22 @@ namespace mhlo { namespace { struct HLOInlinerInterface : public DialectInlinerInterface { using DialectInlinerInterface::DialectInlinerInterface; + + // Allow all call operations to be inlined. + bool isLegalToInline(Operation* call, Operation* callable, + bool wouldBeCloned) const final { + return true; + } // We don't have any special restrictions on what can be inlined into // destination regions (e.g. while/conditional bodies). Always allow it. - bool isLegalToInline(Region* dest, Region* src, + bool isLegalToInline(Region* dest, Region* src, bool wouldBeCloned, BlockAndValueMapping& valueMapping) const final { return true; } // Operations in mhlo dialect are always legal to inline since they are // pure. - bool isLegalToInline(Operation*, Region*, BlockAndValueMapping&) const final { + bool isLegalToInline(Operation*, Region*, bool, + BlockAndValueMapping&) const final { return true; } };