diff options
author | Andrew Trick <atrick@apple.com> | 2013-01-25 06:33:57 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2013-01-25 06:33:57 +0000 |
commit | 4e1fb1894048455d49d62543b3f83672b27b0000 (patch) | |
tree | f5ea7b8bbf85ae1eb6c83753e07836868f292793 /lib/Target/Hexagon/HexagonMachineScheduler.cpp | |
parent | 827de0520ee986fcda5f0d3290a3746249fa5847 (diff) | |
download | llvm-4e1fb1894048455d49d62543b3f83672b27b0000.tar.gz llvm-4e1fb1894048455d49d62543b3f83672b27b0000.tar.bz2 llvm-4e1fb1894048455d49d62543b3f83672b27b0000.tar.xz |
MIsched: Improve the interface to SchedDFS analysis (subtrees).
Allow the strategy to select SchedDFS. Allow the results of SchedDFS
to affect initialization of the scheduler state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173425 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonMachineScheduler.cpp')
-rw-r--r-- | lib/Target/Hexagon/HexagonMachineScheduler.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/Target/Hexagon/HexagonMachineScheduler.cpp b/lib/Target/Hexagon/HexagonMachineScheduler.cpp index aef6830752..36dfaa4233 100644 --- a/lib/Target/Hexagon/HexagonMachineScheduler.cpp +++ b/lib/Target/Hexagon/HexagonMachineScheduler.cpp @@ -152,6 +152,12 @@ void VLIWMachineScheduler::schedule() { // Postprocess the DAG to add platform specific artificial dependencies. postprocessDAG(); + SmallVector<SUnit*, 8> TopRoots, BotRoots; + findRootsAndBiasEdges(TopRoots, BotRoots); + + // Initialize the strategy before modifying the DAG. + SchedImpl->initialize(this); + // To view Height/Depth correctly, they should be accessed at least once. DEBUG(unsigned maxH = 0; for (unsigned su = 0, e = SUnits.size(); su != e; ++su) @@ -166,7 +172,7 @@ void VLIWMachineScheduler::schedule() { DEBUG(for (unsigned su = 0, e = SUnits.size(); su != e; ++su) SUnits[su].dumpAll(this)); - initQueues(); + initQueues(TopRoots, BotRoots); bool IsTopNode = false; while (SUnit *SU = SchedImpl->pickNode(IsTopNode)) { |