summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/LiveIntervals.cpp2
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp2
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_);
OpenPOWER on IntegriCloud