[llvm-commits] [llvm] r102463 - in /llvm/trunk/lib/CodeGen: AsmPrinter/DwarfDebug.cpp SelectionDAG/SelectionDAGBuilder.cpp
Devang Patel
dpatel at apple.com
Tue Apr 27 13:54:45 PDT 2010
Author: dpatel
Date: Tue Apr 27 15:54:45 2010
New Revision: 102463
URL: http://llvm.org/viewvc/llvm-project?rev=102463&view=rev
Log:
Ignore DBG_VALUE instructions that points to undef values.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=102463&r1=102462&r2=102463&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Apr 27 15:54:45 2010
@@ -2081,6 +2081,11 @@
// FIXME : Lift this restriction.
if (MInsn->getNumOperands() != 3)
continue;
+
+ // Ignore Undef values.
+ if (!MInsn->getOperand(0).getReg())
+ continue;
+
DIVariable DV(
const_cast<MDNode *>(MInsn->getOperand(MInsn->getNumOperands() - 1)
.getMetadata()));
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp?rev=102463&r1=102462&r2=102463&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp Tue Apr 27 15:54:45 2010
@@ -3834,15 +3834,10 @@
return 0;
DAG.AddDbgValue(SDV, N.getNode(), isParameter);
} else {
- // Generating Undefs here seems to be actively harmful because it
- // affects the line numbers.
- return 0;
-#if 0
// This isn't useful, but it shows what we're missing.
SDV = DAG.getDbgValue(Variable, UndefValue::get(Address->getType()),
0, dl, SDNodeOrder);
DAG.AddDbgValue(SDV, 0, isParameter);
-#endif
}
return 0;
}
More information about the llvm-commits
mailing list