15 #ifndef LLVM_ANALYSIS_CODEMETRICS_H
16 #define LLVM_ANALYSIS_CODEMETRICS_H
23 class AssumptionCache;
29 class TargetTransformInfo;
bool convergent
True if this function contains a call to a convergent function.
bool isRecursive
True if this function calls itself.
unsigned NumVectorInsts
How many instructions produce vector values.
unsigned NumCalls
Keep track of the number of calls to 'big' functions.
A cache of .assume calls within a function.
unsigned NumInlineCandidates
The number of calls to internal functions with a single caller.
bool notDuplicatable
True if this function cannot be duplicated.
A templated base class for SmallPtrSet which provides the typesafe interface that is common across al...
unsigned NumBlocks
Number of analyzed blocks.
bool usesDynamicAlloca
True if this function calls alloca (in the C sense).
LLVM Basic Block Representation.
DenseMap< const BasicBlock *, unsigned > NumBBInsts
Keeps track of basic block code size estimates.
bool exposesReturnsTwice
True if this function contains a call to setjmp or other functions with attribute "returns twice" wit...
Utility to calculate the size and a few similar metrics for a set of basic blocks.
Represents a single loop in the control flow graph.
unsigned NumRets
How many 'ret' instructions the blocks contain.
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI, const SmallPtrSetImpl< const Value * > &EphValues)
Add information about a block to the current state.
bool callIsSmall(ImmutableCallSite CS)
Check whether a call will lower to something small.
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 NumInsts
Number of instructions in the analyzed blocks.