LLVM 22.0.0git
|
The instrumented contextual profile, produced by the CtxProfAnalysis. More...
#include "llvm/Analysis/CtxProfAnalysis.h"
Public Types | |
using | ConstVisitor = function_ref<void(const PGOCtxProfContext &)> |
using | Visitor = function_ref<void(PGOCtxProfContext &)> |
Public Member Functions | |
PGOContextualProfile (const PGOContextualProfile &)=delete | |
PGOContextualProfile (PGOContextualProfile &&)=default | |
const CtxProfContextualProfiles & | contexts () const |
const PGOCtxProfile & | profiles () const |
LLVM_ABI bool | isInSpecializedModule () const |
bool | isFunctionKnown (const Function &F) const |
StringRef | getFunctionName (GlobalValue::GUID GUID) const |
uint32_t | getNumCounters (const Function &F) const |
uint32_t | getNumCallsites (const Function &F) const |
uint32_t | allocateNextCounterIndex (const Function &F) |
uint32_t | allocateNextCallsiteIndex (const Function &F) |
LLVM_ABI void | update (Visitor, const Function &F) |
LLVM_ABI void | visit (ConstVisitor, const Function *F=nullptr) const |
LLVM_ABI const CtxProfFlatProfile | flatten () const |
LLVM_ABI const CtxProfFlatIndirectCallProfile | flattenVirtCalls () const |
bool | invalidate (Module &, const PreservedAnalyses &PA, ModuleAnalysisManager::Invalidator &) |
Friends | |
class | CtxProfAnalysis |
class | CtxProfAnalysisPrinterPass |
The instrumented contextual profile, produced by the CtxProfAnalysis.
Definition at line 30 of file CtxProfAnalysis.h.
using llvm::PGOContextualProfile::ConstVisitor = function_ref<void(const PGOCtxProfContext &)> |
Definition at line 102 of file CtxProfAnalysis.h.
using llvm::PGOContextualProfile::Visitor = function_ref<void(PGOCtxProfContext &)> |
Definition at line 103 of file CtxProfAnalysis.h.
|
delete |
|
default |
Definition at line 97 of file CtxProfAnalysis.h.
References assert(), F, and isFunctionKnown().
Referenced by llvm::promoteCallWithIfThenElse(), and remapIndices().
Definition at line 92 of file CtxProfAnalysis.h.
References assert(), F, and isFunctionKnown().
Referenced by llvm::promoteCallWithIfThenElse(), and remapIndices().
|
inline |
Definition at line 63 of file CtxProfAnalysis.h.
const CtxProfFlatProfile PGOContextualProfile::flatten | ( | ) | const |
Definition at line 689 of file CtxProfAnalysis.cpp.
References _, assert(), llvm::SmallVectorTemplateCommon< T, typename >::empty(), G, I, preorderVisitOneRoot(), llvm::SmallVectorImpl< T >::resize(), and llvm::SmallVectorTemplateCommon< T, typename >::size().
const CtxProfFlatIndirectCallProfile PGOContextualProfile::flattenVirtCalls | ( | ) | const |
Definition at line 720 of file CtxProfAnalysis.cpp.
References _, preorderVisitOneRoot(), and llvm::TotalRootEntryCount.
|
inline |
Definition at line 75 of file CtxProfAnalysis.h.
References llvm::StringRef::find().
Definition at line 87 of file CtxProfAnalysis.h.
References assert(), F, and isFunctionKnown().
Referenced by llvm::InlineFunction().
Definition at line 82 of file CtxProfAnalysis.h.
References assert(), F, and isFunctionKnown().
Referenced by llvm::InlineFunction().
|
inline |
Definition at line 111 of file CtxProfAnalysis.h.
References CtxProfAnalysis, and llvm::PreservedAnalyses::getChecker().
Definition at line 71 of file CtxProfAnalysis.h.
References F.
Referenced by allocateNextCallsiteIndex(), allocateNextCounterIndex(), getNumCallsites(), getNumCounters(), llvm::promoteCallWithIfThenElse(), update(), and visit().
bool PGOContextualProfile::isInSpecializedModule | ( | ) | const |
Definition at line 664 of file CtxProfAnalysis.cpp.
References ForceIsInSpecializedModule.
Referenced by llvm::InlineFunction().
|
inline |
Definition at line 67 of file CtxProfAnalysis.h.
Definition at line 670 of file CtxProfAnalysis.cpp.
References assert(), F, G, and isFunctionKnown().
Referenced by llvm::InlineFunction(), and llvm::promoteCallWithIfThenElse().
void PGOContextualProfile::visit | ( | ConstVisitor | V, |
const Function * | F = nullptr ) const |
Definition at line 678 of file CtxProfAnalysis.cpp.
References assert(), F, G, isFunctionKnown(), and preorderVisit().
|
friend |
Definition at line 31 of file CtxProfAnalysis.h.
References CtxProfAnalysis.
Referenced by CtxProfAnalysis, and invalidate().
|
friend |
Definition at line 32 of file CtxProfAnalysis.h.
References CtxProfAnalysisPrinterPass.
Referenced by CtxProfAnalysisPrinterPass.