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

The loaded contextual profile, suitable for mutation during IPO passes. More...

#include "llvm/ProfileData/PGOCtxProfReader.h"

Public Types

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

Public Member Functions

 PGOContextualProfile (const PGOContextualProfile &)=delete
PGOContextualProfileoperator= (const PGOContextualProfile &)=delete
 PGOContextualProfile (PGOContextualProfile &&)=default
PGOContextualProfileoperator= (PGOContextualProfile &&)=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


class PGOCtxProfileReader

Detailed Description

The loaded contextual profile, suitable for mutation during IPO passes.

We generally expect a fraction of counters and of 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

◆ PGOContextualProfile() [1/2]

llvm::PGOContextualProfile::PGOContextualProfile ( const PGOContextualProfile )

◆ PGOContextualProfile() [2/2]

llvm::PGOContextualProfile::PGOContextualProfile ( PGOContextualProfile &&  )

Member Function Documentation

◆ callsite()

const CallTargetMapTy & llvm::PGOContextualProfile::callsite ( uint32_t  I) const

◆ callsites() [1/2]

CallsiteMapTy & llvm::PGOContextualProfile::callsites ( )

Definition at line 62 of file PGOCtxProfReader.h.

◆ callsites() [2/2]

const CallsiteMapTy & llvm::PGOContextualProfile::callsites ( ) const

Definition at line 61 of file PGOCtxProfReader.h.

◆ counters()

const SmallVectorImpl< uint64_t > & llvm::PGOContextualProfile::counters ( ) const

Definition at line 60 of file PGOCtxProfReader.h.

References llvm::Counters.

◆ getContainedGuids()

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

◆ guid()

GlobalValue::GUID llvm::PGOContextualProfile::guid ( ) const

Definition at line 59 of file PGOCtxProfReader.h.

◆ hasCallsite()

bool llvm::PGOContextualProfile::hasCallsite ( uint32_t  I) const

◆ operator=() [1/2]

PGOContextualProfile & llvm::PGOContextualProfile::operator= ( const PGOContextualProfile )

◆ operator=() [2/2]

PGOContextualProfile & llvm::PGOContextualProfile::operator= ( PGOContextualProfile &&  )

Friends And Related Function Documentation

◆ PGOCtxProfileReader

friend class PGOCtxProfileReader

Definition at line 40 of file PGOCtxProfReader.h.

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