LLVM API Documentation
#include "llvm/Analysis/Passes.h"#include "llvm/Pass.h"#include "llvm/Function.h"#include "llvm/Support/InstVisitor.h"#include "llvm/ADT/Statistic.h"#include <iostream>#include "llvm/Instruction.def"Include dependency graph for InstCount.cpp:

Go to the source code of this file.
Defines | |
| #define | HANDLE_INST(N, OPCODE, CLASS) Statistic<> Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts"); |
| #define | HANDLE_INST(N, OPCODE, CLASS) void visit##OPCODE(CLASS &) { ++Num##OPCODE##Inst; ++TotalInsts; } |
Functions | |
| HANDLE_MEMORY_INST (21, Malloc, MallocInst) HANDLE_MEMORY_INST(23 | |
| AllocaInst PHINode | HANDLE_OTHER_INST (28, Cast, CastInst) HANDLE_OTHER_INST(29 |
| AllocaInst PHINode CallInst | HANDLE_OTHER_INST (30, Shl, ShiftInst) HANDLE_OTHER_INST(34 |
| AllocaInst PHINode CallInst SelectInst | HANDLE_OTHER_INST (35, UserOp1, Instruction) HANDLE_OTHER_INST(37 |
| AllocaInst PHINode CallInst SelectInst VAArgInst | HANDLE_OTHER_INST (38, ExtractElement, ExtractElementInst) HANDLE_OTHER_INST(39 |
| AllocaInst PHINode CallInst SelectInst VAArgInst InsertElementInst | HANDLE_OTHER_INST (40, ShuffleVector, ShuffleVectorInst) class InstCount |
| FunctionPass * | llvm::createInstCountPass () |
Variables | |
| Statistic | TotalInsts ("instcount","Number of instructions (of all types)") |
| Statistic | TotalBlocks ("instcount","Number of basic blocks") |
| Statistic | TotalFuncs ("instcount","Number of non-external functions") |
| Statistic | TotalMemInst ("instcount","Number of memory instructions") |
| Alloca | |
| AllocaInst | HANDLE_MEMORY_INST (24, Load, LoadInst) HANDLE_OTHER_INST(27 |
| AllocaInst | PHI |
| AllocaInst PHINode | Call |
| AllocaInst PHINode CallInst | Select |
| AllocaInst PHINode CallInst SelectInst | VAArg |
| AllocaInst PHINode CallInst SelectInst VAArgInst | InsertElement |
| RegisterAnalysis< InstCount > | X ("instcount","Counts the various types of Instructions") |
| #define HANDLE_INST | ( | N, | |||
| OPCODE, | |||||
| CLASS | ) | void visit##OPCODE(CLASS &) { ++Num##OPCODE##Inst; ++TotalInsts; } |
Definition at line 28 of file InstCount.cpp.
| #define HANDLE_INST | ( | N, | |||
| OPCODE, | |||||
| CLASS | ) | Statistic<> Num##OPCODE##Inst("instcount", "Number of " #OPCODE " insts"); |
Definition at line 28 of file InstCount.cpp.
| @237::HANDLE_MEMORY_INST | ( | 21 | , | |
| Malloc | , | |||
| MallocInst | ||||
| ) | [static] |
| AllocaInst PHINode CallInst SelectInst VAArgInst InsertElementInst @237::HANDLE_OTHER_INST | ( | 40 | , | |
| ShuffleVector | , | |||
| ShuffleVectorInst | ||||
| ) | [static] |
Definition at line 170 of file InstCount.cpp.
| AllocaInst PHINode CallInst SelectInst VAArgInst @237::HANDLE_OTHER_INST | ( | 38 | , | |
| ExtractElement | , | |||
| ExtractElementInst | ||||
| ) | [static] |
| AllocaInst PHINode CallInst SelectInst @237::HANDLE_OTHER_INST | ( | 35 | , | |
| UserOp1 | , | |||
| Instruction | ||||
| ) | [static] |
| AllocaInst PHINode CallInst @237::HANDLE_OTHER_INST | ( | 30 | , | |
| Shl | , | |||
| ShiftInst | ||||
| ) | [static] |
| AllocaInst PHINode @237::HANDLE_OTHER_INST | ( | 28 | , | |
| Cast | , | |||
| CastInst | ||||
| ) | [static] |
Alloca [static] |
Definition at line 147 of file InstCount.cpp.
Referenced by isUnmovableInstruction(), and TraceThisOpCode().
AllocaInst PHINode Call [static] |
Definition at line 157 of file InstCount.cpp.
Referenced by CallPassesValueThoughVararg(), ConstantFold(), ConvertOperandToType(), isUnmovableInstruction(), and OperandConvertibleToType().
AllocaInst HANDLE_MEMORY_INST(24, Load, LoadInst)HANDLE_OTHER_INST(27 [static] |
AllocaInst PHI [static] |
Definition at line 155 of file InstCount.cpp.
Referenced by ConvertOperandToType(), getConstantEvolvingPHI(), getNextStopPoint(), llvm::X86TargetLowering::InsertAtEndOfBasicBlock(), llvm::PPCTargetLowering::InsertAtEndOfBasicBlock(), isUnmovableInstruction(), OperandConvertibleToType(), ResolveDefinitions(), and TraceThisOpCode().
AllocaInst PHINode CallInst Select [static] |
Definition at line 163 of file InstCount.cpp.
Referenced by ComputeMaskedBits(), and ConstantFold().
Statistic TotalBlocks("instcount","Number of basic blocks") [static] |
Statistic TotalFuncs("instcount","Number of non-external functions") [static] |
Statistic TotalInsts("instcount","Number of instructions (of all types)") [static] |
Statistic TotalMemInst("instcount","Number of memory instructions") [static] |
AllocaInst PHINode CallInst SelectInst VAArg [static] |
Definition at line 167 of file InstCount.cpp.
RegisterAnalysis<InstCount> X("instcount","Counts the various types of Instructions") [static] |