[PATCH] D78447: [mlir][SCCP] Add support for propagating constants across inter-region control flow
Uday Bondhugula via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 20 11:21:33 PDT 2020
bondhugula requested changes to this revision.
bondhugula added inline comments.
This revision now requires changes to proceed.
================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:357
+ regions.push_back(RegionSuccessor(&thenRegion()));
+ regions.push_back(RegionSuccessor(&elseRegion()));
+ return;
----------------
What if there is no else block here? (empty else region)
================
Comment at: mlir/lib/Dialect/LoopOps/LoopOps.cpp:362
+ // Add the successor regions using the condition.
+ regions.push_back(RegionSuccessor(condition ? &thenRegion() : &elseRegion()));
+}
----------------
Likewise, what if the else region has no blocks?
================
Comment at: mlir/test/Transforms/sccp-structured.mlir:132
+ return %result : i32
+}
----------------
Every loop.if that you have in the test cases has an else. Add one or more without an else block?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78447/new/
https://reviews.llvm.org/D78447
More information about the llvm-commits
mailing list