LLVM 22.0.0git
llvm::CtxProfAnalysis Class Reference

#include "llvm/Analysis/CtxProfAnalysis.h"

Inheritance diagram for llvm::CtxProfAnalysis:
[legend]

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 InstrProfCallsitegetCallsiteInstrumentation (CallBase &CB)
 Get the instruction instrumenting a callsite, or nullptr if that cannot be found.
static LLVM_ABI InstrProfIncrementInstgetBBInstrumentation (BasicBlock &BB)
 Get the instruction instrumenting a BB, or nullptr if not present.
static LLVM_ABI InstrProfIncrementInstStepgetSelectInstrumentation (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 AnalysisKeyID ()
 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

Detailed Description

Definition at line 120 of file CtxProfAnalysis.h.

Member Typedef Documentation

◆ Result

Constructor & Destructor Documentation

◆ CtxProfAnalysis()

CtxProfAnalysis::CtxProfAnalysis ( std::optional< StringRef > Profile = std::nullopt)
explicit

Definition at line 450 of file CtxProfAnalysis.cpp.

References UseCtxProfile.

Member Function Documentation

◆ collectIndirectCallPromotionList()

void CtxProfAnalysis::collectIndirectCallPromotionList ( CallBase & IC,
Result & Profile,
SetVector< std::pair< CallBase *, Function * > > & Candidates )
static

◆ getBBInstrumentation()

InstrProfIncrementInst * CtxProfAnalysis::getBBInstrumentation ( BasicBlock & BB)
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().

◆ getCallsiteInstrumentation()

InstrProfCallsite * CtxProfAnalysis::getCallsiteInstrumentation ( CallBase & CB)
static

◆ getSelectInstrumentation()

InstrProfIncrementInstStep * CtxProfAnalysis::getSelectInstrumentation ( SelectInst & SI)
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().

◆ run()

Member Data Documentation

◆ Key

AnalysisKey CtxProfAnalysis::Key
static

Definition at line 124 of file CtxProfAnalysis.h.


The documentation for this class was generated from the following files: