mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-14 14:24:05 +00:00
Rename Interval class to LiveInterval to avoid conflicting with the already
existing llvm::Interval class. Patch contributed by Vladimir Prus! http://mail.cs.uiuc.edu/pipermail/llvmbugs/2004-June/000710.html git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@14281 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -39,7 +39,7 @@ namespace {
|
||||
const TargetMachine* tm_;
|
||||
const MRegisterInfo* mri_;
|
||||
LiveIntervals* li_;
|
||||
typedef std::list<Interval*> IntervalPtrs;
|
||||
typedef std::list<LiveInterval*> IntervalPtrs;
|
||||
IntervalPtrs unhandled_, fixed_, active_, inactive_, handled_;
|
||||
|
||||
std::auto_ptr<PhysRegTracker> prt_;
|
||||
@ -374,12 +374,12 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
||||
if (cur->weight <= minWeight) {
|
||||
DEBUG(std::cerr << "\t\t\tspilling(c): " << *cur << '\n';);
|
||||
int slot = vrm_->assignVirt2StackSlot(cur->reg);
|
||||
std::vector<Interval*> added =
|
||||
std::vector<LiveInterval*> added =
|
||||
li_->addIntervalsForSpills(*cur, *vrm_, slot);
|
||||
|
||||
// merge added with unhandled
|
||||
std::vector<Interval*>::iterator addedIt = added.begin();
|
||||
std::vector<Interval*>::iterator addedItEnd = added.end();
|
||||
std::vector<LiveInterval*>::iterator addedIt = added.begin();
|
||||
std::vector<LiveInterval*>::iterator addedItEnd = added.end();
|
||||
for (IntervalPtrs::iterator i = unhandled_.begin(), e = unhandled_.end();
|
||||
i != e && addedIt != addedItEnd; ++i) {
|
||||
if ((*i)->start() > (*addedIt)->start())
|
||||
@ -399,7 +399,7 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
||||
// otherwise we spill all intervals aliasing the register with
|
||||
// minimum weight, rollback to the interval with the earliest
|
||||
// start point and let the linear scan algorithm run again
|
||||
std::vector<Interval*> added;
|
||||
std::vector<LiveInterval*> added;
|
||||
assert(MRegisterInfo::isPhysicalRegister(minReg) &&
|
||||
"did not choose a register to spill?");
|
||||
std::vector<bool> toSpill(mri_->getNumRegs(), false);
|
||||
@ -418,7 +418,7 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
||||
DEBUG(std::cerr << "\t\t\tspilling(a): " << **i << '\n');
|
||||
earliestStart = std::min(earliestStart, (*i)->start());
|
||||
int slot = vrm_->assignVirt2StackSlot((*i)->reg);
|
||||
std::vector<Interval*> newIs =
|
||||
std::vector<LiveInterval*> newIs =
|
||||
li_->addIntervalsForSpills(**i, *vrm_, slot);
|
||||
std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
|
||||
spilled.insert(reg);
|
||||
@ -433,7 +433,7 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
||||
DEBUG(std::cerr << "\t\t\tspilling(i): " << **i << '\n');
|
||||
earliestStart = std::min(earliestStart, (*i)->start());
|
||||
int slot = vrm_->assignVirt2StackSlot((*i)->reg);
|
||||
std::vector<Interval*> newIs =
|
||||
std::vector<LiveInterval*> newIs =
|
||||
li_->addIntervalsForSpills(**i, *vrm_, slot);
|
||||
std::copy(newIs.begin(), newIs.end(), std::back_inserter(added));
|
||||
spilled.insert(reg);
|
||||
@ -496,10 +496,10 @@ void RA::assignRegOrStackSlotAtInterval(IntervalPtrs::value_type cur)
|
||||
}
|
||||
}
|
||||
|
||||
std::sort(added.begin(), added.end(), less_ptr<Interval>());
|
||||
std::sort(added.begin(), added.end(), less_ptr<LiveInterval>());
|
||||
// merge added with unhandled
|
||||
std::vector<Interval*>::iterator addedIt = added.begin();
|
||||
std::vector<Interval*>::iterator addedItEnd = added.end();
|
||||
std::vector<LiveInterval*>::iterator addedIt = added.begin();
|
||||
std::vector<LiveInterval*>::iterator addedItEnd = added.end();
|
||||
for (IntervalPtrs::iterator i = unhandled_.begin(), e = unhandled_.end();
|
||||
i != e && addedIt != addedItEnd; ++i) {
|
||||
if ((*i)->start() > (*addedIt)->start())
|
||||
|
Reference in New Issue
Block a user