|
LLVM
8.0.1
|
#include "llvm/ADT/Statistic.h"#include "llvm/Analysis/Passes.h"#include "llvm/IR/Function.h"#include "llvm/IR/InstVisitor.h"#include "llvm/Pass.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "llvm/Support/raw_ostream.h"#include "llvm/IR/Instruction.def"
Go to the source code of this file.
Macros | |
| #define | DEBUG_TYPE "instcount" |
| #define | HANDLE_INST(N, OPCODE, CLASS) STATISTIC(Num ## OPCODE ## Inst, "Number of " #OPCODE " insts"); |
| #define | HANDLE_INST(N, OPCODE, CLASS) void visit##OPCODE(CLASS &) { ++Num##OPCODE##Inst; ++TotalInsts; } |
Functions | |
| STATISTIC (TotalInsts, "Number of instructions (of all types)") | |
| STATISTIC (TotalBlocks, "Number of basic blocks") | |
| STATISTIC (TotalFuncs, "Number of non-external functions") | |
| INITIALIZE_PASS (InstCount, "instcount", "Counts the various types of Instructions", false, true) FunctionPass *llvm | |
| #define DEBUG_TYPE "instcount" |
Definition at line 24 of file InstCount.cpp.
| #define HANDLE_INST | ( | N, | |
| OPCODE, | |||
| CLASS | |||
| ) | STATISTIC(Num ## OPCODE ## Inst, "Number of " #OPCODE " insts"); |
Definition at line 42 of file InstCount.cpp.
| #define HANDLE_INST | ( | N, | |
| OPCODE, | |||
| CLASS | |||
| ) | void visit##OPCODE(CLASS &) { ++Num##OPCODE##Inst; ++TotalInsts; } |
Definition at line 42 of file InstCount.cpp.
| INITIALIZE_PASS | ( | InstCount | , |
| "instcount" | , | ||
| "Counts the various types of Instructions" | , | ||
| false | , | ||
| true | |||
| ) |
Definition at line 68 of file InstCount.cpp.
References F(), runOnFunction(), and llvm::InstVisitor< SubClass, RetTy >::visit().
| STATISTIC | ( | TotalInsts | , |
| "Number of instructions (of all types)" | |||
| ) |
| STATISTIC | ( | TotalBlocks | , |
| "Number of basic blocks" | |||
| ) |
| STATISTIC | ( | TotalFuncs | , |
| "Number of non-external functions" | |||
| ) |
1.8.13