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 | ddcb4ad53e5e4f79840a945acbe7dfdef025b599 (patch) | |
| tree | 0c514c5fa1182a2f4e93aa3213a0c708654e9445 /llvm | |
| parent | 0997f207c2b1eb49a60af6ac6b659a2947a26976 (diff) | |
| download | bcm5719-llvm-ddcb4ad53e5e4f79840a945acbe7dfdef025b599.tar.gz bcm5719-llvm-ddcb4ad53e5e4f79840a945acbe7dfdef025b599.zip | |
Use std::numeric_limits<float>::infinity() instead of
std::numeric_limits<float>::max() for weighting preallocated
intervals.
llvm-svn: 11427
Diffstat (limited to 'llvm')
| -rw-r--r-- | llvm/lib/CodeGen/LiveIntervals.cpp | 2 | ||||
| -rw-r--r-- | llvm/lib/CodeGen/RegAllocLinearScan.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervals.cpp b/llvm/lib/CodeGen/LiveIntervals.cpp index 22cdb4f8842..f965c5feecc 100644 --- a/llvm/lib/CodeGen/LiveIntervals.cpp +++ b/llvm/lib/CodeGen/LiveIntervals.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/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp index d26ee8f8c57..0369a885044 100644 --- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp +++ b/llvm/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_); |

