* 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
{
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
}
}];
}