diff options
author | Jim Laskey <jlaskey@mac.com> | 2005-12-18 04:40:52 +0000 |
---|---|---|
committer | Jim Laskey <jlaskey@mac.com> | 2005-12-18 04:40:52 +0000 |
commit | c97b7d0be90c9cf98df3078127b263a1799c0c5d (patch) | |
tree | dfc7407a65eb4611154df0ee66e8f4e3d9e13c70 /llvm/lib/CodeGen | |
parent | e220821deb1311fedef1d37fa1bd3a74b85149d1 (diff) | |
download | bcm5719-llvm-c97b7d0be90c9cf98df3078127b263a1799c0c5d.tar.gz bcm5719-llvm-c97b7d0be90c9cf98df3078127b263a1799c0c5d.zip |
Fix a bug Sabre was having where the DAG root was a group. The group dominator
needed to be added to the ordering list, not the first member of the group.
llvm-svn: 24816
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index ef90fc048c5..03a0dd1200c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -682,7 +682,12 @@ void SimpleSched::IncludeNode(NodeInfo *NI) { /// Note that the ordering in the Nodes vector is reversed. void SimpleSched::VisitAll() { // Add first element to list - Ordering.push_back(getNI(DAG.getRoot().Val)); + NodeInfo *NI = getNI(DAG.getRoot().Val); + if (NI->isInGroup()) { + Ordering.push_back(NI->Group->getDominator()); + } else { + Ordering.push_back(NI); + } // Iterate through all nodes that have been added for (unsigned i = 0; i < Ordering.size(); i++) { // note: size() varies |