15 #ifndef LLVM_ANALYSIS_CODEMETRICS_H 16 #define LLVM_ANALYSIS_CODEMETRICS_H 23 class AssumptionCache;
29 class TargetTransformInfo;
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)...
This class represents lattice values for constants.
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 @llvm.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.
unsigned NumBlocks
Number of analyzed blocks.
bool usesDynamicAlloca
True if this function calls alloca (in the C sense).
LLVM Basic Block Representation.
void analyzeBasicBlock(const BasicBlock *BB, const TargetTransformInfo &TTI, const SmallPtrSetImpl< const Value *> &EphValues)
Add information about a block to the current state.
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.
bool callIsSmall(ImmutableCallSite CS)
Check whether a call will lower to something small.
unsigned NumInsts
Number of instructions in the analyzed blocks.