Skip DEBUG_VALUE in some places where it was affecting codegen.

llvm-svn: 95647
This commit is contained in:
Dale Johannesen 2010-02-09 02:01:46 +00:00
parent d381c20ee7
commit cfb0894dba
3 changed files with 9 additions and 0 deletions

View File

@ -64,6 +64,9 @@ bool CalculateSpillWeights::runOnMachineFunction(MachineFunction &fn) {
if (mi->getOpcode() == TargetInstrInfo::IMPLICIT_DEF)
continue;
if (mi->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
continue;
for (unsigned i = 0, e = mi->getNumOperands(); i != e; ++i) {
const MachineOperand &mopi = mi->getOperand(i);
if (!mopi.isReg() || mopi.getReg() == 0)

View File

@ -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->getOpcode()==TargetInstrInfo::DEBUG_VALUE)
continue;
DistanceMap.insert(std::make_pair(MI, Dist++));
// Process all of the operands of the instruction...

View File

@ -318,6 +318,8 @@ bool TwoAddressInstructionPass::NoUseAfterLastDef(unsigned Reg,
MachineInstr *MI = MO.getParent();
if (MI->getParent() != MBB)
continue;
if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
continue;
DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
if (DI == DistanceMap.end())
continue;
@ -341,6 +343,8 @@ MachineInstr *TwoAddressInstructionPass::FindLastUseInMBB(unsigned Reg,
MachineInstr *MI = MO.getParent();
if (MI->getParent() != MBB)
continue;
if (MI->getOpcode() == TargetInstrInfo::DEBUG_VALUE)
continue;
DenseMap<MachineInstr*, unsigned>::iterator DI = DistanceMap.find(MI);
if (DI == DistanceMap.end())
continue;