diff options
| author | River Riddle <riverriddle@google.com> | 2019-03-26 17:05:09 -0700 |
|---|---|---|
| committer | jpienaar <jpienaar@google.com> | 2019-03-29 17:43:37 -0700 |
| commit | f9d91531df58a561a2c6e197dfb7cb796f7e44e3 (patch) | |
| tree | d05d629f447360470856187ac47197695e915af3 /mlir/lib/Transforms/LoopTiling.cpp | |
| parent | d5259edefdc3d02eaf35970689f2c9cb17a0f855 (diff) | |
| download | bcm5719-llvm-f9d91531df58a561a2c6e197dfb7cb796f7e44e3.tar.gz bcm5719-llvm-f9d91531df58a561a2c6e197dfb7cb796f7e44e3.zip | |
Replace usages of Instruction with Operation in the /IR directory.
This is step 2/N to renaming Instruction to Operation.
PiperOrigin-RevId: 240459216
Diffstat (limited to 'mlir/lib/Transforms/LoopTiling.cpp')
| -rw-r--r-- | mlir/lib/Transforms/LoopTiling.cpp | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp index eafa7bca4d4..d9f74808ad8 100644 --- a/mlir/lib/Transforms/LoopTiling.cpp +++ b/mlir/lib/Transforms/LoopTiling.cpp @@ -92,8 +92,7 @@ FunctionPassBase *mlir::createLoopTilingPass(uint64_t cacheSizeBytes) { // location in destination's body. static inline void moveLoopBody(AffineForOp src, AffineForOp dest, Block::iterator loc) { - dest.getBody()->getInstructions().splice(loc, - src.getBody()->getInstructions()); + dest.getBody()->getOperations().splice(loc, src.getBody()->getOperations()); } // Move the loop body of AffineForOp 'src' from 'src' to the start of dest's @@ -114,7 +113,7 @@ constructTiledIndexSetHyperRect(MutableArrayRef<AffineForOp> origLoops, assert(!origLoops.empty()); assert(origLoops.size() == tileSizes.size()); - FuncBuilder b(origLoops[0].getInstruction()); + FuncBuilder b(origLoops[0].getOperation()); unsigned width = origLoops.size(); // Bounds for tile space loops. @@ -181,8 +180,8 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band, // Check if the supplied for inst's are all successively nested. for (unsigned i = 1, e = band.size(); i < e; i++) { - assert(band[i].getInstruction()->getParentInst() == - band[i - 1].getInstruction()); + assert(band[i].getOperation()->getParentInst() == + band[i - 1].getOperation()); } auto origLoops = band; @@ -196,7 +195,7 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band, AffineForOp innermostPointLoop; // The outermost among the loops as we add more.. - auto *topLoop = rootAffineForOp.getInstruction(); + auto *topLoop = rootAffineForOp.getOperation(); // Add intra-tile (or point) loops. for (unsigned i = 0; i < width; i++) { @@ -204,11 +203,11 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band, // Loop bounds will be set later. auto pointLoop = b.create<AffineForOp>(loc, 0, 0); pointLoop.createBody(); - pointLoop.getBody()->getInstructions().splice( - pointLoop.getBody()->begin(), topLoop->getBlock()->getInstructions(), + pointLoop.getBody()->getOperations().splice( + pointLoop.getBody()->begin(), topLoop->getBlock()->getOperations(), topLoop); newLoops[2 * width - 1 - i] = pointLoop; - topLoop = pointLoop.getInstruction(); + topLoop = pointLoop.getOperation(); if (i == 0) innermostPointLoop = pointLoop; } @@ -219,11 +218,11 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band, // Loop bounds will be set later. auto tileSpaceLoop = b.create<AffineForOp>(loc, 0, 0); tileSpaceLoop.createBody(); - tileSpaceLoop.getBody()->getInstructions().splice( - tileSpaceLoop.getBody()->begin(), - topLoop->getBlock()->getInstructions(), topLoop); + tileSpaceLoop.getBody()->getOperations().splice( + tileSpaceLoop.getBody()->begin(), topLoop->getBlock()->getOperations(), + topLoop); newLoops[2 * width - i - 1] = tileSpaceLoop; - topLoop = tileSpaceLoop.getInstruction(); + topLoop = tileSpaceLoop.getOperation(); } // Move the loop body of the original nest to the new one. @@ -265,7 +264,7 @@ static void getTileableBands(Function &f, AffineForOp currInst = root; do { band.push_back(currInst); - } while (currInst.getBody()->getInstructions().size() == 1 && + } while (currInst.getBody()->getOperations().size() == 1 && (currInst = currInst.getBody()->front().dyn_cast<AffineForOp>())); bands->push_back(band); }; |

