Teach TargetRegisterInfo how to cram stack slot indexes in with the virtual and

physical register numbers.

This makes the hack used in LiveInterval official, and lets LiveInterval be
oblivious of stack slots.

The isPhysicalRegister() and isVirtualRegister() predicates don't know about
this, so when a variable may contain a stack slot, isStackSlot() should always
be tested first.

llvm-svn: 123128
This commit is contained in:
Jakob Stoklund Olesen
2011-01-09 21:17:37 +00:00
parent 3e06bd90b5
commit b83a6b23dc
9 changed files with 58 additions and 48 deletions

View File

@@ -650,12 +650,7 @@ void LiveRange::dump() const {
}
void LiveInterval::print(raw_ostream &OS, const TargetRegisterInfo *TRI) const {
if (isStackSlot())
OS << "SS#" << getStackSlotIndex();
else
OS << PrintReg(reg, TRI);
OS << ',' << weight;
OS << PrintReg(reg, TRI) << ',' << weight;
if (empty())
OS << " EMPTY";