summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms/ConvertToCFG.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/ConvertToCFG.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/ConvertToCFG.cpp')
-rw-r--r--mlir/lib/Transforms/ConvertToCFG.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/mlir/lib/Transforms/ConvertToCFG.cpp b/mlir/lib/Transforms/ConvertToCFG.cpp
index 247a264cd5c..0ed803db64d 100644
--- a/mlir/lib/Transforms/ConvertToCFG.cpp
+++ b/mlir/lib/Transforms/ConvertToCFG.cpp
@@ -242,7 +242,7 @@ void FunctionConverter::visitForStmt(ForStmt *forStmt) {
// Walking manually because we need custom logic before and after traversing
// the list of children.
builder.setInsertionPoint(loopBodyFirstBlock);
- visitStmtBlock(forStmt);
+ visitStmtBlock(forStmt->getBody());
// Builder point is currently at the last block of the loop body. Append the
// induction variable stepping to this block and branch back to the exit
OpenPOWER on IntegriCloud