summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LoopUnrollAndJam.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-06-04 19:18:23 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-06-09 16:17:59 -0700
commitf1b848e4701a4cd3fa781c259e3728faff1c31df (patch)
tree5587429894d04d9e78eb0e91b76aea3003c94bd1 /mlir/lib/Transforms/LoopUnrollAndJam.cpp
parentf59f64e838c82399f7b31949e8de75547223f42b (diff)
downloadbcm5719-llvm-f1b848e4701a4cd3fa781c259e3728faff1c31df.tar.gz
bcm5719-llvm-f1b848e4701a4cd3fa781c259e3728faff1c31df.zip
NFC: Rename FuncBuilder to OpBuilder and refactor to take a top level region instead of a function.
PiperOrigin-RevId: 251563898
Diffstat (limited to 'mlir/lib/Transforms/LoopUnrollAndJam.cpp')
-rw-r--r--mlir/lib/Transforms/LoopUnrollAndJam.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/mlir/lib/Transforms/LoopUnrollAndJam.cpp b/mlir/lib/Transforms/LoopUnrollAndJam.cpp
index 731464bd7c1..409eb397df4 100644
--- a/mlir/lib/Transforms/LoopUnrollAndJam.cpp
+++ b/mlir/lib/Transforms/LoopUnrollAndJam.cpp
@@ -185,8 +185,7 @@ LogicalResult mlir::loopUnrollJamByFactor(AffineForOp forOp,
// unrollJamFactor.
if (getLargestDivisorOfTripCount(forOp) % unrollJamFactor != 0) {
// Insert the cleanup loop right after 'forOp'.
- FuncBuilder builder(forInst->getBlock(),
- std::next(Block::iterator(forInst)));
+ OpBuilder builder(forInst->getBlock(), std::next(Block::iterator(forInst)));
auto cleanupAffineForOp = cast<AffineForOp>(builder.clone(*forInst));
// Adjust the lower bound of the cleanup loop; its upper bound is the same
// as the original loop's upper bound.
@@ -212,7 +211,7 @@ LogicalResult mlir::loopUnrollJamByFactor(AffineForOp forOp,
for (auto &subBlock : subBlocks) {
// Builder to insert unroll-jammed bodies. Insert right at the end of
// sub-block.
- FuncBuilder builder(subBlock.first->getBlock(), std::next(subBlock.second));
+ OpBuilder builder(subBlock.first->getBlock(), std::next(subBlock.second));
// Unroll and jam (appends unrollJamFactor-1 additional copies).
for (unsigned i = 1; i < unrollJamFactor; i++) {
OpenPOWER on IntegriCloud