File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -137,11 +137,12 @@ static bool isReachableImpl(SmallVectorImpl<BasicBlock *> &Worklist,
137
137
const DominatorTree *DT, const LoopInfo *LI) {
138
138
// When a stop block is unreachable, it's dominated from everywhere,
139
139
// regardless of whether there's a path between the two blocks.
140
- SmallPtrSet<const BasicBlock *, 2 > StopBBReachable;
141
140
if (DT) {
142
141
for (auto *BB : StopSet) {
143
- if (DT->isReachableFromEntry (BB))
144
- StopBBReachable.insert (BB);
142
+ if (!DT->isReachableFromEntry (BB)) {
143
+ DT = nullptr ;
144
+ break ;
145
+ }
145
146
}
146
147
}
147
148
@@ -182,7 +183,7 @@ static bool isReachableImpl(SmallVectorImpl<BasicBlock *> &Worklist,
182
183
continue ;
183
184
if (DT) {
184
185
if (llvm::any_of (StopSet, [&](const BasicBlock *StopBB) {
185
- return StopBBReachable. contains (BB) && DT->dominates (BB, StopBB);
186
+ return DT->dominates (BB, StopBB);
186
187
}))
187
188
return true ;
188
189
}
You can’t perform that action at this time.
0 commit comments