mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-13 23:18:51 +00:00
Add live-ins to every BB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@34342 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3481657da6
commit
9fc508fdc4
@ -291,6 +291,26 @@ void RA::linearScan()
|
||||
i = IntervalPtrs::reverse_iterator(inactive_.erase(i.base()-1));
|
||||
}
|
||||
|
||||
// A brute force way of adding live-ins to every BB.
|
||||
for (MachineFunction::iterator MBB = mf_->begin(), E = mf_->end();
|
||||
MBB != E; ++MBB) {
|
||||
unsigned StartIdx = li_->getMBBStartIdx(MBB->getNumber());
|
||||
for (IntervalPtrs::iterator i = fixed_.begin(), e = fixed_.end();
|
||||
i != e; ++i)
|
||||
if (i->first->liveAt(StartIdx))
|
||||
MBB->addLiveIn(i->first->reg);
|
||||
|
||||
for (unsigned i = 0, e = handled_.size(); i != e; ++i) {
|
||||
LiveInterval *HI = handled_[i];
|
||||
if (HI->liveAt(StartIdx)) {
|
||||
unsigned Reg = HI->reg;
|
||||
if (MRegisterInfo::isVirtualRegister(Reg))
|
||||
Reg = vrm_->getPhys(Reg);
|
||||
MBB->addLiveIn(Reg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DOUT << *vrm_;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user