diff options
author | Duraid Madina <duraid@octopus.com.au> | 2005-04-09 11:53:00 +0000 |
---|---|---|
committer | Duraid Madina <duraid@octopus.com.au> | 2005-04-09 11:53:00 +0000 |
commit | e00e5ded511162b2a74bc2092bf2ae1d61a047dd (patch) | |
tree | 2ac659f1bbb31444a47ba7fc2ef82af9fbb6c44c | |
parent | af4ab1b103b1e67d5893f3a53751ee8568d7d486 (diff) |
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
-rw-r--r-- | lib/Target/IA64/IA64RegisterInfo.td | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/Target/IA64/IA64RegisterInfo.td b/lib/Target/IA64/IA64RegisterInfo.td index 148ecb7eb3..8a9032c548 100644 --- a/lib/Target/IA64/IA64RegisterInfo.td +++ b/lib/Target/IA64/IA64RegisterInfo.td @@ -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 } }]; } |