LLVM: include/llvm/Analysis/CodeMetrics.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14#ifndef LLVM_ANALYSIS_CODEMETRICS_H
15#define LLVM_ANALYSIS_CODEMETRICS_H
16
20
21namespace llvm {
29
31
32
33
35
36
38
39
41
42
43
44
45
47
48
50
51
53
54
56
57
59
60
62
63
65
66
67
68
69
71
72
73
74
76
77
79
80
84 bool PrepareForLTO = false, const Loop *L = nullptr);
85
86
87
91
92
93
97};
98
99}
100
101#endif
This file defines the DenseMap class.
This file defines an InstructionCost class that is used when calculating the cost of an instruction,...
A cache of @llvm.assume calls within a function.
LLVM Basic Block Representation.
Represents a single loop in the control flow graph.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
ConvergenceKind
Definition CodeMetrics.h:30
@ Uncontrolled
Definition CodeMetrics.h:30
@ None
Definition CodeMetrics.h:30
@ Controlled
Definition CodeMetrics.h:30
@ ExtendedLoop
Definition CodeMetrics.h:30
Utility to calculate the size and a few similar metrics for a set of basic blocks.
Definition CodeMetrics.h:34
bool usesDynamicAlloca
True if this function calls alloca (in the C sense).
Definition CodeMetrics.h:52
unsigned NumBlocks
Number of analyzed blocks.
Definition CodeMetrics.h:58
ConvergenceKind Convergence
The kind of convergence specified in this function.
Definition CodeMetrics.h:49
bool notDuplicatable
True if this function cannot be duplicated.
Definition CodeMetrics.h:46
unsigned NumInlineCandidates
The number of calls to internal functions with a single caller.
Definition CodeMetrics.h:70
bool isRecursive
True if this function calls itself.
Definition CodeMetrics.h:40
static LLVM_ABI void collectEphemeralValues(const Loop *L, AssumptionCache *AC, SmallPtrSetImpl< const Value * > &EphValues)
Collect a loop's ephemeral values (those used only by an assume or similar intrinsics in the loop).
unsigned NumRets
How many 'ret' instructions the blocks contain.
Definition CodeMetrics.h:78
bool exposesReturnsTwice
True if this function contains a call to setjmp or other functions with attribute "returns twice" wit...
Definition CodeMetrics.h:37
DenseMap< const BasicBlock *, InstructionCost > NumBBInsts
Keeps track of basic block code size estimates.
Definition CodeMetrics.h:61
LLVM_ABI void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI, const SmallPtrSetImpl< const Value * > &EphValues, bool PrepareForLTO=false, const Loop *L=nullptr)
Add information about a block to the current state.
unsigned NumCalls
Keep track of the number of calls to 'big' functions.
Definition CodeMetrics.h:64
unsigned NumVectorInsts
How many instructions produce vector values.
Definition CodeMetrics.h:75
InstructionCost NumInsts
Code size cost of the analyzed blocks.
Definition CodeMetrics.h:55