[llvm-commits] [llvm] r102843 - /llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Dale Johannesen
dalej at apple.com
Sat May 1 09:41:11 PDT 2010
Author: johannes
Date: Sat May 1 11:41:11 2010
New Revision: 102843
URL: http://llvm.org/viewvc/llvm-project?rev=102843&view=rev
Log:
Don't count debug info as instructions. This was
preventing the emission of the NOP on Darwin for a
function with no actual code. From timberwolfmc
with TEST=optllcdbg.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=102843&r1=102842&r2=102843&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Sat May 1 11:41:11 2010
@@ -558,7 +558,8 @@
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
II != IE; ++II) {
// Print the assembly for the instruction.
- if (!II->isLabel() && !II->isImplicitDef() && !II->isKill()) {
+ if (!II->isLabel() && !II->isImplicitDef() && !II->isKill() &&
+ !II->isDebugValue()) {
HasAnyRealCode = true;
++EmittedInsts;
}
More information about the llvm-commits
mailing list