SILOptimizer: fix a stupid bug in StackNesting which can cause a miscompile in functions with unreachable blocks.

rdar://problem/47973577
This commit is contained in:
Erik Eckstein
2019-02-27 10:17:02 -08:00
parent e73127265e
commit e433759e73
5 changed files with 46 additions and 36 deletions

View File

@@ -97,7 +97,7 @@ bool StackNesting::solve() {
bool initVal = false;
for (BlockInfo &BI : BlockInfos) {
BI.AliveStackLocsAtEntry.resize(StackLocs.size(), initVal);
initVal = false;
initVal = true;
}
// First step: do a forward dataflow analysis to get the live stack locations