StackNesting: fix a corner case crash related to unreachable blocks

When deallocs are inserted at block boundaries, it's necessary to recompute the data flow.

rdar://problem/55249524
This commit is contained in:
Erik Eckstein
2019-09-12 13:08:15 +02:00
parent 7882a97066
commit 8cdeb45284
3 changed files with 89 additions and 40 deletions

View File

@@ -155,10 +155,13 @@ private:
return bitNumberForAlloc(AllocInst);
}
/// Insert deallocations at block boundaries.
Changes insertDeallocsAtBlockBoundaries();
/// Modifies the SIL to end up with a correct stack nesting.
///
/// Returns the status of what changes were made.
Changes adaptDeallocs();
bool adaptDeallocs();
};
} // end namespace swift