LLVM 17.0.0git
|
Function summary information to aid decisions and implementation of importing. More...
#include "llvm/IR/ModuleSummaryIndex.h"
Classes | |
struct | ConstVCall |
A specification for a virtual function call with all constant integer arguments. More... | |
struct | FFlags |
Flags specific to function summaries. More... | |
struct | ParamAccess |
Describes the uses of a parameter by the function. More... | |
struct | TypeIdInfo |
All type identifier related information. More... | |
struct | VFuncId |
An "identifier" for a virtual function. More... | |
Public Types | |
enum | ForceSummaryHotnessType : unsigned { FSHT_None , FSHT_AllNonCritical , FSHT_All } |
Types for -force-summary-edges-cold debugging option. More... | |
using | EdgeTy = std::pair< ValueInfo, CalleeInfo > |
<CalleeValueInfo, CalleeInfo> call edge pair. | |
![]() | |
enum | SummaryKind : unsigned { AliasKind , FunctionKind , GlobalVarKind } |
Sububclass discriminator (for dyn_cast<> et al.) More... | |
Public Member Functions | |
FunctionSummary (GVFlags Flags, unsigned NumInsts, FFlags FunFlags, uint64_t EntryCount, std::vector< ValueInfo > Refs, std::vector< EdgeTy > CGEdges, std::vector< GlobalValue::GUID > TypeTests, std::vector< VFuncId > TypeTestAssumeVCalls, std::vector< VFuncId > TypeCheckedLoadVCalls, std::vector< ConstVCall > TypeTestAssumeConstVCalls, std::vector< ConstVCall > TypeCheckedLoadConstVCalls, std::vector< ParamAccess > Params, CallsitesTy CallsiteList, AllocsTy AllocList) | |
std::pair< unsigned, unsigned > | specialRefCounts () const |
FFlags | fflags () const |
Get function summary flags. | |
void | setNoRecurse () |
void | setNoUnwind () |
unsigned | instCount () const |
Get the instruction count recorded for this function. | |
uint64_t | entryCount () const |
Get the synthetic entry count for this function. | |
void | setEntryCount (uint64_t EC) |
Set the synthetic entry count for this function. | |
ArrayRef< EdgeTy > | calls () const |
Return the list of <CalleeValueInfo, CalleeInfo> pairs. | |
std::vector< EdgeTy > & | mutableCalls () |
void | addCall (EdgeTy E) |
ArrayRef< GlobalValue::GUID > | type_tests () const |
Returns the list of type identifiers used by this function in llvm.type.test intrinsics other than by an llvm.assume intrinsic, represented as GUIDs. | |
ArrayRef< VFuncId > | type_test_assume_vcalls () const |
Returns the list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics that do not have all constant integer arguments. | |
ArrayRef< VFuncId > | type_checked_load_vcalls () const |
Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics that do not have all constant integer arguments. | |
ArrayRef< ConstVCall > | type_test_assume_const_vcalls () const |
Returns the list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics with all constant integer arguments. | |
ArrayRef< ConstVCall > | type_checked_load_const_vcalls () const |
Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics with all constant integer arguments. | |
ArrayRef< ParamAccess > | paramAccesses () const |
Returns the list of known uses of pointer parameters. | |
void | setParamAccesses (std::vector< ParamAccess > NewParams) |
Sets the list of known uses of pointer parameters. | |
void | addTypeTest (GlobalValue::GUID Guid) |
Add a type test to the summary. | |
const TypeIdInfo * | getTypeIdInfo () const |
ArrayRef< CallsiteInfo > | callsites () const |
ArrayRef< AllocInfo > | allocs () const |
![]() | |
virtual | ~GlobalValueSummary ()=default |
GlobalValue::GUID | getOriginalName () const |
Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones. | |
void | setOriginalName (GlobalValue::GUID Name) |
Initialize the original name hash in this summary. | |
SummaryKind | getSummaryKind () const |
Which kind of summary subclass this is. | |
void | setModulePath (StringRef ModPath) |
Set the path to the module containing this function, for use in the combined index. | |
StringRef | modulePath () const |
Get the path to the module containing this function. | |
GVFlags | flags () const |
Get the flags for this GlobalValue (see struct GVFlags). | |
GlobalValue::LinkageTypes | linkage () const |
Return linkage type recorded for this global value. | |
void | setLinkage (GlobalValue::LinkageTypes Linkage) |
Sets the linkage to the value determined by global summary-based optimization. | |
bool | notEligibleToImport () const |
Return true if this global value can't be imported. | |
bool | isLive () const |
void | setLive (bool Live) |
void | setDSOLocal (bool Local) |
bool | isDSOLocal () const |
void | setCanAutoHide (bool CanAutoHide) |
bool | canAutoHide () const |
GlobalValue::VisibilityTypes | getVisibility () const |
void | setVisibility (GlobalValue::VisibilityTypes Vis) |
void | setNotEligibleToImport () |
Flag that this global value cannot be imported. | |
ArrayRef< ValueInfo > | refs () const |
Return the list of values referenced by this global value definition. | |
GlobalValueSummary * | getBaseObject () |
If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself. | |
const GlobalValueSummary * | getBaseObject () const |
Static Public Member Functions | |
static FunctionSummary | makeDummyFunctionSummary (std::vector< FunctionSummary::EdgeTy > Edges) |
Create an empty FunctionSummary (with specified call edges). | |
static bool | classof (const GlobalValueSummary *GVS) |
Check if this is a function summary. | |
Static Public Attributes | |
static FunctionSummary | ExternalNode |
A dummy node to reference external functions that aren't in the index. | |
Friends | |
struct | GraphTraits< ValueInfo > |
Additional Inherited Members | |
![]() | |
GlobalValueSummary (SummaryKind K, GVFlags Flags, std::vector< ValueInfo > Refs) | |
Function summary information to aid decisions and implementation of importing.
Definition at line 587 of file ModuleSummaryIndex.h.
using llvm::FunctionSummary::EdgeTy = std::pair<ValueInfo, CalleeInfo> |
<CalleeValueInfo, CalleeInfo> call edge pair.
Definition at line 590 of file ModuleSummaryIndex.h.
Types for -force-summary-edges-cold debugging option.
Enumerator | |
---|---|
FSHT_None | |
FSHT_AllNonCritical | |
FSHT_All |
Definition at line 593 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 805 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 862 of file ModuleSummaryIndex.h.
References E.
|
inline |
Add a type test to the summary.
This is used by WholeProgramDevirt if we were unable to devirtualize a checked call.
Definition at line 927 of file ModuleSummaryIndex.h.
Definition at line 941 of file ModuleSummaryIndex.h.
Return the list of <CalleeValueInfo, CalleeInfo> pairs.
Definition at line 858 of file ModuleSummaryIndex.h.
Referenced by llvm::thinLTOPropagateFunctionAttrs().
|
inline |
Definition at line 935 of file ModuleSummaryIndex.h.
|
inlinestatic |
Check if this is a function summary.
Definition at line 837 of file ModuleSummaryIndex.h.
References llvm::GlobalValueSummary::FunctionKind, and llvm::GlobalValueSummary::getSummaryKind().
|
inline |
Get the synthetic entry count for this function.
Definition at line 852 of file ModuleSummaryIndex.h.
|
inline |
Get function summary flags.
Definition at line 842 of file ModuleSummaryIndex.h.
Referenced by computeImportForFunction(), and llvm::thinLTOPropagateFunctionAttrs().
|
inline |
Definition at line 933 of file ModuleSummaryIndex.h.
|
inline |
Get the instruction count recorded for this function.
Definition at line 849 of file ModuleSummaryIndex.h.
Referenced by computeImportForFunction().
|
inlinestatic |
Create an empty FunctionSummary (with specified call edges).
Used to represent external nodes and the dummy root node.
Definition at line 742 of file ModuleSummaryIndex.h.
References llvm::GlobalValue::AvailableExternallyLinkage, and llvm::GlobalValue::DefaultVisibility.
Referenced by llvm::ModuleSummaryIndex::calculateCallGraphRoot().
|
inline |
Definition at line 860 of file ModuleSummaryIndex.h.
|
inline |
Returns the list of known uses of pointer parameters.
Definition at line 909 of file ModuleSummaryIndex.h.
|
inline |
Set the synthetic entry count for this function.
Definition at line 855 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 844 of file ModuleSummaryIndex.h.
References llvm::FunctionSummary::FFlags::NoRecurse.
|
inline |
Definition at line 846 of file ModuleSummaryIndex.h.
References llvm::FunctionSummary::FFlags::NoUnwind.
|
inline |
Sets the list of known uses of pointer parameters.
Definition at line 916 of file ModuleSummaryIndex.h.
Definition at line 77 of file ModuleSummaryIndex.cpp.
References I, and llvm::GlobalValueSummary::refs().
|
inline |
Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics with all constant integer arguments.
Definition at line 902 of file ModuleSummaryIndex.h.
Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics that do not have all constant integer arguments.
Definition at line 885 of file ModuleSummaryIndex.h.
|
inline |
Returns the list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics with all constant integer arguments.
Definition at line 894 of file ModuleSummaryIndex.h.
Returns the list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics that do not have all constant integer arguments.
Definition at line 876 of file ModuleSummaryIndex.h.
|
inline |
Returns the list of type identifiers used by this function in llvm.type.test intrinsics other than by an llvm.assume intrinsic, represented as GUIDs.
Definition at line 867 of file ModuleSummaryIndex.h.
|
friend |
Definition at line 941 of file ModuleSummaryIndex.h.
|
static |
A dummy node to reference external functions that aren't in the index.
Definition at line 761 of file ModuleSummaryIndex.h.
Referenced by llvm::GraphTraits< ValueInfo >::child_begin(), llvm::GraphTraits< ValueInfo >::child_edge_begin(), llvm::GraphTraits< ValueInfo >::child_edge_end(), and llvm::GraphTraits< ValueInfo >::child_end().