diff options
author | River Riddle <riverriddle@google.com> | 2019-08-29 13:04:22 -0700 |
---|---|---|
committer | A. Unique TensorFlower <gardener@tensorflow.org> | 2019-08-29 13:04:50 -0700 |
commit | 4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e (patch) | |
tree | 36d7709307e4319b8fe5fccb104ac7a9e6880603 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | a085700311cec4644381d71c6afeee021a7e8e25 (diff) | |
download | llvm-4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e.zip llvm-4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e.tar.gz llvm-4bfae66d70aea0df4bf9948e51f4bfa8895a4f4e.tar.bz2 |
Refactor the 'walk' methods for operations.
This change refactors and cleans up the implementation of the operation walk methods. After this refactoring is that the explicit template parameter for the operation type is no longer needed for the explicit op walks. For example:
op->walk<AffineForOp>([](AffineForOp op) { ... });
is now accomplished via:
op->walk([](AffineForOp op) { ... });
PiperOrigin-RevId: 266209552
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index 293e565..be39297 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -240,7 +240,7 @@ void LoopInvariantCodeMotion::runOnFunction() { // Walk through all loops in a function in innermost-loop-first order. This // way, we first LICM from the inner loop, and place the ops in // the outer loop, which in turn can be further LICM'ed. - getFunction().walk<AffineForOp>([&](AffineForOp op) { + getFunction().walk([&](AffineForOp op) { LLVM_DEBUG(op.getOperation()->print(llvm::dbgs() << "\nOriginal loop\n")); runOnAffineForOp(op); }); |