mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-20 11:32:33 +00:00
Add a simple target-independent heuristic to allow targets with no
instruction itinerary data to back-schedule loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61070 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c6b680eee5
commit
4ea8e85e19
@ -225,6 +225,12 @@ void ScheduleDAGInstrs::ComputeLatency(SUnit *SU) {
|
||||
// all nodes flagged together into this SUnit.
|
||||
SU->Latency =
|
||||
InstrItins.getLatency(SU->getInstr()->getDesc().getSchedClass());
|
||||
|
||||
// Simplistic target-independent heuristic: assume that loads take
|
||||
// extra time.
|
||||
if (InstrItins.isEmpty())
|
||||
if (SU->getInstr()->getDesc().mayLoad())
|
||||
SU->Latency += 2;
|
||||
}
|
||||
|
||||
void ScheduleDAGInstrs::dumpNode(const SUnit *SU) const {
|
||||
|
Loading…
x
Reference in New Issue
Block a user