diff options
author | Andrew Trick <atrick@apple.com> | 2011-03-05 10:29:25 +0000 |
---|---|---|
committer | Andrew Trick <atrick@apple.com> | 2011-03-05 10:29:25 +0000 |
commit | 25cedf3fe4a4e6025ee2da083c22a75d914e9a67 (patch) | |
tree | c86ed73c8973716cd9832194be8b3c9e8e8ffa6c | |
parent | 250c357ce7876074c1e294cee2849ccd389e681b (diff) | |
download | bcm5719-llvm-25cedf3fe4a4e6025ee2da083c22a75d914e9a67.tar.gz bcm5719-llvm-25cedf3fe4a4e6025ee2da083c22a75d914e9a67.zip |
Be explicit with abs(). Visual Studio workaround.
llvm-svn: 127075
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp index 8821b85a852..1575e7b345e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/ScheduleDAGRRList.cpp @@ -2257,10 +2257,12 @@ bool ilp_ls_rr_sort::operator()(SUnit *left, SUnit *right) const { 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()) { |