mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
verify that the frame index is immutable before remat'ing (still disabled)
or being side-effect free. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45816 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c95f075c43
commit
8794390406
@ -749,10 +749,11 @@ bool X86InstrInfo::isReallyTriviallyReMaterializable(MachineInstr *MI) const {
|
||||
// values.
|
||||
#if 0
|
||||
// FIXME: This is disabled due to a remat bug. rdar://5671644
|
||||
MachineFunction *MF = MI->getParent()->getParent();
|
||||
if (MI->getOperand(1).isFI() &&
|
||||
MF->getFrameInfo()->isFixedObjectIndex(MI->getOperand(1).getIndex()))
|
||||
return true;
|
||||
if (MI->getOperand(1).isFI()) {
|
||||
const MachineFrameInfo &MFI=*MI->getParent()->getParent()->getFrameInfo();
|
||||
int Idx = MI->getOperand(1).getIndex();
|
||||
return MFI.isFixedObjectIndex(Idx) && MFI.isImmutableObjectIndex(Idx);
|
||||
}
|
||||
#endif
|
||||
|
||||
return false;
|
||||
@ -805,9 +806,11 @@ bool X86InstrInfo::isReallySideEffectFree(MachineInstr *MI) const {
|
||||
// invariant across the whole function, because we don't redefine argument
|
||||
// values.
|
||||
MachineFunction *MF = MI->getParent()->getParent();
|
||||
if (MI->getOperand(1).isFI() &&
|
||||
MF->getFrameInfo()->isFixedObjectIndex(MI->getOperand(1).getIndex()))
|
||||
return true;
|
||||
if (MI->getOperand(1).isFI()) {
|
||||
const MachineFrameInfo &MFI = *MF->getFrameInfo();
|
||||
int Idx = MI->getOperand(1).getIndex();
|
||||
return MFI.isFixedObjectIndex(Idx) && MFI.isImmutableObjectIndex(Idx);
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user