mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
Add # of printed instructions statistic to both the SPARC and X86 LLC backends.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8892 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user