1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 04:02:41 +01:00

Constify some arguments.

llvm-svn: 108812
This commit is contained in:
Eric Christopher 2010-07-20 06:52:21 +00:00
parent 3280e3aebf
commit ff47f8d94f
10 changed files with 17 additions and 17 deletions

View File

@ -603,7 +603,7 @@ public:
/// immediately on entry to the current function. This eliminates the need for /// immediately on entry to the current function. This eliminates the need for
/// add/sub sp brackets around call sites. Returns true if the call frame is /// add/sub sp brackets around call sites. Returns true if the call frame is
/// included as part of the stack frame. /// included as part of the stack frame.
virtual bool hasReservedCallFrame(MachineFunction &MF) const { virtual bool hasReservedCallFrame(const MachineFunction &MF) const {
return !hasFP(MF); return !hasFP(MF);
} }
@ -614,7 +614,7 @@ public:
/// if the function has a reserved call frame or a frame pointer. Some /// if the function has a reserved call frame or a frame pointer. Some
/// targets (Thumb2, for example) may have more complicated criteria, /// targets (Thumb2, for example) may have more complicated criteria,
/// however, and can override this behavior. /// however, and can override this behavior.
virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const { virtual bool canSimplifyCallFramePseudos(const MachineFunction &MF) const {
return hasReservedCallFrame(MF) || hasFP(MF); return hasReservedCallFrame(MF) || hasFP(MF);
} }
@ -624,7 +624,7 @@ public:
/// reserved as its spill slot. This tells PEI not to create a new stack frame /// reserved as its spill slot. This tells PEI not to create a new stack frame
/// object for the given register. It should be called only after /// object for the given register. It should be called only after
/// processFunctionBeforeCalleeSavedScan(). /// processFunctionBeforeCalleeSavedScan().
virtual bool hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, virtual bool hasReservedSpillSlot(const MachineFunction &MF, unsigned Reg,
int &FrameIdx) const { int &FrameIdx) const {
return false; return false;
} }

View File

