summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LoopTiling.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-02-28 14:50:42 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 16:50:44 -0700
commited5fe2098be12d839cb4384e59a93f15f6f42e58 (patch)
treecf8d1cce87c0aff6af00fd90f0f42ff9f44e3212 /mlir/lib/Transforms/LoopTiling.cpp
parent58889884a254894342b589309064782be64c3afd (diff)
downloadbcm5719-llvm-ed5fe2098be12d839cb4384e59a93f15f6f42e58.tar.gz
bcm5719-llvm-ed5fe2098be12d839cb4384e59a93f15f6f42e58.zip
Remove PassResult and have the runOnFunction/runOnModule functions return void instead. To signal a pass failure, passes should now invoke the 'signalPassFailure' method. This provides the equivalent functionality when needed, but isn't an intrusive part of the API like PassResult.
PiperOrigin-RevId: 236202029
Diffstat (limited to 'mlir/lib/Transforms/LoopTiling.cpp')
-rw-r--r--mlir/lib/Transforms/LoopTiling.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp
index db0e8d51ad8..4aebbc2e856 100644
--- a/mlir/lib/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Transforms/LoopTiling.cpp
@@ -48,7 +48,7 @@ namespace {
/// A pass to perform loop tiling on all suitable loop nests of a Function.
struct LoopTiling : public FunctionPass<LoopTiling> {
- PassResult runOnFunction() override;
+ void runOnFunction() override;
constexpr static unsigned kDefaultTileSize = 4;
};
@@ -253,7 +253,7 @@ getTileableBands(Function *f,
getMaximalPerfectLoopNest(forOp);
}
-PassResult LoopTiling::runOnFunction() {
+void LoopTiling::runOnFunction() {
std::vector<SmallVector<OpPointer<AffineForOp>, 6>> bands;
getTileableBands(&getFunction(), &bands);
@@ -265,11 +265,9 @@ PassResult LoopTiling::runOnFunction() {
clTileSizes.begin() + std::min(clTileSizes.size(), band.size()),
tileSizes.begin());
- if (tileCodeGen(band, tileSizes)) {
- return failure();
- }
+ if (tileCodeGen(band, tileSizes))
+ return signalPassFailure();
}
- return success();
}
static PassRegistration<LoopTiling> pass("loop-tile", "Tile loop nests");
OpenPOWER on IntegriCloud