summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LoopTiling.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@google.com>2019-03-25 18:02:49 -0700
committerjpienaar <jpienaar@google.com>2019-03-29 17:40:44 -0700
commit46ade282c8d98558d0d1b8e79d2eee3ae00086f1 (patch)
tree4ad14d05ba9f7458b815b790fef6e239ac82ddc1 /mlir/lib/Transforms/LoopTiling.cpp
parent5f3b914a6e26eb1ceefe6772579d110ac692e6b9 (diff)
downloadbcm5719-llvm-46ade282c8d98558d0d1b8e79d2eee3ae00086f1.tar.gz
bcm5719-llvm-46ade282c8d98558d0d1b8e79d2eee3ae00086f1.zip
Make FunctionPass::getFunction() return a reference to the function, instead of
a pointer. This makes it consistent with all the other methods in FunctionPass, as well as with ModulePass::getModule(). NFC. PiperOrigin-RevId: 240257910
Diffstat (limited to 'mlir/lib/Transforms/LoopTiling.cpp')
-rw-r--r--mlir/lib/Transforms/LoopTiling.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp
index 2dbdf689f02..eafa7bca4d4 100644
--- a/mlir/lib/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Transforms/LoopTiling.cpp
@@ -256,7 +256,7 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band,
// Identify valid and profitable bands of loops to tile. This is currently just
// a temporary placeholder to test the mechanics of tiled code generation.
// Returns all maximal outermost perfect loop nests to tile.
-static void getTileableBands(Function *f,
+static void getTileableBands(Function &f,
std::vector<SmallVector<AffineForOp, 6>> *bands) {
// Get maximal perfect nest of 'affine.for' insts starting from root
// (inclusive).
@@ -270,7 +270,7 @@ static void getTileableBands(Function *f,
bands->push_back(band);
};
- for (auto &block : *f)
+ for (auto &block : f)
for (auto &inst : block)
if (auto forOp = inst.dyn_cast<AffineForOp>())
getMaximalPerfectLoopNest(forOp);
OpenPOWER on IntegriCloud