diff options
author | Mogball <jeffniu22@gmail.com> | 2022-03-28 18:09:26 +0000 |
---|---|---|
committer | Mogball <jeffniu22@gmail.com> | 2022-03-28 18:10:04 +0000 |
commit | e51652f9bf2e63497ed1e007c4a8c31c7ec08930 (patch) | |
tree | baac6f3b9f22bb05d89adff1f78ecf2549d44379 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | cfe533da05bc6084fd2d573b6a8f3269a007958b (diff) | |
download | llvm-e51652f9bf2e63497ed1e007c4a8c31c7ec08930.zip llvm-e51652f9bf2e63497ed1e007c4a8c31c7ec08930.tar.gz llvm-e51652f9bf2e63497ed1e007c4a8c31c7ec08930.tar.bz2 |
[mlir] Simplify LoopLikeOpInterface
- Adds default implementations of `isDefinedOutsideOfLoop` and `moveOutOfLoop` since 99% of all implementations of these functions were identical
- `moveOutOfLoop` takes one operation and doesn't return anything anymore. 100% of all implementations of this function would always return `success` and uses would either respond with a pass failure or an `llvm_unreachable`.
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
-rw-r--r-- | mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp index e4e3c16..14761a8 100644 --- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp +++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp @@ -37,8 +37,7 @@ void LoopInvariantCodeMotion::runOnOperation() { // the outer loop, which in turn can be further LICM'ed. getOperation()->walk([&](LoopLikeOpInterface loopLike) { LLVM_DEBUG(loopLike.print(llvm::dbgs() << "\nOriginal loop:\n")); - if (failed(moveLoopInvariantCode(loopLike))) - signalPassFailure(); + moveLoopInvariantCode(loopLike); }); } |