When replacing value numbers, make sure to compactify the value # space.

llvm-svn: 29865
This commit is contained in:
Chris Lattner 2006-08-24 23:22:59 +00:00
parent ac40a81253
commit 24d4208c97
1 changed files with 12 additions and 0 deletions

View File

@ -470,6 +470,18 @@ void LiveInterval::MergeValueNumberInto(unsigned V1, unsigned V2) {
}
}
}
// Now that V1 is dead, remove it. If it is the largest value number, just
// nuke it (and any other deleted values neighboring it), otherwise mark it as
// ~1U so it can be nuked later.
if (V1 == NumValues-1) {
do {
InstDefiningValue.pop_back();
--NumValues;
} while (InstDefiningValue.back() == ~1U);
} else {
InstDefiningValue[V1] = ~1U;
}
}