diff options
| author | Sean Silva <silvasean@google.com> | 2019-12-18 12:33:02 -0800 |
|---|---|---|
| committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-12-18 12:33:30 -0800 |
| commit | 553f794b6fce497d2950b7fcbfd32707dbedd745 (patch) | |
| tree | 9ccf6ee55a105e5275ce8a019e0c8007d4b32ea0 /mlir/lib/Transforms/Utils | |
| parent | 7b3adda8f4f16cce0d7e4675b559620a7f68e57c (diff) | |
| download | bcm5719-llvm-553f794b6fce497d2950b7fcbfd32707dbedd745.tar.gz bcm5719-llvm-553f794b6fce497d2950b7fcbfd32707dbedd745.zip | |
Add a couple useful LLVM_DEBUG's to the inliner.
This makes it easier to narrow down on ops that are preventing inlining.
PiperOrigin-RevId: 286243868
Diffstat (limited to 'mlir/lib/Transforms/Utils')
| -rw-r--r-- | mlir/lib/Transforms/Utils/InliningUtils.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/Utils/InliningUtils.cpp b/mlir/lib/Transforms/Utils/InliningUtils.cpp index e8e6ae03338..e8466aa3fd6 100644 --- a/mlir/lib/Transforms/Utils/InliningUtils.cpp +++ b/mlir/lib/Transforms/Utils/InliningUtils.cpp @@ -26,6 +26,7 @@ #include "mlir/IR/Function.h" #include "mlir/IR/Operation.h" #include "llvm/ADT/MapVector.h" +#include "llvm/Support/Debug.h" #include "llvm/Support/raw_ostream.h" #define DEBUG_TYPE "inlining" @@ -110,8 +111,13 @@ static bool isLegalToInline(InlinerInterface &interface, Region *src, for (auto &block : *src) { for (auto &op : block) { // Check this operation. - if (!interface.isLegalToInline(&op, insertRegion, valueMapping)) + if (!interface.isLegalToInline(&op, insertRegion, valueMapping)) { + LLVM_DEBUG({ + llvm::dbgs() << "* Illegal to inline because of op: "; + op.dump(); + }); return false; + } // Check any nested regions. if (interface.shouldAnalyzeRecursively(&op) && llvm::any_of(op.getRegions(), [&](Region ®ion) { |

