[llvm-commits] [llvm] r127075 - /llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp
Andrew Trick
atrick at apple.com
Sat Mar 5 02:29:25 PST 2011
Author: atrick
Date: Sat Mar 5 04:29:25 2011
New Revision: 127075
URL: http://llvm.org/viewvc/llvm-project?rev=127075&view=rev
Log:
Be explicit with abs(). Visual Studio workaround.
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=127075&r1=127074&r2=127075&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp Sat Mar 5 04:29:25 2011
@@ -2257,10 +2257,12 @@
return left->getHeight() > right->getHeight();
}
- if (!DisableSchedCriticalPath
- && abs((long)left->getDepth() - right->getDepth()) > MaxReorderWindow) {
- DEBUG(++FactorCount[FactDepth]);
- return left->getDepth() < right->getDepth();
+ if (!DisableSchedCriticalPath) {
+ int spread = (int)left->getDepth() - (int)right->getDepth();
+ if (std::abs(spread) > MaxReorderWindow) {
+ DEBUG(++FactorCount[FactDepth]);
+ return left->getDepth() < right->getDepth();
+ }
}
if (!DisableSchedHeight && left->getHeight() != right->getHeight()) {
More information about the llvm-commits
mailing list