[llvm-commits] [llvm] r48947 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Evan Cheng
evan.cheng at apple.com
Sat Mar 29 11:34:22 PDT 2008
Author: evancheng
Date: Sat Mar 29 13:34:22 2008
New Revision: 48947
URL: http://llvm.org/viewvc/llvm-project?rev=48947&view=rev
Log:
Cosmetic changes.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp?rev=48947&r1=48946&r2=48947&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sat Mar 29 13:34:22 2008
@@ -1708,28 +1708,9 @@
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 @@
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;
More information about the llvm-commits
mailing list