mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-10 08:40:41 +00:00
constify a method argument.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94612 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
11e679324b
commit
30c6b75ac2
@ -696,12 +696,12 @@ public:
|
||||
|
||||
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
||||
/// the stack frame of the specified index.
|
||||
virtual int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
||||
virtual int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
||||
|
||||
/// getFrameIndexReference - This method should return the base register
|
||||
/// and offset used to reference a frame index location. The offset is
|
||||
/// returned directly, and the base register is returned via FrameReg.
|
||||
virtual int getFrameIndexReference(MachineFunction &MF, int FI,
|
||||
virtual int getFrameIndexReference(const MachineFunction &MF, int FI,
|
||||
unsigned &FrameReg) const {
|
||||
// By default, assume all frame indices are referenced via whatever
|
||||
// getFrameRegister() says. The target can override this if it's doing
|
||||
|
@ -803,10 +803,10 @@ ARMBaseRegisterInfo::getFrameRegister(const MachineFunction &MF) const {
|
||||
}
|
||||
|
||||
int
|
||||
ARMBaseRegisterInfo::getFrameIndexReference(MachineFunction &MF, int FI,
|
||||
ARMBaseRegisterInfo::getFrameIndexReference(const MachineFunction &MF, int FI,
|
||||
unsigned &FrameReg) const {
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
||||
const ARMFunctionInfo *AFI = MF.getInfo<ARMFunctionInfo>();
|
||||
int Offset = MFI->getObjectOffset(FI) + MFI->getStackSize();
|
||||
bool isFixed = MFI->isFixedObjectIndex(FI);
|
||||
|
||||
@ -845,7 +845,8 @@ ARMBaseRegisterInfo::getFrameIndexReference(MachineFunction &MF, int FI,
|
||||
|
||||
|
||||
int
|
||||
ARMBaseRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
ARMBaseRegisterInfo::getFrameIndexOffset(const MachineFunction &MF,
|
||||
int FI) const {
|
||||
unsigned FrameReg;
|
||||
return getFrameIndexReference(MF, FI, FrameReg);
|
||||
}
|
||||
|
@ -107,9 +107,9 @@ public:
|
||||
// Debug information queries.
|
||||
unsigned getRARegister() const;
|
||||
unsigned getFrameRegister(const MachineFunction &MF) const;
|
||||
int getFrameIndexReference(MachineFunction &MF, int FI,
|
||||
int getFrameIndexReference(const MachineFunction &MF, int FI,
|
||||
unsigned &FrameReg) const;
|
||||
int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
||||
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
||||
|
||||
// Exception handling queries.
|
||||
unsigned getEHExceptionRegister() const;
|
||||
|
@ -86,10 +86,11 @@ eliminateCallFramePseudoInstr(MachineFunction &MF, MachineBasicBlock &MBB,
|
||||
MBB.erase(I);
|
||||
}
|
||||
|
||||
int SystemZRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
int SystemZRegisterInfo::getFrameIndexOffset(const MachineFunction &MF,
|
||||
int FI) const {
|
||||
const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
SystemZMachineFunctionInfo *SystemZMFI =
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const SystemZMachineFunctionInfo *SystemZMFI =
|
||||
MF.getInfo<SystemZMachineFunctionInfo>();
|
||||
int Offset = MFI->getObjectOffset(FI) + MFI->getOffsetAdjustment();
|
||||
uint64_t StackSize = MFI->getStackSize();
|
||||
|
@ -49,7 +49,7 @@ struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
|
||||
bool hasReservedCallFrame(MachineFunction &MF) const { return true; }
|
||||
bool hasFP(const MachineFunction &MF) const;
|
||||
|
||||
int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
||||
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
||||
|
||||
void eliminateCallFramePseudoInstr(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
|
@ -86,9 +86,10 @@ BitVector TargetRegisterInfo::getAllocatableSet(const MachineFunction &MF,
|
||||
/// getFrameIndexOffset - Returns the displacement from the frame register to
|
||||
/// the stack frame of the specified index. This is the default implementation
|
||||
/// which is overridden for some targets.
|
||||
int TargetRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
int TargetRegisterInfo::getFrameIndexOffset(const MachineFunction &MF,
|
||||
int FI) const {
|
||||
const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
return MFI->getObjectOffset(FI) + MFI->getStackSize() -
|
||||
TFI.getOffsetOfLocalArea() + MFI->getOffsetAdjustment();
|
||||
}
|
||||
@ -96,7 +97,7 @@ int TargetRegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
/// getInitialFrameState - Returns a list of machine moves that are assumed
|
||||
/// on entry to a function.
|
||||
void
|
||||
TargetRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
|
||||
TargetRegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const{
|
||||
// Default is to do nothing.
|
||||
}
|
||||
|
||||
|
@ -473,9 +473,9 @@ bool X86RegisterInfo::hasReservedSpillSlot(MachineFunction &MF, unsigned Reg,
|
||||
}
|
||||
|
||||
int
|
||||
X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
X86RegisterInfo::getFrameIndexOffset(const MachineFunction &MF, int FI) const {
|
||||
const TargetFrameInfo &TFI = *MF.getTarget().getFrameInfo();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
const MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
int Offset = MFI->getObjectOffset(FI) - TFI.getOffsetOfLocalArea();
|
||||
uint64_t StackSize = MFI->getStackSize();
|
||||
|
||||
@ -498,7 +498,7 @@ X86RegisterInfo::getFrameIndexOffset(MachineFunction &MF, int FI) const {
|
||||
Offset += SlotSize;
|
||||
|
||||
// Skip the RETADDR move area
|
||||
X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
|
||||
const X86MachineFunctionInfo *X86FI = MF.getInfo<X86MachineFunctionInfo>();
|
||||
int TailCallReturnAddrDelta = X86FI->getTCReturnAddrDelta();
|
||||
if (TailCallReturnAddrDelta < 0)
|
||||
Offset -= TailCallReturnAddrDelta;
|
||||
|
@ -156,7 +156,7 @@ public:
|
||||
// Debug information queries.
|
||||
unsigned getRARegister() const;
|
||||
unsigned getFrameRegister(const MachineFunction &MF) const;
|
||||
int getFrameIndexOffset(MachineFunction &MF, int FI) const;
|
||||
int getFrameIndexOffset(const MachineFunction &MF, int FI) const;
|
||||
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
|
||||
|
||||
// Exception handling queries.
|
||||
|
Loading…
x
Reference in New Issue
Block a user