@ -1239,7 +1239,7 @@ requiresFrameIndexScavenging(const MachineFunction &MF) const {
// add/sub sp brackets around call sites. Returns true if the call frame is // add/sub sp brackets around call sites. Returns true if the call frame is
// included as part of the stack frame. // included as part of the stack frame.
bool ARMBaseRegisterInfo:: bool ARMBaseRegisterInfo::
hasReservedCallFrame(MachineFunction &MF) const { hasReservedCallFrame(const MachineFunction &MF) const {
const MachineFrameInfo *FFI = MF.getFrameInfo(); const MachineFrameInfo *FFI = MF.getFrameInfo();
unsigned CFSize = FFI->getMaxCallFrameSize(); unsigned CFSize = FFI->getMaxCallFrameSize();
// It's not always a good idea to include the call frame as part of the // It's not always a good idea to include the call frame as part of the
@ -1257,7 +1257,7 @@ hasReservedCallFrame(MachineFunction &MF) const {
// is not sufficient here since we still may reference some objects via SP // is not sufficient here since we still may reference some objects via SP
// even when FP is available in Thumb2 mode. // even when FP is available in Thumb2 mode.
bool ARMBaseRegisterInfo:: bool ARMBaseRegisterInfo::
canSimplifyCallFramePseudos(MachineFunction &MF) const { canSimplifyCallFramePseudos(const MachineFunction &MF) const {
return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects(); return hasReservedCallFrame(MF) || MF.getFrameInfo()->hasVarSizedObjects();
} }

View File

@ -144,8 +144,8 @@ public:
virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const; virtual bool requiresFrameIndexScavenging(const MachineFunction &MF) const;
virtual bool hasReservedCallFrame(MachineFunction &MF) const; virtual bool hasReservedCallFrame(const MachineFunction &MF) const;
virtual bool canSimplifyCallFramePseudos(MachineFunction &MF) const; virtual bool canSimplifyCallFramePseudos(const MachineFunction &MF) const;
virtual void eliminateCallFramePseudoInstr(MachineFunction &MF, virtual void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB, MachineBasicBlock &MBB,

View File

@ -68,7 +68,7 @@ void Thumb1RegisterInfo::emitLoadConstPool(MachineBasicBlock &MBB,
.addConstantPoolIndex(Idx).addImm(Pred).addReg(PredReg); .addConstantPoolIndex(Idx).addImm(Pred).addReg(PredReg);
} }
bool Thumb1RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { bool Thumb1RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const {
const MachineFrameInfo *FFI = MF.getFrameInfo(); const MachineFrameInfo *FFI = MF.getFrameInfo();
unsigned CFSize = FFI->getMaxCallFrameSize(); unsigned CFSize = FFI->getMaxCallFrameSize();
// It's not always a good idea to include the call frame as part of the // It's not always a good idea to include the call frame as part of the

View File

@ -38,7 +38,7 @@ public:
unsigned PredReg = 0) const; unsigned PredReg = 0) const;
/// Code Generation virtual methods... /// Code Generation virtual methods...
bool hasReservedCallFrame(MachineFunction &MF) const; bool hasReservedCallFrame(const MachineFunction &MF) const;
void eliminateCallFramePseudoInstr(MachineFunction &MF, void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB, MachineBasicBlock &MBB,

View File

@ -101,7 +101,7 @@ bool MSP430RegisterInfo::hasFP(const MachineFunction &MF) const {
MFI->isFrameAddressTaken()); MFI->isFrameAddressTaken());
} }
bool MSP430RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { bool MSP430RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const {
return !MF.getFrameInfo()->hasVarSizedObjects(); return !MF.getFrameInfo()->hasVarSizedObjects();
} }

View File

@ -40,7 +40,7 @@ public:
const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const; const TargetRegisterClass* getPointerRegClass(unsigned Kind = 0) const;
bool hasFP(const MachineFunction &MF) const; bool hasFP(const MachineFunction &MF) const;
bool hasReservedCallFrame(MachineFunction &MF) const; bool hasReservedCallFrame(const MachineFunction &MF) const;
void eliminateCallFramePseudoInstr(MachineFunction &MF, void eliminateCallFramePseudoInstr(MachineFunction &MF,
MachineBasicBlock &MBB, MachineBasicBlock &MBB,

View File

@ -34,7 +34,7 @@ struct SystemZRegisterInfo : public SystemZGenRegisterInfo {
BitVector getReservedRegs(const MachineFunction &MF) const; BitVector getReservedRegs(const MachineFunction &MF) const;
bool hasReservedCallFrame(MachineFunction &MF) const { return true; } bool hasReservedCallFrame(const MachineFunction &MF) const { return true; }
bool hasFP(const MachineFunction &MF) const; bool hasFP(const MachineFunction &MF) const;
int getFrameIndexOffset(const MachineFunction &MF, int FI) const; int getFrameIndexOffset(const MachineFunction &MF, int FI) const;

View File

@ -469,12 +469,12 @@ bool X86RegisterInfo::needsStackRealignment(const MachineFunction &MF) const {
return requiresRealignment && canRealignStack(MF); return requiresRealignment && canRealignStack(MF);
} }
bool X86RegisterInfo::hasReservedCallFrame(MachineFunction &MF) const { bool X86RegisterInfo::hasReservedCallFrame(const MachineFunction &MF) const {
return !MF.getFrameInfo()->hasVarSizedObjects(); return !MF.getFrameInfo()->hasVarSizedObjects();
} }
bool X86RegisterInfo::hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, bool X86RegisterInfo::hasReservedSpillSlot(const MachineFunction &MF,
int &FrameIdx) const { unsigned Reg, int &FrameIdx) const {
if (Reg == FramePtr && hasFP(MF)) { if (Reg == FramePtr && hasFP(MF)) {
FrameIdx = MF.getFrameInfo()->getObjectIndexBegin(); FrameIdx = MF.getFrameInfo()->getObjectIndexBegin();
return true; return true;

View File

@ -117,9 +117,9 @@ public:
bool needsStackRealignment(const MachineFunction &MF) const; bool needsStackRealignment(const MachineFunction &MF) const;
bool hasReservedCallFrame(MachineFunction &MF) const; bool hasReservedCallFrame(const MachineFunction &MF) const;
bool hasReservedSpillSlot(MachineFunction &MF, unsigned Reg, bool hasReservedSpillSlot(const MachineFunction &MF, unsigned Reg,
int &FrameIdx) const; int &FrameIdx) const;
void eliminateCallFramePseudoInstr(MachineFunction &MF, void eliminateCallFramePseudoInstr(MachineFunction &MF,