diff options
author | Dan Gohman <gohman@apple.com> | 2008-12-16 03:35:01 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-12-16 03:35:01 +0000 |
commit | b9a012156bbf3b13eb16027c0a75c186f172366a (patch) | |
tree | ddca9ea721a90c50826d431f6a6e34c398c5d834 /llvm/lib/CodeGen/LatencyPriorityQueue.cpp | |
parent | 405f2197a47e6e6fb1104485b35a7a1fcbd35367 (diff) | |
download | bcm5719-llvm-b9a012156bbf3b13eb16027c0a75c186f172366a.tar.gz bcm5719-llvm-b9a012156bbf3b13eb16027c0a75c186f172366a.zip |
Add initial support for back-scheduling address computations,
especially in the case of addresses computed from loop induction
variables.
llvm-svn: 61075
Diffstat (limited to 'llvm/lib/CodeGen/LatencyPriorityQueue.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LatencyPriorityQueue.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/LatencyPriorityQueue.cpp b/llvm/lib/CodeGen/LatencyPriorityQueue.cpp index 7ad9ac9b51c..2e7b89c494f 100644 --- a/llvm/lib/CodeGen/LatencyPriorityQueue.cpp +++ b/llvm/lib/CodeGen/LatencyPriorityQueue.cpp @@ -19,6 +19,14 @@ using namespace llvm; bool latency_sort::operator()(const SUnit *LHS, const SUnit *RHS) const { + // The isScheduleHigh flag allows nodes with wraparound dependencies that + // cannot easily be modeled as edges with latencies to be scheduled as + // soon as possible in a top-down schedule. + if (LHS->isScheduleHigh && !RHS->isScheduleHigh) + return false; + if (!LHS->isScheduleHigh && RHS->isScheduleHigh) + return true; + unsigned LHSNum = LHS->NodeNum; unsigned RHSNum = RHS->NodeNum; |