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 {
6565 SILFunction *function;
6666 BlockReachability &reachableBlocks;
6767 BasicBlockWorklist cfgWorklist;
68+ bool solved = false ;
6869
6970public:
7071 BackwardReachability (SILFunction *function,
@@ -74,6 +75,7 @@ class BackwardReachability {
7475
7576 // Initialize data flow starting points before running solveBackward.
7677 void initLastUse (SILInstruction *lastUsePoint) {
78+ assert (!solved && " adding last use after solving!?" );
7779 auto *lastUseBlock = lastUsePoint->getParent ();
7880 auto *previous = lastUsePoint->getPreviousInstruction ();
7981 if (!previous || canReachBlockBegin (previous)) {
@@ -93,6 +95,7 @@ class BackwardReachability {
9395 pushPreds (block);
9496 }
9597 }
98+ solved = true ;
9699 }
97100
98101protected:
You can’t perform that action at this time.
0 commit comments