LLVM 22.0.0git
|
#include "llvm/Analysis/CtxProfAnalysis.h"
Public Types | |
using | Result = PGOContextualProfile |
Public Member Functions | |
LLVM_ABI | CtxProfAnalysis (std::optional< StringRef > Profile=std::nullopt) |
LLVM_ABI PGOContextualProfile | run (Module &M, ModuleAnalysisManager &MAM) |
Public Member Functions inherited from llvm::PassInfoMixin< CtxProfAnalysis > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Static Public Member Functions | |
static LLVM_ABI InstrProfCallsite * | getCallsiteInstrumentation (CallBase &CB) |
Get the instruction instrumenting a callsite, or nullptr if that cannot be found. | |
static LLVM_ABI InstrProfIncrementInst * | getBBInstrumentation (BasicBlock &BB) |
Get the instruction instrumenting a BB, or nullptr if not present. | |
static LLVM_ABI InstrProfIncrementInstStep * | getSelectInstrumentation (SelectInst &SI) |
Get the step instrumentation associated with a select | |
static LLVM_ABI void | collectIndirectCallPromotionList (CallBase &IC, Result &Profile, SetVector< std::pair< CallBase *, Function * > > &Candidates) |
Static Public Member Functions inherited from llvm::AnalysisInfoMixin< CtxProfAnalysis > | |
static AnalysisKey * | ID () |
Returns an opaque, unique ID for this analysis type. | |
Static Public Member Functions inherited from llvm::PassInfoMixin< CtxProfAnalysis > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. |
Static Public Attributes | |
static LLVM_ABI AnalysisKey | Key |
Definition at line 120 of file CtxProfAnalysis.h.
Definition at line 128 of file CtxProfAnalysis.h.
|
explicit |
Definition at line 450 of file CtxProfAnalysis.cpp.
References UseCtxProfile.
|
static |
Definition at line 736 of file CtxProfAnalysis.cpp.
References _, llvm::CallBase::getCaller(), getCallsiteInstrumentation(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), and llvm::Guid.
Referenced by llvm::ModuleInlinerPass::run().
|
static |
Get the instruction instrumenting a BB, or nullptr if not present.
Definition at line 607 of file CtxProfAnalysis.cpp.
References llvm::dyn_cast(), I, and llvm::isa().
Referenced by llvm::ProfileAnnotatorImpl::ProfileAnnotatorImpl(), llvm::promoteCallWithIfThenElse(), and remapIndices().
|
static |
Get the instruction instrumenting a callsite, or nullptr if that cannot be found.
Definition at line 594 of file CtxProfAnalysis.cpp.
References assert(), llvm::InstrProfCallsite::canInstrumentCallsite(), llvm::dyn_cast(), llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode(), and llvm::isa().
Referenced by collectIndirectCallPromotionList(), llvm::InlineFunction(), and llvm::promoteCallWithIfThenElse().
|
static |
Get the step instrumentation associated with a select
Definition at line 616 of file CtxProfAnalysis.cpp.
References llvm::dyn_cast(), and llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode().
Referenced by llvm::ProfileAnnotator::getSelectInstrProfile().
PGOContextualProfile CtxProfAnalysis::run | ( | Module & | M, |
ModuleAnalysisManager & | MAM ) |
Definition at line 459 of file CtxProfAnalysis.cpp.
References _, assert(), llvm::CallingConv::C, llvm::dyn_cast(), F, llvm::sys::path::filename(), llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), llvm::AssignGUIDPass::getGUID(), llvm::Guid, I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::PGOCtxProfileReader::loadProfiles(), llvm::make_early_inc_range(), MAM, and llvm::toString().
|
static |
Definition at line 124 of file CtxProfAnalysis.h.