aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/ARM
diff options
context:
space:
mode:
authorJim Grosbach <grosbach@apple.com>2009-09-11 19:49:06 +0000
committerJim Grosbach <grosbach@apple.com>2009-09-11 19:49:06 +0000
commit21f15abfa99b786925bb1b36717b454ac800251b (patch)
tree39bf91100550a6a078f5ac04931dabd1d25071ad /lib/Target/ARM
parent8562bef1079463f9d3027bd6cfb688e99298bede (diff)
downloadexternal_llvm-21f15abfa99b786925bb1b36717b454ac800251b.zip
external_llvm-21f15abfa99b786925bb1b36717b454ac800251b.tar.gz
external_llvm-21f15abfa99b786925bb1b36717b454ac800251b.tar.bz2
Update register class references to use the global constant ARM::*RegisterClass names.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81556 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/ARM')
-rw-r--r--lib/Target/ARM/ARMBaseRegisterInfo.cpp54
-rw-r--r--lib/Target/ARM/ARMLoadStoreOptimizer.cpp2
2 files changed, 30 insertions, 26 deletions
diff --git a/lib/Target/ARM/ARMBaseRegisterInfo.cpp b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
index 1c41073..908819c 100644
--- a/lib/Target/ARM/ARMBaseRegisterInfo.cpp
+++ b/lib/Target/ARM/ARMBaseRegisterInfo.cpp
@@ -164,42 +164,46 @@ ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
const TargetRegisterClass* const *
ARMBaseRegisterInfo::getCalleeSavedRegClasses(const MachineFunction *MF) const {
static const TargetRegisterClass * const CalleeSavedRegClasses[] = {
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass,
0
};
static const TargetRegisterClass * const ThumbCalleeSavedRegClasses[] = {
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::tGPRRegClass,
- &ARM::tGPRRegClass,&ARM::tGPRRegClass,&ARM::tGPRRegClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::tGPRRegisterClass,
+ ARM::tGPRRegisterClass,ARM::tGPRRegisterClass,ARM::tGPRRegisterClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass,
0
};
static const TargetRegisterClass * const DarwinCalleeSavedRegClasses[] = {
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass,
0
};
static const TargetRegisterClass * const DarwinThumbCalleeSavedRegClasses[] ={
- &ARM::GPRRegClass, &ARM::tGPRRegClass, &ARM::tGPRRegClass,
- &ARM::tGPRRegClass, &ARM::tGPRRegClass, &ARM::GPRRegClass,
- &ARM::GPRRegClass, &ARM::GPRRegClass,
+ ARM::GPRRegisterClass, ARM::tGPRRegisterClass, ARM::tGPRRegisterClass,
+ ARM::tGPRRegisterClass, ARM::tGPRRegisterClass, ARM::GPRRegisterClass,
+ ARM::GPRRegisterClass, ARM::GPRRegisterClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
- &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass, &ARM::DPRRegClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass, ARM::DPRRegisterClass,
+ ARM::DPRRegisterClass, ARM::DPRRegisterClass,
0
};
@@ -245,7 +249,7 @@ bool ARMBaseRegisterInfo::isReservedReg(const MachineFunction &MF,
const TargetRegisterClass *
ARMBaseRegisterInfo::getPointerRegClass(unsigned Kind) const {
- return &ARM::GPRRegClass;
+ return ARM::GPRRegisterClass;
}
/// getAllocationOrder - Returns the register allocation order for a specified
@@ -536,7 +540,7 @@ ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
}
}
- if (CSRegClasses[i] == &ARM::GPRRegClass) {
+ if (CSRegClasses[i] == ARM::GPRRegisterClass) {
if (Spilled) {
NumGPRSpills++;
@@ -680,7 +684,7 @@ ARMBaseRegisterInfo::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
}
} else {
// Reserve a slot closest to SP or frame pointer.
- const TargetRegisterClass *RC = &ARM::GPRRegClass;
+ const TargetRegisterClass *RC = ARM::GPRRegisterClass;
RS->setScavengingFrameIndex(MFI->CreateStackObject(RC->getSize(),
RC->getAlignment()));
}
@@ -1068,10 +1072,10 @@ ARMBaseRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator II,
// If the offset we have is too large to fit into the instruction, we need
// to form it with a series of ADDri's. Do this by taking 8-bit chunks
// out of 'Offset'.
- unsigned ScratchReg = findScratchRegister(RS, &ARM::GPRRegClass, AFI);
+ unsigned ScratchReg = findScratchRegister(RS, ARM::GPRRegisterClass, AFI);
if (ScratchReg == 0)
// No register is "free". Scavenge a register.
- ScratchReg = RS->scavengeRegister(&ARM::GPRRegClass, II, SPAdj);
+ ScratchReg = RS->scavengeRegister(ARM::GPRRegisterClass, II, SPAdj);
int PIdx = MI.findFirstPredOperandIdx();
ARMCC::CondCodes Pred = (PIdx == -1)
? ARMCC::AL : (ARMCC::CondCodes)MI.getOperand(PIdx).getImm();
diff --git a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
index d927dd2..f3a47bb 100644
--- a/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
+++ b/lib/Target/ARM/ARMLoadStoreOptimizer.cpp
@@ -942,7 +942,7 @@ bool ARMLoadStoreOpt::LoadStoreMultipleOpti(MachineBasicBlock &MBB) {
// First advance to the instruction just before the start of the chain.
AdvanceRS(MBB, MemOps);
// Find a scratch register.
- unsigned Scratch = RS->FindUnusedReg(&ARM::GPRRegClass);
+ unsigned Scratch = RS->FindUnusedReg(ARM::GPRRegisterClass);
// Process the load / store instructions.
RS->forward(prior(MBBI));