File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
include/swift/SILOptimizer/Analysis Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change @@ -65,6 +65,7 @@ class BackwardReachability {
65
65
SILFunction *function;
66
66
BlockReachability &reachableBlocks;
67
67
BasicBlockWorklist cfgWorklist;
68
+ bool solved = false ;
68
69
69
70
public:
70
71
BackwardReachability (SILFunction *function,
@@ -74,6 +75,7 @@ class BackwardReachability {
74
75
75
76
// Initialize data flow starting points before running solveBackward.
76
77
void initLastUse (SILInstruction *lastUsePoint) {
78
+ assert (!solved && " adding last use after solving!?" );
77
79
auto *lastUseBlock = lastUsePoint->getParent ();
78
80
auto *previous = lastUsePoint->getPreviousInstruction ();
79
81
if (!previous || canReachBlockBegin (previous)) {
@@ -93,6 +95,7 @@ class BackwardReachability {
93
95
pushPreds (block);
94
96
}
95
97
}
98
+ solved = true ;
96
99
}
97
100
98
101
protected:
You can’t perform that action at this time.
0 commit comments