aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Target/SparcV9')
-rw-r--r--lib/Target/SparcV9/SparcV9AsmPrinter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp b/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
index ec85038..029935d 100644
--- a/lib/Target/SparcV9/SparcV9AsmPrinter.cpp
+++ b/lib/Target/SparcV9/SparcV9AsmPrinter.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 @@ SparcFunctionAsmPrinter::printOneOperand(const MachineOperand &mop,
toAsm << ")";
}
-
void
SparcFunctionAsmPrinter::emitMachineInst(const MachineInstr *MI)
{
@@ -507,6 +509,7 @@ SparcFunctionAsmPrinter::emitMachineInst(const MachineInstr *MI)
N = 1;
toAsm << "\n";
+ ++EmittedInsts;
}
void