From c6c534493d625c10ce0046baa9dc6293f8dba405 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Wed, 27 Feb 2019 10:59:29 -0800 Subject: Port all of the existing passes over to the new pass manager infrastructure. This is largely NFC. PiperOrigin-RevId: 235952357 --- mlir/lib/Transforms/LoopTiling.cpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'mlir/lib/Transforms/LoopTiling.cpp') 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 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 { + PassResult runOnFunction() override; constexpr static unsigned kDefaultTileSize = 4; - constexpr static PassID passID = {}; }; } // end anonymous namespace @@ -65,7 +63,7 @@ static llvm::cl::opt /// 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, 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 -- cgit v1.2.3