summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/LowerVectorTransfers.cpp
diff options
context:
space:
mode:
authorChris Lattner <clattner@google.com>2018-12-23 08:17:48 -0800
committerjpienaar <jpienaar@google.com>2019-03-29 14:35:19 -0700
commit1301f907a10e25e4a05483977a50c8b4f34b2ed4 (patch)
tree5d289f379659c4d458411958cf631e4d22ada678 /mlir/lib/Transforms/LowerVectorTransfers.cpp
parent4eef795a1dbd7eafa9a45303f01c51921729f1f4 (diff)
downloadbcm5719-llvm-1301f907a10e25e4a05483977a50c8b4f34b2ed4.tar.gz
bcm5719-llvm-1301f907a10e25e4a05483977a50c8b4f34b2ed4.zip
Refactor ForStmt: having it contain a StmtBlock instead of subclassing
StmtBlock. This is more consistent with IfStmt and also conceptually makes more sense - a forstmt "isn't" its body, it contains its body. This is step 1/N towards merging BasicBlock and StmtBlock. This is required because in the new regime StmtBlock will have a use list (just like BasicBlock does) of operands, and ForStmt already has a use list for its induction variable. This is a mechanical patch, NFC. PiperOrigin-RevId: 226684158
Diffstat (limited to 'mlir/lib/Transforms/LowerVectorTransfers.cpp')
-rw-r--r--mlir/lib/Transforms/LowerVectorTransfers.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/LowerVectorTransfers.cpp b/mlir/lib/Transforms/LowerVectorTransfers.cpp
index df30a779461..d4069eaa638 100644
--- a/mlir/lib/Transforms/LowerVectorTransfers.cpp
+++ b/mlir/lib/Transforms/LowerVectorTransfers.cpp
@@ -147,7 +147,7 @@ static void rewriteAsLoops(VectorTransferOpTy *transfer,
auto *forStmt = b.createFor(transfer->getLoc(), 0, it.value());
loops.insert(forStmt);
// Setting the insertion point to the innermost loop achieves nesting.
- b.setInsertionPointToStart(loops.back());
+ b.setInsertionPointToStart(loops.back()->getBody());
if (composed == getAffineConstantExpr(0, b.getContext())) {
transfer->emitWarning(
"Redundant copy can be implemented as a vector broadcast");
OpenPOWER on IntegriCloud