LLVM 20.0.0git
|
#include "llvm/Analysis/CtxProfAnalysis.h"
Public Types | |
using | Result = PGOContextualProfile |
Public Member Functions | |
CtxProfAnalysis (std::optional< StringRef > Profile=std::nullopt) | |
PGOContextualProfile | run (Module &M, ModuleAnalysisManager &MAM) |
Public Member Functions inherited from llvm::PassInfoMixin< DerivedT > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Static Public Member Functions | |
static InstrProfCallsite * | getCallsiteInstrumentation (CallBase &CB) |
Get the instruction instrumenting a callsite, or nullptr if that cannot be found. | |
static InstrProfIncrementInst * | getBBInstrumentation (BasicBlock &BB) |
Get the instruction instrumenting a BB, or nullptr if not present. | |
static InstrProfIncrementInstStep * | getSelectInstrumentation (SelectInst &SI) |
Get the step instrumentation associated with a select | |
static 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< DerivedT > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
Static Public Attributes | |
static AnalysisKey | Key |
Definition at line 113 of file CtxProfAnalysis.h.
Definition at line 120 of file CtxProfAnalysis.h.
|
explicit |
Definition at line 108 of file CtxProfAnalysis.cpp.
References Profile, and UseCtxProfile.
|
static |
Definition at line 340 of file CtxProfAnalysis.cpp.
References _, llvm::PGOCtxProfContext::callsites(), llvm::find(), for(), llvm::CallBase::getCaller(), getCallsiteInstrumentation(), llvm::ilist_detail::node_parent_access< NodeTy, ParentTy >::getParent(), llvm::Guid, if(), Name, and Profile.
Referenced by llvm::ModuleInlinerPass::run().
|
static |
Get the instruction instrumenting a BB, or nullptr if not present.
Definition at line 250 of file CtxProfAnalysis.cpp.
References I.
Referenced by llvm::promoteCallWithIfThenElse(), and remapIndices().
|
static |
Get the instruction instrumenting a callsite, or nullptr if that cannot be found.
Definition at line 237 of file CtxProfAnalysis.cpp.
References assert(), llvm::InstrProfCallsite::canInstrumentCallsite(), and llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode().
Referenced by collectIndirectCallPromotionList(), llvm::InlineFunction(), and llvm::promoteCallWithIfThenElse().
|
static |
Get the step instrumentation associated with a select
Definition at line 259 of file CtxProfAnalysis.cpp.
References llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode().
PGOContextualProfile CtxProfAnalysis::run | ( | Module & | M, |
ModuleAnalysisManager & | MAM | ||
) |
Definition at line 117 of file CtxProfAnalysis.cpp.
References _, assert(), llvm::CallingConv::C, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::contains(), F, llvm::ErrorOr< T >::get(), llvm::ErrorOr< T >::getError(), llvm::MemoryBuffer::getFile(), llvm::AssignGUIDPass::getGUID(), I, llvm::detail::DenseSetImpl< ValueT, MapTy, ValueInfoT >::insert(), llvm::PGOCtxProfileReader::loadContexts(), llvm::make_early_inc_range(), and llvm::toString().
|
static |
Definition at line 117 of file CtxProfAnalysis.h.