diff options
author | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-14 00:44:07 +0000 |
---|---|---|
committer | Alkis Evlogimenos <alkis@evlogimenos.com> | 2004-02-14 00:44:07 +0000 |
commit | 6ab5c15962cb16402713747f1fbe85e001318e7d (patch) | |
tree | 77720f536a798fd3c7b8c2aa9fcdd462b8902ce4 | |
parent | 4ef51373c423fc3cff1e72dd08b4256cdc90362a (diff) |
Use std::numeric_limits<float>::infinity() instead of
std::numeric_limits<float>::max() for weighting preallocated
intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11427 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/LiveIntervalAnalysis.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/RegAllocLinearScan.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp index 22cdb4f884..f965c5feec 100644 --- a/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -436,7 +436,7 @@ bool LiveIntervals::overlapsAliases(const Interval& lhs, LiveIntervals::Interval::Interval(unsigned r) : reg(r), weight((MRegisterInfo::isPhysicalRegister(r) ? - std::numeric_limits<float>::max() : 0.0F)) + std::numeric_limits<float>::infinity() : 0.0F)) { } diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index d26ee8f8c5..0369a88504 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -641,7 +641,7 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur) DEBUG(std::cerr << "\t\tassigning stack slot at interval "<< *cur << ":\n"); - float minWeight = std::numeric_limits<float>::max(); + float minWeight = std::numeric_limits<float>::infinity(); unsigned minReg = 0; const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg); for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_); |