forked from OSchip/llvm-project
Fold isRematerializable checks into isSafeToReMat.
llvm-svn: 55563
This commit is contained in:
parent
b8d588d89c
commit
542ac62971
|
@ -715,7 +715,9 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, bool &SawStore) {
|
|||
/// instruction which defined the specified register instead of copying it.
|
||||
bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII, unsigned DstReg) {
|
||||
bool SawStore = false;
|
||||
if (!isSafeToMove(TII, SawStore))
|
||||
if (!getDesc().isRematerializable() ||
|
||||
!TII->isTriviallyReMaterializable(this) ||
|
||||
!isSafeToMove(TII, SawStore))
|
||||
return false;
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
MachineOperand &MO = getOperand(i);
|
||||
|
|
Loading…
Reference in New Issue