22#define DEBUG_TYPE "instcount"
24STATISTIC(TotalInsts,
"Number of instructions (of all types)");
26STATISTIC(TotalFuncs,
"Number of non-external functions");
28#define HANDLE_INST(N, OPCODE, CLASS) \
29 STATISTIC(Num##OPCODE##Inst, "Number of " #OPCODE " insts");
31#include "llvm/IR/Instruction.def"
40#define HANDLE_INST(N, OPCODE, CLASS) \
41 void visit##OPCODE(CLASS &) { \
42 ++Num##OPCODE##Inst; \
46#include "llvm/IR/Instruction.def"
49 errs() <<
"Instruction Count does not know about " <<
I;
FunctionAnalysisManager FAM
This file defines the 'Statistic' class, which is designed to be an easy way to expose various metric...
#define STATISTIC(VARNAME, DESC)
A container for analyses that lazily runs them and caches their results.
LLVM Basic Block Representation.
Base class for instruction visitors.
void visitFunction(Function &F)
void visitBasicBlock(BasicBlock &BB)
void visitInstruction(Instruction &I)
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
raw_fd_ostream & errs()
This returns a reference to a raw_ostream for standard error.
PreservedAnalyses run(Function &F, FunctionAnalysisManager &)