diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-16 03:25:46 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-16 03:25:46 +0000 |
commit | 3f23744df4809eba94284e601e81489212c974d4 (patch) | |
tree | bf2d1d7711a774bac89352554c163f167abf36bb /lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | |
parent | 64722e5163785da17ab581364c9655071b566180 (diff) |
Fix some register-alias-related bugs in the post-RA scheduler liveness
computation code. Also, avoid adding output-depenency edges when both
defs are dead, which frequently happens with EFLAGS defs.
Compute Depth and Height lazily, and always in terms of edge latency
values. For the schedulers that don't care about latency, edge latencies
are set to 1.
Eliminate Cycle and CycleBound, and LatencyPriorityQueue's Latencies array.
These are all subsumed by the Depth and Height fields.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@61073 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp index 69d3045bf2..21df142ff3 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGSDNodes.cpp @@ -80,6 +80,9 @@ void ScheduleDAGSDNodes::BuildSchedUnits() { E = DAG->allnodes_end(); NI != E; ++NI) NI->setNodeId(-1); + // Check to see if the scheduler cares about latencies. + bool UnitLatencies = ForceUnitLatencies(); + for (SelectionDAG::allnodes_iterator NI = DAG->allnodes_begin(), E = DAG->allnodes_end(); NI != E; ++NI) { if (isPassiveNode(NI)) // Leaf node, e.g. a TargetImmediate. @@ -133,7 +136,10 @@ void ScheduleDAGSDNodes::BuildSchedUnits() { N->setNodeId(NodeSUnit->NodeNum); // Assign the Latency field of NodeSUnit using target-provided information. - ComputeLatency(NodeSUnit); + if (UnitLatencies) + NodeSUnit->Latency = 1; + else + ComputeLatency(NodeSUnit); } // Pass 2: add the preds, succs, etc. |