summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2009-02-10 08:30:11 +0000
committerEvan Cheng <evan.cheng@apple.com>2009-02-10 08:30:11 +0000
commitce3bbe515b30b8d2c8ab6efd72e411ce6921066a (patch)
tree6a39fec4cb4c2c176670862c01eb3726e0172b46 /llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
parent4bed3565f3abecb4cfd0bda86765b95751db864b (diff)
downloadbcm5719-llvm-ce3bbe515b30b8d2c8ab6efd72e411ce6921066a.tar.gz
bcm5719-llvm-ce3bbe515b30b8d2c8ab6efd72e411ce6921066a.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.
llvm-svn: 64210
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index bff85704e06..16102f342f4 100644
--- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/llvm/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.
OpenPOWER on IntegriCloud