[llvm-commits] [llvm] r62362 - /llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Dan Gohman
gohman at apple.com
Fri Jan 16 13:37:14 PST 2009
Author: djg
Date: Fri Jan 16 15:37:14 2009
New Revision: 62362
URL: http://llvm.org/viewvc/llvm-project?rev=62362&view=rev
Log:
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.
Modified:
llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
Modified: llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp?rev=62362&r1=62361&r2=62362&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp (original)
+++ llvm/trunk/lib/CodeGen/PostRASchedulerList.cpp Fri Jan 16 15:37:14 2009
@@ -264,7 +264,7 @@
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 @@
}
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.
More information about the llvm-commits
mailing list