Skip to content

Commit c46c70e

Browse files
authored
Merge pull request #4917 from slavapestov/escape-analysis-fix-3.0
Escape analysis fix (3.0)
2 parents a0b6cdd + f7b5d2d commit c46c70e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/SILOptimizer/Analysis/EscapeAnalysis.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,8 +560,10 @@ bool EscapeAnalysis::ConnectionGraph::isReachable(CGNode *From, CGNode *To) {
560560
From->isInWorkList = true;
561561
for (unsigned Idx = 0; Idx < WorkList.size(); ++Idx) {
562562
CGNode *Reachable = WorkList[Idx];
563-
if (Reachable == To)
563+
if (Reachable == To) {
564+
clearWorkListFlags(WorkList);
564565
return true;
566+
}
565567
for (Predecessor Pred : Reachable->Preds) {
566568
CGNode *PredNode = Pred.getPointer();
567569
if (!PredNode->isInWorkList) {

0 commit comments

Comments
 (0)