Be more forgiving when calculating alias interference for physreg coalescing.

It is OK for an alias live range to overlap if there is a copy to or from the
physical register. CoalescerPair can work out if the copy is coalescable
independently of the alias.

This means that we can join with the actual destination interval instead of
using the getOrigDstReg() hack. It is no longer necessary to merge clobber
ranges into subregisters.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107695 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen
2010-07-06 20:31:51 +00:00
parent 14152b480d
commit 9c2e7ca351
5 changed files with 62 additions and 116 deletions

View File

@ -165,9 +165,6 @@ namespace llvm {
/// virtual register.
unsigned subIdx_;
/// origDstReg_ - dstReg_ without subreg adjustments.
unsigned origDstReg_;
/// partial_ - True when the original copy was a partial subregister copy.
bool partial_;
@ -192,8 +189,7 @@ namespace llvm {
public:
CoalescerPair(const TargetInstrInfo &tii, const TargetRegisterInfo &tri)
: tii_(tii), tri_(tri), dstReg_(0), srcReg_(0), subIdx_(0),
origDstReg_(0), partial_(false), crossClass_(false), flipped_(false),
newRC_(0) {}
partial_(false), crossClass_(false), flipped_(false), newRC_(0) {}
/// setRegisters - set registers to match the copy instruction MI. Return
/// false if MI is not a coalescable copy instruction.
@ -232,10 +228,6 @@ namespace llvm {
/// coalesced into, or 0.
unsigned getSubIdx() const { return subIdx_; }
/// getOrigDstReg - Return DstReg as it appeared in the original copy
/// instruction before any subreg adjustments.
unsigned getOrigDstReg() const { return isPhys() ? origDstReg_ : dstReg_; }
/// getNewRC - Return the register class of the coalesced register.
const TargetRegisterClass *getNewRC() const { return newRC_; }
};