LLVM
8.0.1
|
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 | 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. More... | |
Public Types inherited from llvm::GlobalValueSummary | |
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) | |
unsigned | immutableRefCount () const |
FFlags | fflags () const |
Get function summary flags. More... | |
unsigned | instCount () const |
Get the instruction count recorded for this function. More... | |
uint64_t | entryCount () const |
Get the synthetic entry count for this function. More... | |
void | setEntryCount (uint64_t EC) |
Set the synthetic entry count for this function. More... | |
ArrayRef< EdgeTy > | calls () const |
Return the list of <CalleeValueInfo, CalleeInfo> pairs. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
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. More... | |
void | addTypeTest (GlobalValue::GUID Guid) |
Add a type test to the summary. More... | |
const TypeIdInfo * | getTypeIdInfo () const |
Public Member Functions inherited from llvm::GlobalValueSummary | |
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. More... | |
void | setOriginalName (GlobalValue::GUID Name) |
Initialize the original name hash in this summary. More... | |
SummaryKind | getSummaryKind () const |
Which kind of summary subclass this is. More... | |
void | setModulePath (StringRef ModPath) |
Set the path to the module containing this function, for use in the combined index. More... | |
StringRef | modulePath () const |
Get the path to the module containing this function. More... | |
GVFlags | flags () const |
Get the flags for this GlobalValue (see struct GVFlags). More... | |
GlobalValue::LinkageTypes | linkage () const |
Return linkage type recorded for this global value. More... | |
void | setLinkage (GlobalValue::LinkageTypes Linkage) |
Sets the linkage to the value determined by global summary-based optimization. More... | |
bool | notEligibleToImport () const |
Return true if this global value can't be imported. More... | |
bool | isLive () const |
void | setLive (bool Live) |
void | setDSOLocal (bool Local) |
bool | isDSOLocal () const |
void | setNotEligibleToImport () |
Flag that this global value cannot be imported. More... | |
ArrayRef< ValueInfo > | refs () const |
Return the list of values referenced by this global value definition. More... | |
GlobalValueSummary * | getBaseObject () |
If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself. More... | |
const GlobalValueSummary * | getBaseObject () const |
Static Public Member Functions | |
static FunctionSummary | makeDummyFunctionSummary (std::vector< FunctionSummary::EdgeTy > Edges) |
Create an empty FunctionSummary (with specified call edges). More... | |
static bool | classof (const GlobalValueSummary *GVS) |
Check if this is a function summary. More... | |
Static Public Attributes | |
static FunctionSummary | ExternalNode |
A dummy node to reference external functions that aren't in the index. More... | |
Friends | |
struct | GraphTraits< ValueInfo > |
Additional Inherited Members | |
Protected Member Functions inherited from llvm::GlobalValueSummary | |
GlobalValueSummary (SummaryKind K, GVFlags Flags, std::vector< ValueInfo > Refs) | |
Function summary information to aid decisions and implementation of importing.
Definition at line 434 of file ModuleSummaryIndex.h.
using llvm::FunctionSummary::EdgeTy = std::pair<ValueInfo, CalleeInfo> |
<CalleeValueInfo, CalleeInfo> call edge pair.
Definition at line 437 of file ModuleSummaryIndex.h.
Types for -force-summary-edges-cold debugging option.
Enumerator | |
---|---|
FSHT_None | |
FSHT_AllNonCritical | |
FSHT_All |
Definition at line 440 of file ModuleSummaryIndex.h.
|
inline |
Definition at line 535 of file ModuleSummaryIndex.h.
|
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 624 of file ModuleSummaryIndex.h.
Return the list of <CalleeValueInfo, CalleeInfo> pairs.
Definition at line 576 of file ModuleSummaryIndex.h.
Referenced by computeImportForFunction(), llvm::ModuleSummaryIndex::discoverNodes(), getLinkageNameWithSpace(), and writeTypeIdSummaryRecord().
|
inlinestatic |
Check if this is a function summary.
Definition at line 559 of file ModuleSummaryIndex.h.
References llvm::GlobalValueSummary::getSummaryKind().
|
inline |
Get the synthetic entry count for this function.
Definition at line 570 of file ModuleSummaryIndex.h.
Referenced by llvm::FunctionImportGlobalProcessing::doImportAsDefinition().
|
inline |
Get function summary flags.
Definition at line 564 of file ModuleSummaryIndex.h.
Referenced by getLinkageNameWithSpace(), and writeTypeIdSummaryRecord().
|
inline |
Definition at line 630 of file ModuleSummaryIndex.h.
Referenced by getLinkageNameWithSpace().
unsigned FunctionSummary::immutableRefCount | ( | ) | const |
Definition at line 40 of file ModuleSummaryIndex.cpp.
References I.
Referenced by writeTypeIdSummaryRecord().
|
inline |
Get the instruction count recorded for this function.
Definition at line 567 of file ModuleSummaryIndex.h.
Referenced by computeImportForFunction(), ComputeImportForModule(), getLinkageNameWithSpace(), and writeTypeIdSummaryRecord().
|
inlinestatic |
Create an empty FunctionSummary (with specified call edges).
Used to represent external nodes and the dummy root node.
Definition at line 499 of file ModuleSummaryIndex.h.
Referenced by llvm::ModuleSummaryIndex::calculateCallGraphRoot().
|
inline |
Set the synthetic entry count for this function.
Definition at line 573 of file ModuleSummaryIndex.h.
|
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 616 of file ModuleSummaryIndex.h.
Referenced by getReferencedTypeIds(), and writeFunctionTypeMetadataRecords().
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 599 of file ModuleSummaryIndex.h.
Referenced by getReferencedTypeIds(), and writeFunctionTypeMetadataRecords().
|
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 608 of file ModuleSummaryIndex.h.
Referenced by getReferencedTypeIds(), and writeFunctionTypeMetadataRecords().
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 590 of file ModuleSummaryIndex.h.
Referenced by getReferencedTypeIds(), and writeFunctionTypeMetadataRecords().
|
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 581 of file ModuleSummaryIndex.h.
Referenced by getReferencedTypeIds(), and writeFunctionTypeMetadataRecords().
|
friend |
Definition at line 630 of file ModuleSummaryIndex.h.
|
static |
A dummy node to reference external functions that aren't in the index.
Definition at line 514 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().