diff options
author | Evan Cheng <evan.cheng@apple.com> | 2009-02-10 08:30:11 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2009-02-10 08:30:11 +0000 |
commit | f0e366a929a1acb4bc14df5ef831cce74607a967 (patch) | |
tree | 866134c7f8aa0de917d54044a704b2e4489db196 /lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | |
parent | f66d7b5a51f956901e5949413965fecc41cc9761 (diff) | |
download | external_llvm-f0e366a929a1acb4bc14df5ef831cce74607a967.tar.gz external_llvm-f0e366a929a1acb4bc14df5ef831cce74607a967.tar.bz2 external_llvm-f0e366a929a1acb4bc14df5ef831cce74607a967.zip |
Fix PR3457: Ignore control successors when looking for closest scheduled successor. A control successor doesn't read result(s) produced by the scheduling unit being evaluated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@64210 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index bff85704e0..16102f342f 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -30,7 +30,6 @@ #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" #include <climits> -#include "llvm/Support/CommandLine.h" using namespace llvm; STATISTIC(NumBacktracks, "Number of times scheduler backtracked"); @@ -1047,6 +1046,7 @@ static unsigned closestSucc(const SUnit *SU) { unsigned MaxHeight = 0; for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end(); I != E; ++I) { + if (I->isCtrl()) continue; // ignore chain succs unsigned Height = I->getSUnit()->getHeight(); // If there are bunch of CopyToRegs stacked up, they should be considered // to be at the same position. |