summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Analysis/Dominance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Analysis/Dominance.cpp')
-rw-r--r--mlir/lib/Analysis/Dominance.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/mlir/lib/Analysis/Dominance.cpp b/mlir/lib/Analysis/Dominance.cpp
index b98efa73e54..5cdeebbdf4a 100644
--- a/mlir/lib/Analysis/Dominance.cpp
+++ b/mlir/lib/Analysis/Dominance.cpp
@@ -53,9 +53,9 @@ bool DominanceInfo::properlyDominates(const Block *a, const Block *b) {
if (blockListA == blockListB)
return DominatorTreeBase::properlyDominates(a, b);
- // Otherwise, 'a' properly dominates 'b' if 'b' is defined in an
- // IfInst/ForInst that (recursively) ends up being dominated by 'a'. Walk up
- // the list of containers enclosing B.
+ // Otherwise, 'a' properly dominates 'b' if 'b' is defined in an instruction
+ // region that (recursively) ends up being dominated by 'a'. Walk up the list
+ // of containers enclosing B.
Instruction *bAncestor;
do {
bAncestor = blockListB->getContainingInst();
@@ -106,11 +106,6 @@ bool DominanceInfo::properlyDominates(const Value *a, const Instruction *b) {
if (auto *aInst = a->getDefiningInst())
return properlyDominates(aInst, b);
- // The induction variable of a ForInst properly dominantes its body, so we
- // can just do a simple block dominance check.
- if (auto *forInst = dyn_cast<ForInst>(a))
- return dominates(forInst->getBody(), b->getBlock());
-
// block arguments properly dominate all instructions in their own block, so
// we use a dominates check here, not a properlyDominates check.
return dominates(cast<BlockArgument>(a)->getOwner(), b->getBlock());
OpenPOWER on IntegriCloud