14#ifndef LLVM_ANALYSIS_CODEMETRICS_H
15#define LLVM_ANALYSIS_CODEMETRICS_H
78 bool PrepareForLTO =
false,
const Loop *L =
nullptr);
This file defines an InstructionCost class that is used when calculating the cost of an instruction,...
This file defines the SmallVector class.
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 is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
Utility to calculate the size and a few similar metrics for a set of basic blocks.
bool usesDynamicAlloca
True if this function calls alloca (in the C sense).
ConvergenceKind Convergence
The kind of convergence specified in this function.
bool notDuplicatable
True if this function cannot be duplicated.
SmallVector< InstructionCost, 0 > NumBBInsts
Keeps track of basic block code size estimates. Indexed by block number.
unsigned NumInlineCandidates
The number of calls to internal functions with a single caller.
bool isRecursive
True if this function calls itself.
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.
bool exposesReturnsTwice
True if this function contains a call to setjmp or other functions with attribute "returns twice" wit...
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 NumVectorInsts
How many instructions produce vector values.
InstructionCost NumInsts
Code size cost of the analyzed blocks.