Add # of printed instructions statistic to both the SPARC and X86 LLC backends.

llvm-svn: 8892
diff --git a/llvm/lib/Target/Sparc/EmitAssembly.cpp b/llvm/lib/Target/Sparc/EmitAssembly.cpp
index ec85038..029935d 100644
--- a/llvm/lib/Target/Sparc/EmitAssembly.cpp
+++ b/llvm/lib/Target/Sparc/EmitAssembly.cpp
@@ -21,11 +21,14 @@
 #include "llvm/Pass.h"
 #include "llvm/Assembly/Writer.h"
 #include "Support/StringExtras.h"
+#include "Support/Statistic.h"
 #include "SparcInternals.h"
 #include <string>
 
 namespace {
 
+Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+
 class GlobalIdTable: public Annotation {
   static AnnotationID AnnotId;
   friend class AsmPrinter;              // give access to AnnotId
@@ -483,7 +486,6 @@
     toAsm << ")";
 }
 
-
 void
 SparcFunctionAsmPrinter::emitMachineInst(const MachineInstr *MI)
 {
@@ -507,6 +509,7 @@
       N = 1;
   
   toAsm << "\n";
+  ++EmittedInsts;
 }
 
 void