Don't blindly set the debug location for PHI node copies.

llvm-svn: 90637
This commit is contained in:
Dan Gohman 2009-12-05 01:29:04 +00:00
parent 18f94469dc
commit c82272a7b6
1 changed files with 3 additions and 3 deletions

View File

@ -769,9 +769,6 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
FastIS->startNewBlock(BB);
// Do FastISel on as many instructions as possible.
for (; BI != End; ++BI) {
if (MDDbgKind)
SetDebugLoc(MDDbgKind, TheMetadata, BI, SDB, FastIS, &MF);
// Just before the terminator instruction, insert instructions to
// feed PHI nodes in successor blocks.
if (isa<TerminatorInst>(BI))
@ -786,6 +783,9 @@ void SelectionDAGISel::SelectAllBasicBlocks(Function &Fn,
break;
}
if (MDDbgKind)
SetDebugLoc(MDDbgKind, TheMetadata, BI, SDB, FastIS, &MF);
// First try normal tablegen-generated "fast" selection.
if (FastIS->SelectInstruction(BI)) {
ResetDebugLoc(SDB, FastIS);