Should be more careful. The previously applied change made all counts

outside of loops = 0.

llvm-svn: 11085
This commit is contained in:
Alkis Evlogimenos 2004-02-02 20:29:57 +00:00
parent bcade4b8e6
commit 86ff30deab
1 changed files with 6 additions and 10 deletions

View File

@ -109,17 +109,13 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
const MachineBasicBlock* mbb = mbbi;
unsigned loopDepth = loopInfo.getLoopDepth(mbb->getBasicBlock());
if (loopDepth) {
for (MachineBasicBlock::const_iterator mii = mbb->begin(),
mie = mbb->end(); mii != mie; ++mii) {
MachineInstr* mi = *mii;
for (int i = mi->getNumOperands() - 1; i >= 0; --i) {
MachineOperand& mop = mi->getOperand(i);
if (!mop.isVirtualRegister())
continue;
for (MachineBasicBlock::const_iterator mii = mbb->begin(),
mie = mbb->end(); mii != mie; ++mii) {
MachineInstr* mi = *mii;
for (int i = mi->getNumOperands() - 1; i >= 0; --i) {
MachineOperand& mop = mi->getOperand(i);
if (mop.isVirtualRegister()) {
unsigned reg = mop.getAllocatedRegNum();
Reg2IntervalMap::iterator r2iit = r2iMap_.find(reg);
assert(r2iit != r2iMap_.end());