Two coalescer fixes in one.

1. Use the same value# to represent unknown values being merged into sub-registers.
2. When coalescer commute an instruction and the destination is a physical register, update its sub-registers by merging in the extended ranges.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@66610 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2009-03-11 00:03:21 +00:00
parent dd44632498
commit a2e6435e48
4 changed files with 98 additions and 8 deletions

View File

@ -212,6 +212,10 @@ namespace llvm {
return VNI;
}
/// getUnknownValNo - Find a value# for unknown values, if there isn't one
/// create a new one.
VNInfo *getUnknownValNo(BumpPtrAllocator &VNInfoAllocator);
/// addKill - Add a kill instruction index to the specified value
/// number.
static void addKill(VNInfo *VNI, unsigned KillIdx) {
@ -296,6 +300,11 @@ namespace llvm {
void MergeInClobberRanges(const LiveInterval &Clobbers,
BumpPtrAllocator &VNInfoAllocator);
/// MergeInClobberRange - Same as MergeInClobberRanges except it merge in a
/// single LiveRange only.
void MergeInClobberRange(unsigned Start, unsigned End,
BumpPtrAllocator &VNInfoAllocator);
/// MergeValueInAsValue - Merge all of the live ranges of a specific val#
/// in RHS into this live interval as the specified value number.
/// The LiveRanges in RHS are allowed to overlap with LiveRanges in the