class SampleProfileInference
Declaration
template <typename BT>
class SampleProfileInference { /* full declaration omitted */ };
Description
Sample profile inference pass.
Declared at: llvm/include/llvm/Transforms/Utils/SampleProfileInference.h:83
Templates
- BT
Member Variables
- private const llvm::SampleProfileInference::FunctionT& F
- Function.
- private llvm::SampleProfileInference::BlockEdgeMap& Successors
- Successors for each basic block in the CFG.
- private llvm::SampleProfileInference::BlockWeightMap& SampleBlockWeights
- Map basic blocks to their sampled weights.
Method Overview
- public SampleProfileInference<BT>(llvm::SampleProfileInference::FunctionT & F, llvm::SampleProfileInference::BlockEdgeMap & Successors, llvm::SampleProfileInference::BlockWeightMap & SampleBlockWeights)
- public void apply(llvm::SampleProfileInference::BlockWeightMap & BlockWeights, llvm::SampleProfileInference::EdgeWeightMap & EdgeWeights)
- private void findUnlikelyJumps(const std::vector<const BasicBlockT *> & BasicBlocks, llvm::SampleProfileInference::BlockEdgeMap & Successors, llvm::FlowFunction & Func)
- private bool isExit(const llvm::SampleProfileInference::BasicBlockT * BB)
Methods
¶SampleProfileInference<BT>(
llvm::SampleProfileInference::FunctionT& F,
llvm::SampleProfileInference::BlockEdgeMap&
Successors,
llvm::SampleProfileInference::BlockWeightMap&
SampleBlockWeights)
SampleProfileInference<BT>(
llvm::SampleProfileInference::FunctionT& F,
llvm::SampleProfileInference::BlockEdgeMap&
Successors,
llvm::SampleProfileInference::BlockWeightMap&
SampleBlockWeights)
Declared at: llvm/include/llvm/Transforms/Utils/SampleProfileInference.h:93
Parameters
- llvm::SampleProfileInference::FunctionT& F
- llvm::SampleProfileInference::BlockEdgeMap& Successors
- llvm::SampleProfileInference::BlockWeightMap& SampleBlockWeights
¶void apply(
llvm::SampleProfileInference::BlockWeightMap&
BlockWeights,
llvm::SampleProfileInference::EdgeWeightMap&
EdgeWeights)
void apply(
llvm::SampleProfileInference::BlockWeightMap&
BlockWeights,
llvm::SampleProfileInference::EdgeWeightMap&
EdgeWeights)
Description
Apply the profile inference algorithm for a given function
Declared at: llvm/include/llvm/Transforms/Utils/SampleProfileInference.h:98
Parameters
- llvm::SampleProfileInference::BlockWeightMap& BlockWeights
- llvm::SampleProfileInference::EdgeWeightMap& EdgeWeights
¶void findUnlikelyJumps(
const std::vector<const BasicBlockT*>&
BasicBlocks,
llvm::SampleProfileInference::BlockEdgeMap&
Successors,
llvm::FlowFunction& Func)
void findUnlikelyJumps(
const std::vector<const BasicBlockT*>&
BasicBlocks,
llvm::SampleProfileInference::BlockEdgeMap&
Successors,
llvm::FlowFunction& Func)
Description
Try to infer branch probabilities mimicking implementation of BranchProbabilityInfo. Unlikely taken branches are marked so that the inference algorithm can avoid sending flow along corresponding edges.
Declared at: llvm/include/llvm/Transforms/Utils/SampleProfileInference.h:104
Parameters
- const std::vector<const BasicBlockT*>& BasicBlocks
- llvm::SampleProfileInference::BlockEdgeMap& Successors
- llvm::FlowFunction& Func
¶bool isExit(const llvm::SampleProfileInference::
BasicBlockT* BB)
bool isExit(const llvm::SampleProfileInference::
BasicBlockT* BB)
Description
Determine whether the block is an exit in the CFG.
Declared at: llvm/include/llvm/Transforms/Utils/SampleProfileInference.h:108
Parameters
- const llvm::SampleProfileInference::BasicBlockT* BB