aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/X86/X86AsmPrinter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/X86/X86AsmPrinter.cpp')
-rw-r--r--lib/Target/X86/X86AsmPrinter.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/Target/X86/X86AsmPrinter.cpp b/lib/Target/X86/X86AsmPrinter.cpp
index d36f298..fbc6b6e 100644
--- a/lib/Target/X86/X86AsmPrinter.cpp
+++ b/lib/Target/X86/X86AsmPrinter.cpp
@@ -18,10 +18,13 @@
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Support/Mangler.h"
+#include "Support/Statistic.h"
#include "Support/StringExtras.h"
#include "Support/CommandLine.h"
namespace {
+ Statistic<> EmittedInsts("asm-printer", "Number of machine instrs printed");
+
// FIXME: This should be automatically picked up by autoconf from the C
// frontend
cl::opt<bool> EmitCygwin("enable-cygwin-compatible-output", cl::Hidden,
@@ -573,6 +576,7 @@ void Printer::printMachineInstruction(const MachineInstr *MI) {
const TargetInstrInfo &TII = TM.getInstrInfo();
const TargetInstrDescriptor &Desc = TII.get(Opcode);
+ ++EmittedInsts;
switch (Desc.TSFlags & X86II::FormMask) {
case X86II::Pseudo:
// Print pseudo-instructions as comments; either they should have been