LLVM 20.0.0git
Public Types | Public Member Functions | Friends | List of all members
llvm::PGOCtxProfContext Class Referencefinal

A node (context) in the loaded contextual profile, suitable for mutation during IPO passes. More...

#include "llvm/ProfileData/PGOCtxProfReader.h"

Public Types

using CallTargetMapTy = std::map< GlobalValue::GUID, PGOCtxProfContext >
 
using CallsiteMapTy = DenseMap< uint32_t, CallTargetMapTy >
 

Public Member Functions

 PGOCtxProfContext (const PGOCtxProfContext &)=delete
 
PGOCtxProfContextoperator= (const PGOCtxProfContext &)=delete
 
 PGOCtxProfContext (PGOCtxProfContext &&)=default
 
PGOCtxProfContextoperator= (PGOCtxProfContext &&)=default
 
GlobalValue::GUID guid () const
 
const SmallVectorImpl< uint64_t > & counters () const
 
const CallsiteMapTycallsites () const
 
CallsiteMapTycallsites ()
 
bool hasCallsite (uint32_t I) const
 
const CallTargetMapTycallsite (uint32_t I) const
 
void getContainedGuids (DenseSet< GlobalValue::GUID > &Guids) const
 

Friends

class PGOCtxProfileReader
 

Detailed Description

A node (context) in the loaded contextual profile, suitable for mutation during IPO passes.

We generally expect a fraction of counters and callsites to be populated. We continue to model counters as vectors, but callsites are modeled as a map of a map. The expectation is that, typically, there is a small number of indirect targets (usually, 1 for direct calls); but potentially a large number of callsites, and, as inlining progresses, the callsite count of a caller will grow.

Definition at line 34 of file PGOCtxProfReader.h.

Member Typedef Documentation

◆ CallsiteMapTy

Definition at line 37 of file PGOCtxProfReader.h.

◆ CallTargetMapTy

Definition at line 36 of file PGOCtxProfReader.h.

Constructor & Destructor Documentation

◆ PGOCtxProfContext() [1/2]

llvm::PGOCtxProfContext::PGOCtxProfContext ( const PGOCtxProfContext )
delete

◆ PGOCtxProfContext() [2/2]

llvm::PGOCtxProfContext::PGOCtxProfContext ( PGOCtxProfContext &&  )
default

Member Function Documentation

◆ callsite()

const CallTargetMapTy & llvm::PGOCtxProfContext::callsite ( uint32_t  I) const
inline

◆ callsites() [1/2]

CallsiteMapTy & llvm::PGOCtxProfContext::callsites ( )
inline

Definition at line 61 of file PGOCtxProfReader.h.

◆ callsites() [2/2]

const CallsiteMapTy & llvm::PGOCtxProfContext::callsites ( ) const
inline

Definition at line 60 of file PGOCtxProfReader.h.

◆ counters()

const SmallVectorImpl< uint64_t > & llvm::PGOCtxProfContext::counters ( ) const
inline

Definition at line 59 of file PGOCtxProfReader.h.

References llvm::Counters.

Referenced by llvm::PGOContextualProfile::flatten().

◆ getContainedGuids()

void PGOCtxProfContext::getContainedGuids ( DenseSet< GlobalValue::GUID > &  Guids) const

◆ guid()

GlobalValue::GUID llvm::PGOCtxProfContext::guid ( ) const
inline

Definition at line 58 of file PGOCtxProfReader.h.

Referenced by llvm::PGOContextualProfile::flatten().

◆ hasCallsite()

bool llvm::PGOCtxProfContext::hasCallsite ( uint32_t  I) const
inline

◆ operator=() [1/2]

PGOCtxProfContext & llvm::PGOCtxProfContext::operator= ( const PGOCtxProfContext )
delete

◆ operator=() [2/2]

PGOCtxProfContext & llvm::PGOCtxProfContext::operator= ( PGOCtxProfContext &&  )
default

Friends And Related Function Documentation

◆ PGOCtxProfileReader

friend class PGOCtxProfileReader
friend

Definition at line 40 of file PGOCtxProfReader.h.


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