diff options
| author | Dan Gohman <gohman@apple.com> | 2009-01-16 21:37:14 +0000 | 
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2009-01-16 21:37:14 +0000 | 
| commit | 014142fd1a6ef2bd46bc0788f86d0cd37b7bcd8f (patch) | |
| tree | 6e74152bf77e71f17965a8d038ec79d000289059 /llvm/lib/CodeGen | |
| parent | 3289983d69dded7817ddbe965ba20c06511a4675 (diff) | |
| download | bcm5719-llvm-014142fd1a6ef2bd46bc0788f86d0cd37b7bcd8f.tar.gz bcm5719-llvm-014142fd1a6ef2bd46bc0788f86d0cd37b7bcd8f.zip | |
Fix the check for an empty basic block to check for an empty SUnits
array instead, since this is what the scheduler actually cares about.
And remove a check that is unnecessary, since it can assume that
SUnits isn't empty.
llvm-svn: 62362
Diffstat (limited to 'llvm/lib/CodeGen')
| -rw-r--r-- | llvm/lib/CodeGen/PostRASchedulerList.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/CodeGen/PostRASchedulerList.cpp b/llvm/lib/CodeGen/PostRASchedulerList.cpp index b7bfe3fefd9..12d9efa87b4 100644 --- a/llvm/lib/CodeGen/PostRASchedulerList.cpp +++ b/llvm/lib/CodeGen/PostRASchedulerList.cpp @@ -264,7 +264,7 @@ static SDep *CriticalPathStep(SUnit *SU) {  bool SchedulePostRATDList::BreakAntiDependencies() {    // The code below assumes that there is at least one instruction,    // so just duck out immediately if the block is empty. -  if (BB->empty()) return false; +  if (SUnits.empty()) return false;    // Find the node at the bottom of the critical path.    SUnit *Max = 0; @@ -275,7 +275,7 @@ bool SchedulePostRATDList::BreakAntiDependencies() {    }    DOUT << "Critical path has total latency " -       << (Max ? Max->getDepth() + Max->Latency : 0) << "\n"; +       << (Max->getDepth() + Max->Latency) << "\n";    // Track progress along the critical path through the SUnit graph as we walk    // the instructions. | 

