mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-14 15:28:20 +00:00
isTriviallyReMaterializable checks the
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do this check in its callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83671 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -1423,8 +1423,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li,
|
|||||||
// If the target-specific rules don't identify an instruction as
|
// If the target-specific rules don't identify an instruction as
|
||||||
// being trivially rematerializable, use some target-independent
|
// being trivially rematerializable, use some target-independent
|
||||||
// rules.
|
// rules.
|
||||||
if (!MI->getDesc().isRematerializable() ||
|
if (!tii_->isTriviallyReMaterializable(MI)) {
|
||||||
!tii_->isTriviallyReMaterializable(MI)) {
|
|
||||||
if (!EnableAggressiveRemat)
|
if (!EnableAggressiveRemat)
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -960,8 +960,7 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
|
|||||||
bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII,
|
bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII,
|
||||||
unsigned DstReg) const {
|
unsigned DstReg) const {
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!getDesc().isRematerializable() ||
|
if (!TII->isTriviallyReMaterializable(this) ||
|
||||||
!TII->isTriviallyReMaterializable(this) ||
|
|
||||||
!isSafeToMove(TII, SawStore))
|
!isSafeToMove(TII, SawStore))
|
||||||
return false;
|
return false;
|
||||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||||
|
@@ -322,7 +322,7 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) {
|
|||||||
// FIXME: For now, only hoist re-materilizable instructions. LICM will
|
// FIXME: For now, only hoist re-materilizable instructions. LICM will
|
||||||
// increase register pressure. We want to make sure it doesn't increase
|
// increase register pressure. We want to make sure it doesn't increase
|
||||||
// spilling.
|
// spilling.
|
||||||
if (!TID.isRematerializable() || !TII->isTriviallyReMaterializable(&MI))
|
if (!TII->isTriviallyReMaterializable(&MI))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
// If result(s) of this instruction is used by PHIs, then don't hoist it.
|
// If result(s) of this instruction is used by PHIs, then don't hoist it.
|
||||||
|
@@ -646,8 +646,7 @@ bool SimpleRegisterCoalescing::ReMaterializeTrivialDef(LiveInterval &SrcInt,
|
|||||||
const TargetInstrDesc &TID = DefMI->getDesc();
|
const TargetInstrDesc &TID = DefMI->getDesc();
|
||||||
if (!TID.isAsCheapAsAMove())
|
if (!TID.isAsCheapAsAMove())
|
||||||
return false;
|
return false;
|
||||||
if (!DefMI->getDesc().isRematerializable() ||
|
if (!tii_->isTriviallyReMaterializable(DefMI))
|
||||||
!tii_->isTriviallyReMaterializable(DefMI))
|
|
||||||
return false;
|
return false;
|
||||||
bool SawStore = false;
|
bool SawStore = false;
|
||||||
if (!DefMI->isSafeToMove(tii_, SawStore))
|
if (!DefMI->isSafeToMove(tii_, SawStore))
|
||||||
|
Reference in New Issue
Block a user