diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-09 23:27:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-09 23:27:56 +0000 |
commit | 0a4c09e724bd3ab7c9a1d3a1615894e7bf209179 (patch) | |
tree | 31322fbef91a904807aea13e1bc2ab409c0042c6 /lib/CodeGen/ScheduleDAGInstrs.cpp | |
parent | 40c80212c1c0be155e7a561f0a18a94856d7eb2f (diff) | |
download | external_llvm-0a4c09e724bd3ab7c9a1d3a1615894e7bf209179.zip external_llvm-0a4c09e724bd3ab7c9a1d3a1615894e7bf209179.tar.gz external_llvm-0a4c09e724bd3ab7c9a1d3a1615894e7bf209179.tar.bz2 |
Factor out LiveIntervalAnalysis' code to determine whether an instruction
is trivially rematerializable and integrate it into
TargetInstrInfo::isTriviallyReMaterializable. This way, all places that
need to know whether an instruction is rematerializable will get the
same answer.
This enables the useful parts of the aggressive-remat option by
default -- using AliasAnalysis to determine whether a memory location
is invariant, and removes the questionable parts -- rematting operations
with virtual register inputs that may not be live everywhere.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83687 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/ScheduleDAGInstrs.cpp')
-rw-r--r-- | lib/CodeGen/ScheduleDAGInstrs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/ScheduleDAGInstrs.cpp b/lib/CodeGen/ScheduleDAGInstrs.cpp index f50844f..44e9296 100644 --- a/lib/CodeGen/ScheduleDAGInstrs.cpp +++ b/lib/CodeGen/ScheduleDAGInstrs.cpp @@ -123,7 +123,7 @@ void ScheduleDAGInstrs::StartBlock(MachineBasicBlock *BB) { } } -void ScheduleDAGInstrs::BuildSchedGraph() { +void ScheduleDAGInstrs::BuildSchedGraph(AliasAnalysis *AA) { // We'll be allocating one SUnit for each instruction, plus one for // the region exit node. SUnits.reserve(BB->size()); @@ -375,7 +375,7 @@ void ScheduleDAGInstrs::BuildSchedGraph() { // Treat all other stores conservatively. goto new_chain; } else if (TID.mayLoad()) { - if (MI->isInvariantLoad()) { + if (MI->isInvariantLoad(AA)) { // Invariant load, no chain dependencies needed! } else if (const Value *V = getUnderlyingObjectForInstr(MI)) { // A load from a specific PseudoSourceValue. Add precise dependencies. |