[llvm-commits] [llvm] r102453 - in /llvm/trunk: lib/CodeGen/AsmPrinter/AsmPrinter.cpp test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
Evan Cheng
evan.cheng at apple.com
Tue Apr 27 12:38:45 PDT 2010
Author: evancheng
Date: Tue Apr 27 14:38:45 2010
New Revision: 102453
URL: http://llvm.org/viewvc/llvm-project?rev=102453&view=rev
Log:
Do not count kill, implicit_def instructions as printed instructions.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=102453&r1=102452&r2=102453&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Tue Apr 27 14:38:45 2010
@@ -531,11 +531,11 @@
for (MachineBasicBlock::const_iterator II = I->begin(), IE = I->end();
II != IE; ++II) {
// Print the assembly for the instruction.
- if (!II->isLabel())
+ if (!II->isLabel() && !II->isImplicitDef() && !II->isKill()) {
HasAnyRealCode = true;
-
- ++EmittedInsts;
-
+ ++EmittedInsts;
+ }
+
if (ShouldPrintDebugScopes) {
if (TimePassesIsEnabled) {
NamedRegionTimer T(DbgTimerName, DWARFGroupName);
Modified: llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll?rev=102453&r1=102452&r2=102453&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll (original)
+++ llvm/trunk/test/CodeGen/X86/convert-2-addr-3-addr-inc64.ll Tue Apr 27 14:38:45 2010
@@ -1,5 +1,5 @@
; RUN: llc < %s -march=x86-64 -o %t -stats -info-output-file - | \
-; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 10
+; RUN: grep {asm-printer} | grep {Number of machine instrs printed} | grep 9
; RUN: grep {leal 1(\%rsi),} %t
define fastcc zeroext i8 @fullGtU(i32 %i1, i32 %i2, i8* %ptr) nounwind optsize {
More information about the llvm-commits
mailing list