Extend -new-coalescer SSA update to handle mapped values as well.

The old-fashioned many-to-one value mapping doesn't always work when
merging vector lanes. A value can map to multiple different values, and
it can even be necessary to insert new PHIs.

When a value number is defined by a copy from a value number that
required SSa update, include the live range of the copied value number
in the SSA update as well. It is not necessarily a copy of the original
value number any longer.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164329 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2012-09-20 23:08:39 +00:00
parent d57ae39a88
commit 2df8ac84ae
2 changed files with 62 additions and 9 deletions
-3
View File
@@ -742,9 +742,6 @@ void LiveIntervals::extendToIndices(LiveInterval *LI,
void LiveIntervals::pruneValue(LiveInterval *LI, SlotIndex Kill,
SmallVectorImpl<SlotIndex> *EndPoints) {
LiveRangeQuery LRQ(*LI, Kill);
assert (!LRQ.valueDefined() && "Can't prune value at the defining instr");
// Also can't prune a value that isn't there.
VNInfo *VNI = LRQ.valueOut();
if (!VNI)
return;