diff options
| author | River Riddle <riverriddle@google.com> | 2019-02-27 10:59:29 -0800 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 16:47:14 -0700 |
| commit | c6c534493d625c10ce0046baa9dc6293f8dba405 (patch) | |
| tree | 87246fb531049bf478bb4b061217d11b8d7fe254 /mlir/lib/Transforms/LoopTiling.cpp | |
| parent | 6067cdebaa391cb2ab9bda9cd91b26f9ddd95a11 (diff) | |
| download | bcm5719-llvm-c6c534493d625c10ce0046baa9dc6293f8dba405.tar.gz bcm5719-llvm-c6c534493d625c10ce0046baa9dc6293f8dba405.zip | |
Port all of the existing passes over to the new pass manager infrastructure. This is largely NFC.
PiperOrigin-RevId: 235952357
Diffstat (limited to 'mlir/lib/Transforms/LoopTiling.cpp')
| -rw-r--r-- | mlir/lib/Transforms/LoopTiling.cpp | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp index 240b2b6d9b6..db0e8d51ad8 100644 --- a/mlir/lib/Transforms/LoopTiling.cpp +++ b/mlir/lib/Transforms/LoopTiling.cpp @@ -47,12 +47,10 @@ static llvm::cl::list<unsigned> clTileSizes( namespace { /// A pass to perform loop tiling on all suitable loop nests of a Function. -struct LoopTiling : public FunctionPass { - LoopTiling() : FunctionPass(&LoopTiling::passID) {} - PassResult runOnFunction(Function *f) override; +struct LoopTiling : public FunctionPass<LoopTiling> { + PassResult runOnFunction() override; constexpr static unsigned kDefaultTileSize = 4; - constexpr static PassID passID = {}; }; } // end anonymous namespace @@ -65,7 +63,7 @@ static llvm::cl::opt<unsigned> /// Creates a pass to perform loop tiling on all suitable loop nests of an /// Function. -FunctionPass *mlir::createLoopTilingPass() { return new LoopTiling(); } +FunctionPassBase *mlir::createLoopTilingPass() { return new LoopTiling(); } // Move the loop body of AffineForOp 'src' from 'src' into the specified // location in destination's body. @@ -255,9 +253,9 @@ getTileableBands(Function *f, getMaximalPerfectLoopNest(forOp); } -PassResult LoopTiling::runOnFunction(Function *f) { +PassResult LoopTiling::runOnFunction() { std::vector<SmallVector<OpPointer<AffineForOp>, 6>> bands; - getTileableBands(f, &bands); + getTileableBands(&getFunction(), &bands); for (auto &band : bands) { // Set up tile sizes; fill missing tile sizes at the end with default tile |

