mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-08 21:32:39 +00:00
Apply Chris' suggestions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@43069 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7ef1a4bf04
commit
a5bfc97da7
@ -167,7 +167,7 @@ namespace llvm {
|
||||
/// is live in any MBB returns true as well as the list of basic blocks
|
||||
/// where the value is live in.
|
||||
bool findLiveInMBBs(const LiveRange &LR,
|
||||
SmallVector<MachineBasicBlock*, 4> &MBBs) const;
|
||||
SmallVectorImpl<MachineBasicBlock*> &MBBs) const;
|
||||
|
||||
// Interval creation
|
||||
|
||||
|
@ -817,7 +817,7 @@ void LiveIntervals::computeIntervals() {
|
||||
}
|
||||
|
||||
bool LiveIntervals::findLiveInMBBs(const LiveRange &LR,
|
||||
SmallVector<MachineBasicBlock*, 4> &MBBs) const {
|
||||
SmallVectorImpl<MachineBasicBlock*> &MBBs) const {
|
||||
std::vector<IdxMBBPair>::const_iterator I =
|
||||
std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), LR.start);
|
||||
|
||||
|
@ -290,6 +290,7 @@ void RALinScan::linearScan()
|
||||
|
||||
// Add live-ins to every BB except for entry.
|
||||
MachineFunction::iterator EntryMBB = mf_->begin();
|
||||
SmallVector<MachineBasicBlock*, 8> LiveInMBBs;
|
||||
for (LiveIntervals::iterator i = li_->begin(), e = li_->end(); i != e; ++i) {
|
||||
const LiveInterval &cur = i->second;
|
||||
unsigned Reg = 0;
|
||||
@ -302,11 +303,11 @@ void RALinScan::linearScan()
|
||||
for (LiveInterval::Ranges::const_iterator I = cur.begin(), E = cur.end();
|
||||
I != E; ++I) {
|
||||
const LiveRange &LR = *I;
|
||||
SmallVector<MachineBasicBlock*, 4> LiveInMBBs;
|
||||
if (li_->findLiveInMBBs(LR, LiveInMBBs)) {
|
||||
for (unsigned i = 0, e = LiveInMBBs.size(); i != e; ++i)
|
||||
if (LiveInMBBs[i] != EntryMBB)
|
||||
LiveInMBBs[i]->addLiveIn(Reg);
|
||||
LiveInMBBs.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user