mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-24 22:32:47 +00:00
Use correct value for float HUGH_VAL.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@31500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
a7bb6498fe
commit
7902c75331
@ -219,7 +219,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
|
|||||||
// range the use follows def immediately, it doesn't make sense to spill
|
// range the use follows def immediately, it doesn't make sense to spill
|
||||||
// it and hope it will be easier to allocate for this li.
|
// it and hope it will be easier to allocate for this li.
|
||||||
if (isZeroLengthInterval(&LI))
|
if (isZeroLengthInterval(&LI))
|
||||||
LI.weight = float(HUGE_VAL);
|
LI.weight = HUGE_VALF;
|
||||||
|
|
||||||
if (EnableReweight) {
|
if (EnableReweight) {
|
||||||
// Divide the weight of the interval by its size. This encourages
|
// Divide the weight of the interval by its size. This encourages
|
||||||
@ -265,7 +265,7 @@ addIntervalsForSpills(const LiveInterval &li, VirtRegMap &vrm, int slot) {
|
|||||||
|
|
||||||
std::vector<LiveInterval*> added;
|
std::vector<LiveInterval*> added;
|
||||||
|
|
||||||
assert(li.weight != HUGE_VAL &&
|
assert(li.weight != HUGE_VALF &&
|
||||||
"attempt to spill already spilled interval!");
|
"attempt to spill already spilled interval!");
|
||||||
|
|
||||||
DEBUG(std::cerr << "\t\t\t\tadding intervals for spills for interval: ";
|
DEBUG(std::cerr << "\t\t\t\tadding intervals for spills for interval: ";
|
||||||
@ -340,7 +340,7 @@ addIntervalsForSpills(const LiveInterval &li, VirtRegMap &vrm, int slot) {
|
|||||||
|
|
||||||
// the spill weight is now infinity as it
|
// the spill weight is now infinity as it
|
||||||
// cannot be spilled again
|
// cannot be spilled again
|
||||||
nI.weight = float(HUGE_VAL);
|
nI.weight = HUGE_VALF;
|
||||||
|
|
||||||
if (HasUse) {
|
if (HasUse) {
|
||||||
LiveRange LR(getLoadIndex(index), getUseIndex(index),
|
LiveRange LR(getLoadIndex(index), getUseIndex(index),
|
||||||
@ -1362,6 +1362,6 @@ bool LiveIntervals::differingRegisterClasses(unsigned RegA,
|
|||||||
|
|
||||||
LiveInterval LiveIntervals::createInterval(unsigned reg) {
|
LiveInterval LiveIntervals::createInterval(unsigned reg) {
|
||||||
float Weight = MRegisterInfo::isPhysicalRegister(reg) ?
|
float Weight = MRegisterInfo::isPhysicalRegister(reg) ?
|
||||||
(float)HUGE_VAL : 0.0F;
|
HUGE_VALF : 0.0F;
|
||||||
return LiveInterval(reg, Weight);
|
return LiveInterval(reg, Weight);
|
||||||
}
|
}
|
||||||
|
@ -545,7 +545,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
|||||||
DEBUG(std::cerr << "\tassigning stack slot at interval "<< *cur << ":\n");
|
DEBUG(std::cerr << "\tassigning stack slot at interval "<< *cur << ":\n");
|
||||||
|
|
||||||
// Find a register to spill.
|
// Find a register to spill.
|
||||||
float minWeight = float(HUGE_VAL);
|
float minWeight = HUGE_VALF;
|
||||||
unsigned minReg = 0;
|
unsigned minReg = 0;
|
||||||
for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_),
|
for (TargetRegisterClass::iterator i = RC->allocation_order_begin(*mf_),
|
||||||
e = RC->allocation_order_end(*mf_); i != e; ++i) {
|
e = RC->allocation_order_end(*mf_); i != e; ++i) {
|
||||||
@ -582,7 +582,7 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
|
|||||||
// if the current has the minimum weight, we need to spill it and
|
// if the current has the minimum weight, we need to spill it and
|
||||||
// add any added intervals back to unhandled, and restart
|
// add any added intervals back to unhandled, and restart
|
||||||
// linearscan.
|
// linearscan.
|
||||||
if (cur->weight != float(HUGE_VAL) && cur->weight <= minWeight) {
|
if (cur->weight != HUGE_VALF && cur->weight <= minWeight) {
|
||||||
DEBUG(std::cerr << "\t\t\tspilling(c): " << *cur << '\n';);
|
DEBUG(std::cerr << "\t\t\tspilling(c): " << *cur << '\n';);
|
||||||
int slot = vrm_->assignVirt2StackSlot(cur->reg);
|
int slot = vrm_->assignVirt2StackSlot(cur->reg);
|
||||||
std::vector<LiveInterval*> added =
|
std::vector<LiveInterval*> added =
|
||||||
|
Loading…
Reference in New Issue
Block a user