summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorDuraid Madina <duraid@octopus.com.au>2005-04-09 11:53:00 +0000
committerDuraid Madina <duraid@octopus.com.au>2005-04-09 11:53:00 +0000
commit46aa06cfedeb953d32ef8530c080f8dd44b24f01 (patch)
tree866e22e45d9db3ffe51fb35f1d98e8c96b7281aa /llvm/lib
parent2f6412231901bd725128cfe228b6603661b0af5e (diff)
downloadbcm5719-llvm-46aa06cfedeb953d32ef8530c080f8dd44b24f01.tar.gz
bcm5719-llvm-46aa06cfedeb953d32ef8530c080f8dd44b24f01.zip
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. llvm-svn: 21178
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/IA64/IA64RegisterInfo.td7
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/Target/IA64/IA64RegisterInfo.td b/llvm/lib/Target/IA64/IA64RegisterInfo.td
index 148ecb7eb3e..8a9032c548e 100644
--- a/llvm/lib/Target/IA64/IA64RegisterInfo.td
+++ b/llvm/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
}
}];
}
OpenPOWER on IntegriCloud