summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-09 21:02:10 +0000
committerDan Gohman <gohman@apple.com>2009-10-09 21:02:10 +0000
commite19c1810d72d4d23b216595f30aaec867f024399 (patch)
tree7d5729fdc9276614988225ee7de480cfd2f2fab5 /llvm
parent7d9dffb4136892b49b523cf9bc897dd4959a5445 (diff)
downloadbcm5719-llvm-e19c1810d72d4d23b216595f30aaec867f024399.tar.gz
bcm5719-llvm-e19c1810d72d4d23b216595f30aaec867f024399.zip
isTriviallyReMaterializable checks the
TargetInstrDesc::isRematerializable flag, so it isn't necessary to do this check in its callers. llvm-svn: 83671
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp3
-rw-r--r--llvm/lib/CodeGen/MachineInstr.cpp3
-rw-r--r--llvm/lib/CodeGen/MachineLICM.cpp2
-rw-r--r--llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp3
4 files changed, 4 insertions, 7 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 4fa172fc52b..135cc1719f7 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1423,8 +1423,7 @@ bool LiveIntervals::isReMaterializable(const LiveInterval &li,
// If the target-specific rules don't identify an instruction as
// being trivially rematerializable, use some target-independent
// rules.
- if (!MI->getDesc().isRematerializable() ||
- !tii_->isTriviallyReMaterializable(MI)) {
+ if (!tii_->isTriviallyReMaterializable(MI)) {
if (!EnableAggressiveRemat)
return false;
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp
index 2dc99f5bb71..c4a99715e25 100644
--- a/llvm/lib/CodeGen/MachineInstr.cpp
+++ b/llvm/lib/CodeGen/MachineInstr.cpp
@@ -960,8 +960,7 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII,
bool MachineInstr::isSafeToReMat(const TargetInstrInfo *TII,
unsigned DstReg) const {
bool SawStore = false;
- if (!getDesc().isRematerializable() ||
- !TII->isTriviallyReMaterializable(this) ||
+ if (!TII->isTriviallyReMaterializable(this) ||
!isSafeToMove(TII, SawStore))
return false;
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp
index 5e2d39e1abe..5612899875b 100644
--- a/llvm/lib/CodeGen/MachineLICM.cpp
+++ b/llvm/lib/CodeGen/MachineLICM.cpp
@@ -322,7 +322,7 @@ bool MachineLICM::IsProfitableToHoist(MachineInstr &MI) {
// FIXME: For now, only hoist re-materilizable instructions. LICM will
// increase register pressure. We want to make sure it doesn't increase
// spilling.
- if (!TID.isRematerializable() || !TII->isTriviallyReMaterializable(&MI))
+ if (!TII->isTriviallyReMaterializable(&MI))
return false;
// If result(s) of this instruction is used by PHIs, then don't hoist it.
diff --git a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
index af3d60d3b97..21bf5ea8d08 100644
--- a/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
+++ b/llvm/lib/CodeGen/SimpleRegisterCoalescing.cpp
@@ -646,8 +646,7 @@ bool SimpleRegisterCoalescing::ReMaterializeTrivialDef(LiveInterval &SrcInt,
const TargetInstrDesc &TID = DefMI->getDesc();
if (!TID.isAsCheapAsAMove())
return false;
- if (!DefMI->getDesc().isRematerializable() ||
- !tii_->isTriviallyReMaterializable(DefMI))
+ if (!tii_->isTriviallyReMaterializable(DefMI))
return false;
bool SawStore = false;
if (!DefMI->isSafeToMove(tii_, SawStore))
OpenPOWER on IntegriCloud