Go to the documentation of this file.
14 #ifndef LLVM_ANALYSIS_CODEMETRICS_H
15 #define LLVM_ANALYSIS_CODEMETRICS_H
21 class AssumptionCache;
25 template <
class T>
class SmallPtrSetImpl;
26 class TargetTransformInfo;
80 bool PrepareForLTO =
false);
InstructionCost NumInsts
Code size cost of the analyzed blocks.
This is an optimization pass for GlobalISel generic memory operations.
Represents a single loop in the control flow graph.
Utility to calculate the size and a few similar metrics for a set of basic blocks.
LLVM Basic Block Representation.
bool convergent
True if this function contains a call to a convergent function.
bool usesDynamicAlloca
True if this function calls alloca (in the C sense).
static 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 NumBlocks
Number of analyzed blocks.
DenseMap< const BasicBlock *, InstructionCost > NumBBInsts
Keeps track of basic block code size estimates.
bool notDuplicatable
True if this function cannot be duplicated.
@ BasicBlock
Various leaf nodes.
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI, const SmallPtrSetImpl< const Value * > &EphValues, bool PrepareForLTO=false)
Add information about a block to the current state.
bool isRecursive
True if this function calls itself.
A cache of @llvm.assume calls within a function.
unsigned NumCalls
Keep track of the number of calls to 'big' functions.
unsigned NumRets
How many 'ret' instructions the blocks contain.
bool exposesReturnsTwice
True if this function contains a call to setjmp or other functions with attribute "returns twice" wit...
unsigned NumVectorInsts
How many instructions produce vector values.
Common register allocation spilling lr str ldr sxth r3 ldr mla r4 can lr mov lr str ldr sxth r3 mla r4 and then merge mul and lr str ldr sxth r3 mla r4 It also increase the likelihood the store may become dead bb27 Successors according to LLVM BB
unsigned NumInlineCandidates
The number of calls to internal functions with a single caller.