aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-03-29 18:34:22 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-03-29 18:34:22 +0000
commitfd5da6c991ad0bb5c0b6ce797d56c49ad3f73803 (patch)
treee9ad1db1a5e19c0d504ad2cebf2c70ad3ae108e6 /lib
parent5f2e499520720b48a573008cde76c034b611ea4e (diff)
downloadexternal_llvm-fd5da6c991ad0bb5c0b6ce797d56c49ad3f73803.zip
external_llvm-fd5da6c991ad0bb5c0b6ce797d56c49ad3f73803.tar.gz
external_llvm-fd5da6c991ad0bb5c0b6ce797d56c49ad3f73803.tar.bz2
Cosmetic changes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48947 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp27
1 files changed, 3 insertions, 24 deletions
diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
index 024190d..558f5f1 100644
--- a/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
+++ b/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
@@ -1708,28 +1708,9 @@ void BURegReductionPriorityQueue<SF>::CalculateSethiUllmanNumbers() {
CalcNodeSethiUllmanNumber(&(*SUnits)[i]);
}
-#if 0
-static unsigned SumOfUnscheduledPredsOfSuccs(const SUnit *SU) {
- unsigned Sum = 0;
- for (SUnit::const_succ_iterator I = SU->Succs.begin(), E = SU->Succs.end();
- I != E; ++I) {
- SUnit *SuccSU = I->Dep;
- for (SUnit::const_pred_iterator II = SuccSU->Preds.begin(),
- EE = SuccSU->Preds.end(); II != EE; ++II) {
- SUnit *PredSU = II->Dep;
- if (!PredSU->isScheduled)
- ++Sum;
- }
- }
-
- return Sum;
-}
-#endif
-
/// LimitedSumOfUnscheduledPredsOfSuccs - Compute the sum of the unscheduled
/// predecessors of the successors of the SUnit SU. Stop when the provided
/// limit is exceeded.
-
static unsigned LimitedSumOfUnscheduledPredsOfSuccs(const SUnit *SU,
unsigned Limit) {
unsigned Sum = 0;
@@ -1739,11 +1720,9 @@ static unsigned LimitedSumOfUnscheduledPredsOfSuccs(const SUnit *SU,
for (SUnit::const_pred_iterator II = SuccSU->Preds.begin(),
EE = SuccSU->Preds.end(); II != EE; ++II) {
SUnit *PredSU = II->Dep;
- if (!PredSU->isScheduled) {
- ++Sum;
- if(Sum > Limit)
- return Sum;
- }
+ if (!PredSU->isScheduled)
+ if (++Sum > Limit)
+ return Sum;
}
}
return Sum;