From f1b848e4701a4cd3fa781c259e3728faff1c31df Mon Sep 17 00:00:00 2001 From: River Riddle Date: Tue, 4 Jun 2019 19:18:23 -0700 Subject: NFC: Rename FuncBuilder to OpBuilder and refactor to take a top level region instead of a function. PiperOrigin-RevId: 251563898 --- mlir/lib/Transforms/LoopUnrollAndJam.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'mlir/lib/Transforms/LoopUnrollAndJam.cpp') 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(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++) { -- cgit v1.2.3