LLVM 20.0.0git
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | List of all members
llvm::CtxProfAnalysis Class Reference

#include "llvm/Analysis/CtxProfAnalysis.h"

Inheritance diagram for llvm::CtxProfAnalysis:
Inheritance graph
[legend]

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

Detailed Description

Definition at line 113 of file CtxProfAnalysis.h.

Member Typedef Documentation

◆ Result

Definition at line 120 of file CtxProfAnalysis.h.

Constructor & Destructor Documentation

◆ CtxProfAnalysis()

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

Definition at line 108 of file CtxProfAnalysis.cpp.

References Profile, and 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 250 of file CtxProfAnalysis.cpp.

References I.

Referenced by 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 259 of file CtxProfAnalysis.cpp.

References llvm::ilist_node_with_parent< NodeTy, ParentTy, Options >::getPrevNode().

◆ run()

PGOContextualProfile CtxProfAnalysis::run ( Module M,
ModuleAnalysisManager MAM 
)

Member Data Documentation

◆ Key

AnalysisKey CtxProfAnalysis::Key
static

Definition at line 117 of file CtxProfAnalysis.h.


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