23#define DEBUG_TYPE "instcount"
25STATISTIC(TotalInsts,
"Number of instructions (of all types)");
27STATISTIC(TotalFuncs,
"Number of non-external functions");
29#define HANDLE_INST(N, OPCODE, CLASS) \
30 STATISTIC(Num##OPCODE##Inst, "Number of " #OPCODE " insts");
32#include "llvm/IR/Instruction.def"
41#define HANDLE_INST(N, OPCODE, CLASS) \
42 void visit##OPCODE(CLASS &) { \
43 ++Num##OPCODE##Inst; \
47#include "llvm/IR/Instruction.def"
50 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 &)