Be explicit with abs(). Visual Studio workaround.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@127075 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Andrew Trick 2011-03-05 10:29:25 +00:00
parent 9869c2f717
commit afc7d235e9

View File

@ -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()) {