mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-17 04:24:00 +00:00
numeric_limits::infinity() apparently does not work on all systems. As a
workaround, use the C HUGE_VAL macro instead. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13377 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -196,7 +196,7 @@ void LiveIntervals::updateSpilledInterval(Interval& li,
|
|||||||
VirtRegMap& vrm,
|
VirtRegMap& vrm,
|
||||||
int slot)
|
int slot)
|
||||||
{
|
{
|
||||||
assert(li.weight != std::numeric_limits<float>::infinity() &&
|
assert(li.weight != HUGE_VAL &&
|
||||||
"attempt to spill already spilled interval!");
|
"attempt to spill already spilled interval!");
|
||||||
Interval::Ranges oldRanges;
|
Interval::Ranges oldRanges;
|
||||||
swap(oldRanges, li.ranges);
|
swap(oldRanges, li.ranges);
|
||||||
@ -253,7 +253,7 @@ void LiveIntervals::updateSpilledInterval(Interval& li,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
// the new spill weight is now infinity as it cannot be spilled again
|
// the new spill weight is now infinity as it cannot be spilled again
|
||||||
li.weight = std::numeric_limits<float>::infinity();
|
li.weight = HUGE_VAL;
|
||||||
DEBUG(std::cerr << '\n');
|
DEBUG(std::cerr << '\n');
|
||||||
DEBUG(std::cerr << "\t\t\t\tupdated interval: " << li << '\n');
|
DEBUG(std::cerr << "\t\t\t\tupdated interval: " << li << '\n');
|
||||||
}
|
}
|
||||||
@ -556,15 +556,13 @@ LiveIntervals::Interval& LiveIntervals::getOrCreateInterval(unsigned reg)
|
|||||||
|
|
||||||
LiveIntervals::Interval::Interval(unsigned r)
|
LiveIntervals::Interval::Interval(unsigned r)
|
||||||
: reg(r),
|
: reg(r),
|
||||||
weight((MRegisterInfo::isPhysicalRegister(r) ?
|
weight((MRegisterInfo::isPhysicalRegister(r) ? HUGE_VAL : 0.0F))
|
||||||
std::numeric_limits<float>::infinity() : 0.0F))
|
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool LiveIntervals::Interval::spilled() const
|
bool LiveIntervals::Interval::spilled() const
|
||||||
{
|
{
|
||||||
return (weight == std::numeric_limits<float>::infinity() &&
|
return (weight == HUGE_VAL &&
|
||||||
MRegisterInfo::isVirtualRegister(reg));
|
MRegisterInfo::isVirtualRegister(reg));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -351,7 +351,7 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
|||||||
|
|
||||||
DEBUG(std::cerr << "\tassigning stack slot at interval "<< *cur << ":\n");
|
DEBUG(std::cerr << "\tassigning stack slot at interval "<< *cur << ":\n");
|
||||||
|
|
||||||
float minWeight = std::numeric_limits<float>::infinity();
|
float minWeight = HUGE_VAL;
|
||||||
unsigned minReg = 0;
|
unsigned minReg = 0;
|
||||||
const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
|
const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
|
||||||
for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
|
for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);
|
||||||
|
Reference in New Issue
Block a user