mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-27 16:38:30 +00:00
Constify the machine instruction passed into the
"is{Trivially,Really}ReMaterializable" methods. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c2616e43fd
commit
9f8fea3531
@ -67,7 +67,7 @@ public:
|
||||
/// isTriviallyReMaterializable - Return true if the instruction is trivially
|
||||
/// rematerializable, meaning it has no side effects and requires no operands
|
||||
/// that aren't always available.
|
||||
bool isTriviallyReMaterializable(MachineInstr *MI) const {
|
||||
bool isTriviallyReMaterializable(const MachineInstr *MI) const {
|
||||
return MI->getDesc().isRematerializable() &&
|
||||
isReallyTriviallyReMaterializable(MI);
|
||||
}
|
||||
@ -81,7 +81,7 @@ protected:
|
||||
/// return false if the instruction has any side effects other than
|
||||
/// producing a value, or if it requres any address registers that are not
|
||||
/// always available.
|
||||
virtual bool isReallyTriviallyReMaterializable(MachineInstr *MI) const {
|
||||
virtual bool isReallyTriviallyReMaterializable(const MachineInstr *MI) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -760,7 +760,8 @@ static inline bool isGVStub(GlobalValue *GV, X86TargetMachine &TM) {
|
||||
return TM.getSubtarget<X86Subtarget>().GVRequiresExtraLoad(GV, TM, false);
|
||||
}
|
||||
|
||||
bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const {
|
||||
bool
|
||||
X86InstrInfo::isReallyTriviallyReMaterializable(const MachineInstr *MI) const {
|
||||
switch (MI->getOpcode()) {
|
||||
default: break;
|
||||
case X86::MOV8rm:
|
||||
|
@ -260,7 +260,7 @@ public:
|
||||
unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
|
||||
unsigned isStoreToStackSlot(MachineInstr *MI, int &FrameIndex) const;
|
||||
|
||||
bool isReallyTriviallyReMaterializable(MachineInstr *MI) const;
|
||||
bool isReallyTriviallyReMaterializable(const MachineInstr *MI) const;
|
||||
void reMaterialize(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI,
|
||||
unsigned DestReg, const MachineInstr *Orig) const;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user