summaryrefslogtreecommitdiff
path: root/lib/Target/MSP430/MSP430RegisterInfo.cpp
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2011-06-09 16:56:59 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2011-06-09 16:56:59 +0000
commit2a9d1ca9c244aeac98044a5fc9a081ff3df7b2ff (patch)
tree49d18cc72723705aed0596cb965ecbd9942cff51 /lib/Target/MSP430/MSP430RegisterInfo.cpp
parent6f3661fdcd10a33d225502f8b112dc5b7968ef74 (diff)
downloadllvm-2a9d1ca9c244aeac98044a5fc9a081ff3df7b2ff.tar.gz
llvm-2a9d1ca9c244aeac98044a5fc9a081ff3df7b2ff.tar.bz2
llvm-2a9d1ca9c244aeac98044a5fc9a081ff3df7b2ff.tar.xz
Remove custom allocation order boilerplate that is no longer needed.
The register allocators automatically filter out reserved registers and place the callee saved registers last in the allocation order, so custom methods are no longer necessary just for that. Some targets still use custom allocation orders: ARM/Thumb: The high registers are removed from GPR in thumb mode. The NEON allocation orders prefer to use non-VFP2 registers first. X86: The GR8 classes omit AH-DH in x86-64 mode to avoid REX trouble. SystemZ: Some of the allocation orders are omitting R12 aliases without explanation. I don't understand this target well enough to fix that. It looks like all the boilerplate could be removed by reserving the right registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132781 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/MSP430/MSP430RegisterInfo.cpp')
-rw-r--r--lib/Target/MSP430/MSP430RegisterInfo.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/Target/MSP430/MSP430RegisterInfo.cpp b/lib/Target/MSP430/MSP430RegisterInfo.cpp
index 834c9af263..53f4c2e4a8 100644
--- a/lib/Target/MSP430/MSP430RegisterInfo.cpp
+++ b/lib/Target/MSP430/MSP430RegisterInfo.cpp
@@ -76,7 +76,11 @@ BitVector MSP430RegisterInfo::getReservedRegs(const MachineFunction &MF) const {
BitVector Reserved(getNumRegs());
const TargetFrameLowering *TFI = MF.getTarget().getFrameLowering();
- // Mark 4 special registers as reserved.
+ // Mark 4 special registers with subregisters as reserved.
+ Reserved.set(MSP430::PCB);
+ Reserved.set(MSP430::SPB);
+ Reserved.set(MSP430::SRB);
+ Reserved.set(MSP430::CGB);
Reserved.set(MSP430::PCW);
Reserved.set(MSP430::SPW);
Reserved.set(MSP430::SRW);