summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJim Laskey <jlaskey@mac.com>2007-02-21 22:41:17 +0000
committerJim Laskey <jlaskey@mac.com>2007-02-21 22:41:17 +0000
commit5b2b7c10246774e3d2db1f1355fa26c0f9da4efb (patch)
treedef254c80e48dc6ab8474f2cccdeda780c2fdf80 /llvm/lib
parentdbe2491c44908c3d5c5a146a0a6f7db56bbf427e (diff)
downloadbcm5719-llvm-5b2b7c10246774e3d2db1f1355fa26c0f9da4efb.tar.gz
bcm5719-llvm-5b2b7c10246774e3d2db1f1355fa26c0f9da4efb.zip
Allow for live in registers for eh landing pads.
llvm-svn: 34475
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/LiveIntervalAnalysis.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
index 85ff1c182dc..29c095a1aa4 100644
--- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -658,14 +658,15 @@ void LiveIntervals::handleRegisterDef(MachineBasicBlock *MBB,
}
void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB,
+ unsigned MIIdx,
LiveInterval &interval) {
DOUT << "\t\tlivein register: "; DEBUG(printRegName(interval.reg));
// Look for kills, if it reaches a def before it's killed, then it shouldn't
// be considered a livein.
MachineBasicBlock::iterator mi = MBB->begin();
- unsigned baseIndex = 0;
- unsigned start = 0;
+ unsigned baseIndex = MIIdx;
+ unsigned start = baseIndex;
unsigned end = start;
while (mi != MBB->end()) {
if (lv_->KillsRegister(mi, interval.reg)) {
@@ -690,8 +691,8 @@ exit:
assert(start < end && "did not find end of interval?");
LiveRange LR(start, end, interval.getNextValue(~0U, 0));
- interval.addRange(LR);
DOUT << " +" << LR << '\n';
+ interval.addRange(LR);
}
/// computeIntervals - computes the live intervals for virtual
@@ -715,9 +716,9 @@ void LiveIntervals::computeIntervals() {
// Create intervals for live-ins to this BB first.
for (MachineBasicBlock::const_livein_iterator LI = MBB->livein_begin(),
LE = MBB->livein_end(); LI != LE; ++LI) {
- handleLiveInRegister(MBB, getOrCreateInterval(*LI));
+ handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*LI));
for (const unsigned* AS = mri_->getAliasSet(*LI); *AS; ++AS)
- handleLiveInRegister(MBB, getOrCreateInterval(*AS));
+ handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS));
}
}
OpenPOWER on IntegriCloud