mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-31 10:34:17 +00:00
Use uint16_t to store registers in callee saved register tables to reduce size of static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151996 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
991271d9c4
commit
015f228861
@ -351,7 +351,7 @@ public:
|
||||
/// order of desired callee-save stack frame offset. The first register is
|
||||
/// closest to the incoming stack pointer if stack grows down, and vice versa.
|
||||
///
|
||||
virtual const unsigned* getCalleeSavedRegs(const MachineFunction *MF = 0)
|
||||
virtual const uint16_t* getCalleeSavedRegs(const MachineFunction *MF = 0)
|
||||
const = 0;
|
||||
|
||||
/// getCallPreservedMask - Return a mask of call-preserved registers for the
|
||||
|
@ -186,7 +186,7 @@ void AggressiveAntiDepBreaker::StartBlock(MachineBasicBlock *BB) {
|
||||
// callee-saved register that is not saved in the prolog.
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
BitVector Pristine = MFI->getPristineRegs(BB);
|
||||
for (const unsigned *I = TRI->getCalleeSavedRegs(&MF); *I; ++I) {
|
||||
for (const uint16_t *I = TRI->getCalleeSavedRegs(&MF); *I; ++I) {
|
||||
unsigned Reg = *I;
|
||||
if (!IsReturnBlock && !Pristine.test(Reg)) continue;
|
||||
for (const unsigned *Alias = TRI->getOverlaps(Reg);
|
||||
|
@ -102,7 +102,7 @@ void CriticalAntiDepBreaker::StartBlock(MachineBasicBlock *BB) {
|
||||
// callee-saved register that is not saved in the prolog.
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
BitVector Pristine = MFI->getPristineRegs(BB);
|
||||
for (const unsigned *I = TRI->getCalleeSavedRegs(&MF); *I; ++I) {
|
||||
for (const uint16_t *I = TRI->getCalleeSavedRegs(&MF); *I; ++I) {
|
||||
unsigned Reg = *I;
|
||||
if (!IsReturnBlock && !Pristine.test(Reg)) continue;
|
||||
Classes[Reg] = reinterpret_cast<TargetRegisterClass *>(-1);
|
||||
|
@ -462,7 +462,7 @@ MachineFrameInfo::getPristineRegs(const MachineBasicBlock *MBB) const {
|
||||
if (!isCalleeSavedInfoValid())
|
||||
return BV;
|
||||
|
||||
for (const unsigned *CSR = TRI->getCalleeSavedRegs(MF); CSR && *CSR; ++CSR)
|
||||
for (const uint16_t *CSR = TRI->getCalleeSavedRegs(MF); CSR && *CSR; ++CSR)
|
||||
BV.set(*CSR);
|
||||
|
||||
// The entry MBB always has all CSRs pristine.
|
||||
|
@ -210,7 +210,7 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
|
||||
MachineFrameInfo *MFI = Fn.getFrameInfo();
|
||||
|
||||
// Get the callee saved register list...
|
||||
const unsigned *CSRegs = RegInfo->getCalleeSavedRegs(&Fn);
|
||||
const uint16_t *CSRegs = RegInfo->getCalleeSavedRegs(&Fn);
|
||||
|
||||
// These are used to keep track the callee-save area. Initialize them.
|
||||
MinCSFrameIndex = INT_MAX;
|
||||
|
@ -43,7 +43,7 @@ void RegisterClassInfo::runOnMachineFunction(const MachineFunction &mf) {
|
||||
}
|
||||
|
||||
// Does this MF have different CSRs?
|
||||
const unsigned *CSR = TRI->getCalleeSavedRegs(MF);
|
||||
const uint16_t *CSR = TRI->getCalleeSavedRegs(MF);
|
||||
if (Update || CSR != CalleeSaved) {
|
||||
// Build a CSRNum map. Every CSR alias gets an entry pointing to the last
|
||||
// overlapping CSR.
|
||||
|
@ -49,7 +49,7 @@ class RegisterClassInfo {
|
||||
|
||||
// Callee saved registers of last MF. Assumed to be valid until the next
|
||||
// runOnFunction() call.
|
||||
const unsigned *CalleeSaved;
|
||||
const uint16_t *CalleeSaved;
|
||||
|
||||
// Map register number to CalleeSaved index + 1;
|
||||
SmallVector<uint8_t, 4> CSRNum;
|
||||
|
@ -95,7 +95,7 @@ void RegScavenger::enterBasicBlock(MachineBasicBlock *mbb) {
|
||||
|
||||
// Create callee-saved registers bitvector.
|
||||
CalleeSavedRegs.resize(NumPhysRegs);
|
||||
const unsigned *CSRegs = TRI->getCalleeSavedRegs(&MF);
|
||||
const uint16_t *CSRegs = TRI->getCalleeSavedRegs(&MF);
|
||||
if (CSRegs != NULL)
|
||||
for (unsigned i = 0; CSRegs[i]; ++i)
|
||||
CalleeSavedRegs.set(CSRegs[i]);
|
||||
|
@ -61,7 +61,7 @@ ARMBaseRegisterInfo::ARMBaseRegisterInfo(const ARMBaseInstrInfo &tii,
|
||||
BasePtr(ARM::R6) {
|
||||
}
|
||||
|
||||
const unsigned*
|
||||
const uint16_t*
|
||||
ARMBaseRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
return (STI.isTargetIOS()) ? CSR_iOS_SaveList : CSR_AAPCS_SaveList;
|
||||
}
|
||||
|
@ -94,7 +94,7 @@ protected:
|
||||
|
||||
public:
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
@ -81,7 +81,7 @@ ARMFrameLowering::canSimplifyCallFramePseudos(const MachineFunction &MF) const {
|
||||
return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects();
|
||||
}
|
||||
|
||||
static bool isCalleeSavedRegister(unsigned Reg, const unsigned *CSRegs) {
|
||||
static bool isCalleeSavedRegister(unsigned Reg, const uint16_t *CSRegs) {
|
||||
for (unsigned i = 0; CSRegs[i]; ++i)
|
||||
if (Reg == CSRegs[i])
|
||||
return true;
|
||||
@ -90,7 +90,7 @@ static bool isCalleeSavedRegister(unsigned Reg, const unsigned *CSRegs) {
|
||||
|
||||
static bool isCSRestore(MachineInstr *MI,
|
||||
const ARMBaseInstrInfo &TII,
|
||||
const unsigned *CSRegs) {
|
||||
const uint16_t *CSRegs) {
|
||||
// Integer spill area is handled with "pop".
|
||||
if (MI->getOpcode() == ARM::LDMIA_RET ||
|
||||
MI->getOpcode() == ARM::t2LDMIA_RET ||
|
||||
@ -359,7 +359,7 @@ void ARMFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
emitSPUpdate(isARM, MBB, MBBI, dl, TII, NumBytes);
|
||||
} else {
|
||||
// Unwind MBBI to point to first LDR / VLDRD.
|
||||
const unsigned *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
const uint16_t *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
if (MBBI != MBB.begin()) {
|
||||
do
|
||||
--MBBI;
|
||||
@ -1244,7 +1244,7 @@ ARMFrameLowering::processFunctionBeforeCalleeSavedScan(MachineFunction &MF,
|
||||
|
||||
// Don't spill FP if the frame can be eliminated. This is determined
|
||||
// by scanning the callee-save registers to see if any is used.
|
||||
const unsigned *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
const uint16_t *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
for (unsigned i = 0; CSRegs[i]; ++i) {
|
||||
unsigned Reg = CSRegs[i];
|
||||
bool Spilled = false;
|
||||
|
@ -6071,7 +6071,7 @@ EmitSjLjDispatchBlock(MachineInstr *MI, MachineBasicBlock *MBB) const {
|
||||
// N.B. the order the invoke BBs are processed in doesn't matter here.
|
||||
const ARMBaseInstrInfo *AII = static_cast<const ARMBaseInstrInfo*>(TII);
|
||||
const ARMBaseRegisterInfo &RI = AII->getRegisterInfo();
|
||||
const unsigned *SavedRegs = RI.getCalleeSavedRegs(MF);
|
||||
const uint16_t *SavedRegs = RI.getCalleeSavedRegs(MF);
|
||||
SmallVector<MachineBasicBlock*, 64> MBBLPads;
|
||||
for (SmallPtrSet<MachineBasicBlock*, 64>::iterator
|
||||
I = InvokeBBs.begin(), E = InvokeBBs.end(); I != E; ++I) {
|
||||
|
@ -175,14 +175,14 @@ void Thumb1FrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
AFI->setShouldRestoreSPFromFP(true);
|
||||
}
|
||||
|
||||
static bool isCalleeSavedRegister(unsigned Reg, const unsigned *CSRegs) {
|
||||
static bool isCalleeSavedRegister(unsigned Reg, const uint16_t *CSRegs) {
|
||||
for (unsigned i = 0; CSRegs[i]; ++i)
|
||||
if (Reg == CSRegs[i])
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static bool isCSRestore(MachineInstr *MI, const unsigned *CSRegs) {
|
||||
static bool isCSRestore(MachineInstr *MI, const uint16_t *CSRegs) {
|
||||
if (MI->getOpcode() == ARM::tLDRspi &&
|
||||
MI->getOperand(1).isFI() &&
|
||||
isCalleeSavedRegister(MI->getOperand(0).getReg(), CSRegs))
|
||||
@ -214,7 +214,7 @@ void Thumb1FrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
|
||||
unsigned VARegSaveSize = AFI->getVarArgsRegSaveSize();
|
||||
int NumBytes = (int)MFI->getStackSize();
|
||||
const unsigned *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
const uint16_t *CSRegs = RegInfo->getCalleeSavedRegs();
|
||||
unsigned FramePtr = RegInfo->getFrameRegister(MF);
|
||||
|
||||
if (!AFI->hasStackFrame()) {
|
||||
|
@ -197,11 +197,11 @@ SPURegisterInfo::getPointerRegClass(unsigned Kind) const {
|
||||
return &SPU::R32CRegClass;
|
||||
}
|
||||
|
||||
const unsigned *
|
||||
const uint16_t *
|
||||
SPURegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const
|
||||
{
|
||||
// Cell ABI calling convention
|
||||
static const unsigned SPU_CalleeSaveRegs[] = {
|
||||
static const uint16_t SPU_CalleeSaveRegs[] = {
|
||||
SPU::R80, SPU::R81, SPU::R82, SPU::R83,
|
||||
SPU::R84, SPU::R85, SPU::R86, SPU::R87,
|
||||
SPU::R88, SPU::R89, SPU::R90, SPU::R91,
|
||||
|
@ -57,7 +57,7 @@ namespace llvm {
|
||||
}
|
||||
|
||||
//! Return the array of callee-saved registers
|
||||
virtual const unsigned* getCalleeSavedRegs(const MachineFunction *MF) const;
|
||||
virtual const uint16_t* getCalleeSavedRegs(const MachineFunction *MF) const;
|
||||
|
||||
//! Allow for scavenging, so we can get scratch registers when needed.
|
||||
virtual bool requiresRegisterScavenging(const MachineFunction &MF) const
|
||||
|
@ -44,13 +44,13 @@ HexagonRegisterInfo::HexagonRegisterInfo(HexagonSubtarget &st,
|
||||
TII(tii) {
|
||||
}
|
||||
|
||||
const unsigned* HexagonRegisterInfo::getCalleeSavedRegs(const MachineFunction
|
||||
const uint16_t* HexagonRegisterInfo::getCalleeSavedRegs(const MachineFunction
|
||||
*MF)
|
||||
const {
|
||||
static const unsigned CalleeSavedRegsV2[] = {
|
||||
Hexagon::R24, Hexagon::R25, Hexagon::R26, Hexagon::R27, 0
|
||||
static const uint16_t CalleeSavedRegsV2[] = {
|
||||
Hexagon::R24, Hexagon::R25, Hexagon::R26, Hexagon::R27, 0
|
||||
};
|
||||
static const unsigned CalleeSavedRegsV3[] = {
|
||||
static const uint16_t CalleeSavedRegsV3[] = {
|
||||
Hexagon::R16, Hexagon::R17, Hexagon::R18, Hexagon::R19,
|
||||
Hexagon::R20, Hexagon::R21, Hexagon::R22, Hexagon::R23,
|
||||
Hexagon::R24, Hexagon::R25, Hexagon::R26, Hexagon::R27, 0
|
||||
|
@ -48,7 +48,7 @@ struct HexagonRegisterInfo : public HexagonGenRegisterInfo {
|
||||
HexagonRegisterInfo(HexagonSubtarget &st, const HexagonInstrInfo &tii);
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
|
||||
const TargetRegisterClass* const* getCalleeSavedRegClasses(
|
||||
const MachineFunction *MF = 0) const;
|
||||
|
@ -54,10 +54,10 @@ unsigned MBlazeRegisterInfo::getPICCallReg() {
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// MBlaze Callee Saved Registers
|
||||
const unsigned* MBlazeRegisterInfo::
|
||||
const uint16_t* MBlazeRegisterInfo::
|
||||
getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
// MBlaze callee-save register range is R20 - R31
|
||||
static const unsigned CalleeSavedRegs[] = {
|
||||
static const uint16_t CalleeSavedRegs[] = {
|
||||
MBlaze::R20, MBlaze::R21, MBlaze::R22, MBlaze::R23,
|
||||
MBlaze::R24, MBlaze::R25, MBlaze::R26, MBlaze::R27,
|
||||
MBlaze::R28, MBlaze::R29, MBlaze::R30, MBlaze::R31,
|
||||
|
@ -46,7 +46,7 @@ struct MBlazeRegisterInfo : public MBlazeGenRegisterInfo {
|
||||
static unsigned getPICCallReg();
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
|
@ -38,27 +38,27 @@ MSP430RegisterInfo::MSP430RegisterInfo(MSP430TargetMachine &tm,
|
||||
StackAlign = TM.getFrameLowering()->getStackAlignment();
|
||||
}
|
||||
|
||||
const unsigned*
|
||||
const uint16_t*
|
||||
MSP430RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
const TargetFrameLowering *TFI = MF->getTarget().getFrameLowering();
|
||||
const Function* F = MF->getFunction();
|
||||
static const unsigned CalleeSavedRegs[] = {
|
||||
static const uint16_t CalleeSavedRegs[] = {
|
||||
MSP430::FPW, MSP430::R5W, MSP430::R6W, MSP430::R7W,
|
||||
MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
|
||||
0
|
||||
};
|
||||
static const unsigned CalleeSavedRegsFP[] = {
|
||||
static const uint16_t CalleeSavedRegsFP[] = {
|
||||
MSP430::R5W, MSP430::R6W, MSP430::R7W,
|
||||
MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
|
||||
0
|
||||
};
|
||||
static const unsigned CalleeSavedRegsIntr[] = {
|
||||
static const uint16_t CalleeSavedRegsIntr[] = {
|
||||
MSP430::FPW, MSP430::R5W, MSP430::R6W, MSP430::R7W,
|
||||
MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
|
||||
MSP430::R12W, MSP430::R13W, MSP430::R14W, MSP430::R15W,
|
||||
0
|
||||
};
|
||||
static const unsigned CalleeSavedRegsIntrFP[] = {
|
||||
static const uint16_t CalleeSavedRegsIntrFP[] = {
|
||||
MSP430::R5W, MSP430::R6W, MSP430::R7W,
|
||||
MSP430::R8W, MSP430::R9W, MSP430::R10W, MSP430::R11W,
|
||||
MSP430::R12W, MSP430::R13W, MSP430::R14W, MSP430::R15W,
|
||||
|
@ -36,7 +36,7 @@ public:
|
||||
MSP430RegisterInfo(MSP430TargetMachine &tm, const TargetInstrInfo &tii);
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
|
||||
|
@ -53,7 +53,7 @@ unsigned MipsRegisterInfo::getPICCallReg() { return Mips::T9; }
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
/// Mips Callee Saved Registers
|
||||
const unsigned* MipsRegisterInfo::
|
||||
const uint16_t* MipsRegisterInfo::
|
||||
getCalleeSavedRegs(const MachineFunction *MF) const
|
||||
{
|
||||
if (Subtarget.isSingleFloat())
|
||||
|
@ -42,7 +42,7 @@ struct MipsRegisterInfo : public MipsGenRegisterInfo {
|
||||
void adjustMipsStackFrame(MachineFunction &MF) const;
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
@ -32,9 +32,9 @@ public:
|
||||
PTXRegisterInfo(PTXTargetMachine &TM,
|
||||
const TargetInstrInfo &tii);
|
||||
|
||||
virtual const unsigned
|
||||
virtual const uint16_t
|
||||
*getCalleeSavedRegs(const MachineFunction *MF = 0) const {
|
||||
static const unsigned CalleeSavedRegs[] = { 0 };
|
||||
static const uint16_t CalleeSavedRegs[] = { 0 };
|
||||
return CalleeSavedRegs; // save nothing
|
||||
}
|
||||
|
||||
|
@ -98,10 +98,10 @@ PPCRegisterInfo::getPointerRegClass(unsigned Kind) const {
|
||||
return &PPC::GPRCRegClass;
|
||||
}
|
||||
|
||||
const unsigned*
|
||||
const uint16_t*
|
||||
PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
// 32-bit Darwin calling convention.
|
||||
static const unsigned Darwin32_CalleeSavedRegs[] = {
|
||||
static const uint16_t Darwin32_CalleeSavedRegs[] = {
|
||||
PPC::R13, PPC::R14, PPC::R15,
|
||||
PPC::R16, PPC::R17, PPC::R18, PPC::R19,
|
||||
PPC::R20, PPC::R21, PPC::R22, PPC::R23,
|
||||
@ -123,7 +123,7 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
};
|
||||
|
||||
// 32-bit SVR4 calling convention.
|
||||
static const unsigned SVR4_CalleeSavedRegs[] = {
|
||||
static const uint16_t SVR4_CalleeSavedRegs[] = {
|
||||
PPC::R14, PPC::R15,
|
||||
PPC::R16, PPC::R17, PPC::R18, PPC::R19,
|
||||
PPC::R20, PPC::R21, PPC::R22, PPC::R23,
|
||||
@ -147,7 +147,7 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
0
|
||||
};
|
||||
// 64-bit Darwin calling convention.
|
||||
static const unsigned Darwin64_CalleeSavedRegs[] = {
|
||||
static const uint16_t Darwin64_CalleeSavedRegs[] = {
|
||||
PPC::X14, PPC::X15,
|
||||
PPC::X16, PPC::X17, PPC::X18, PPC::X19,
|
||||
PPC::X20, PPC::X21, PPC::X22, PPC::X23,
|
||||
@ -169,7 +169,7 @@ PPCRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
};
|
||||
|
||||
// 64-bit SVR4 calling convention.
|
||||
static const unsigned SVR4_64_CalleeSavedRegs[] = {
|
||||
static const uint16_t SVR4_64_CalleeSavedRegs[] = {
|
||||
PPC::X14, PPC::X15,
|
||||
PPC::X16, PPC::X17, PPC::X18, PPC::X19,
|
||||
PPC::X20, PPC::X21, PPC::X22, PPC::X23,
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
MachineFunction &MF) const;
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
|
@ -33,9 +33,9 @@ SparcRegisterInfo::SparcRegisterInfo(SparcSubtarget &st,
|
||||
: SparcGenRegisterInfo(SP::I7), Subtarget(st), TII(tii) {
|
||||
}
|
||||
|
||||
const unsigned* SparcRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
|
||||
const uint16_t* SparcRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
|
||||
const {
|
||||
static const unsigned CalleeSavedRegs[] = { 0 };
|
||||
static const uint16_t CalleeSavedRegs[] = { 0 };
|
||||
return CalleeSavedRegs;
|
||||
}
|
||||
|
||||
|
@ -32,7 +32,7 @@ struct SparcRegisterInfo : public SparcGenRegisterInfo {
|
||||
SparcRegisterInfo(SparcSubtarget &st, const TargetInstrInfo &tii);
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
|
@ -226,7 +226,7 @@ X86RegisterInfo::getRegPressureLimit(const TargetRegisterClass *RC,
|
||||
}
|
||||
}
|
||||
|
||||
const unsigned *
|
||||
const uint16_t *
|
||||
X86RegisterInfo::getCalleeSavedRegs(const MachineFunction *MF) const {
|
||||
bool callsEHReturn = false;
|
||||
bool ghcCall = false;
|
||||
|
@ -95,7 +95,7 @@ public:
|
||||
|
||||
/// getCalleeSavedRegs - Return a null-terminated list of all of the
|
||||
/// callee-save registers on this target.
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction* MF = 0) const;
|
||||
const uint32_t *getCallPreservedMask(CallingConv::ID) const;
|
||||
|
||||
/// getReservedRegs - Returns a bitset indexed by physical register number
|
||||
|
@ -73,9 +73,9 @@ bool XCoreRegisterInfo::needsFrameMoves(const MachineFunction &MF) {
|
||||
MF.getFunction()->needsUnwindTableEntry();
|
||||
}
|
||||
|
||||
const unsigned* XCoreRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
|
||||
const uint16_t* XCoreRegisterInfo::getCalleeSavedRegs(const MachineFunction *MF)
|
||||
const {
|
||||
static const unsigned CalleeSavedRegs[] = {
|
||||
static const uint16_t CalleeSavedRegs[] = {
|
||||
XCore::R4, XCore::R5, XCore::R6, XCore::R7,
|
||||
XCore::R8, XCore::R9, XCore::R10, XCore::LR,
|
||||
0
|
||||
|
@ -44,7 +44,7 @@ public:
|
||||
|
||||
/// Code Generation virtual methods...
|
||||
|
||||
const unsigned *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
const uint16_t *getCalleeSavedRegs(const MachineFunction *MF = 0) const;
|
||||
|
||||
BitVector getReservedRegs(const MachineFunction &MF) const;
|
||||
|
||||
|
@ -845,7 +845,7 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
|
||||
const unsigned BVWords = (RegisterClasses.size()+31)/32;
|
||||
BitVector BV(RegisterClasses.size());
|
||||
|
||||
OS << " static const unsigned Table[" << RegisterClasses.size()
|
||||
OS << " static const uint32_t Table[" << RegisterClasses.size()
|
||||
<< "][" << SubRegIndices.size() << "][" << BVWords << "] = {\n";
|
||||
for (unsigned rci = 0, rce = RegisterClasses.size(); rci != rce; ++rci) {
|
||||
const CodeGenRegisterClass &RC = *RegisterClasses[rci];
|
||||
@ -912,7 +912,7 @@ RegisterInfoEmitter::runTargetDesc(raw_ostream &OS, CodeGenTarget &Target,
|
||||
assert(Regs && "Cannot expand CalleeSavedRegs instance");
|
||||
|
||||
// Emit the *_SaveList list of callee-saved registers.
|
||||
OS << "static const unsigned " << CSRSet->getName()
|
||||
OS << "static const uint16_t " << CSRSet->getName()
|
||||
<< "_SaveList[] = { ";
|
||||
for (unsigned r = 0, re = Regs->size(); r != re; ++r)
|
||||
OS << getQualifiedName((*Regs)[r]) << ", ";
|
||||
|
Loading…
x
Reference in New Issue
Block a user