diff options
| author | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 | 
|---|---|---|
| committer | Roman Divacky <rdivacky@FreeBSD.org> | 2010-02-16 09:30:23 +0000 | 
| commit | 6fe5c7aa327e188b7176daa5595bbf075a6b94df (patch) | |
| tree | 4cfca640904d1896e25032757a61f8959c066919 /lib/CodeGen/LiveVariables.cpp | |
| parent | 989df958a10f0beb90b89ccadd8351cbe51d90b1 (diff) | |
Notes
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
| -rw-r--r-- | lib/CodeGen/LiveVariables.cpp | 9 | 
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp index b44a2202e764..8a124dc79bdd 100644 --- a/lib/CodeGen/LiveVariables.cpp +++ b/lib/CodeGen/LiveVariables.cpp @@ -543,6 +543,8 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) {      for (MachineBasicBlock::iterator I = MBB->begin(), E = MBB->end();           I != E; ++I) {        MachineInstr *MI = I; +      if (MI->isDebugValue()) +        continue;        DistanceMap.insert(std::make_pair(MI, Dist++));        // Process all of the operands of the instruction... @@ -550,7 +552,7 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &mf) {        // Unless it is a PHI node.  In this case, ONLY process the DEF, not any        // of the uses.  They will be handled in other basic blocks. -      if (MI->getOpcode() == TargetInstrInfo::PHI) +      if (MI->isPHI())          NumOperandsToProcess = 1;        SmallVector<unsigned, 4> UseRegs; @@ -692,7 +694,7 @@ void LiveVariables::analyzePHINodes(const MachineFunction& Fn) {    for (MachineFunction::const_iterator I = Fn.begin(), E = Fn.end();         I != E; ++I)      for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end(); -         BBI != BBE && BBI->getOpcode() == TargetInstrInfo::PHI; ++BBI) +         BBI != BBE && BBI->isPHI(); ++BBI)        for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2)          PHIVarInfo[BBI->getOperand(i + 1).getMBB()->getNumber()]            .push_back(BBI->getOperand(i).getReg()); @@ -771,8 +773,7 @@ void LiveVariables::addNewBlock(MachineBasicBlock *BB,    // All registers used by PHI nodes in SuccBB must be live through BB.    for (MachineBasicBlock::const_iterator BBI = SuccBB->begin(), -         BBE = SuccBB->end(); -       BBI != BBE && BBI->getOpcode() == TargetInstrInfo::PHI; ++BBI) +         BBE = SuccBB->end(); BBI != BBE && BBI->isPHI(); ++BBI)      for (unsigned i = 1, e = BBI->getNumOperands(); i != e; i += 2)        if (BBI->getOperand(i+1).getMBB() == BB)          getVarInfo(BBI->getOperand(i).getReg()).AliveBlocks.set(NumNew);  | 
