ok, the "ia64 has a boatload of registers" joke stopped being funny today ;)

* fix overallocation of integer (stacked) registers: we can't allocate
  registers for local use if they are required as output registers

this fixes 'toast' in the test suite, and all sorts of larger programs
like bzip2 etc.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21178 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Duraid Madina 2005-04-09 11:53:00 +00:00
parent af4ab1b103
commit e00e5ded51

View File

@ -254,7 +254,12 @@ def GR : RegisterClass<i64, 64,
{
let Methods = [{
iterator allocation_order_end(MachineFunction &MF) const {
return end()-7; // 7 special registers
int numReservedRegs=7; // the 7 special registers r0,r1,r2,r12,r13 etc
// we also can't allocate registers for use as locals if they're
// already required as 'out' registers
numReservedRegs+=MF.getInfo<IA64FunctionInfo>()->outRegsUsed;
return end()-numReservedRegs; // hide registers appropriately
}
}];
}