llvm::FunctionSummary

Function summary information to aid decisions and implementation of importing.

Synopsis

Declared in <llvm/IR/ModuleSummaryIndex.h>

class FunctionSummary
    : public GlobalValueSummary

Base Classes

NameDescription
GlobalValueSummaryFunction and variable summary information to aid decisions and implementation of importing.

Types

NameDescription
ConstVCall A specification for a virtual function call with all constant integer arguments. This is used to perform virtual constant propagation on the summary.
FFlags Flags specific to function summaries.
GVFlags Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield.
ParamAccess Describes the uses of a parameter by the function.
TypeIdInfo All type identifier related information. Because these fields are relatively uncommon we only allocate space for them if necessary.
VFuncId An identifier for a virtual function (type GUID plus vtable offset).

Type Aliases

NameDescription
EdgeTy <CalleeValueInfo, CalleeInfo> call edge pair.

Enums

NameDescription
ForceSummaryHotnessType Types for -force-summary-edges-cold debugging option.
ImportKind Whether a value should be imported as a definition or a declaration.
SummaryKind Subclass discriminator (for dyn_cast<> et al.)

Member Functions

NameDescription
FunctionSummary [constructor]Construct a function summary from the given analysis results.
addAlloc Append memprof allocation summary Alloc.
addCall Append call-graph edge E to this function summary.
addCallsite Append memprof callsite summary Callsite.
addTypeTest Add a type test to the summary. This is used by WholeProgramDevirt if we were unable to devirtualize a checked call.
allocs Return memprof allocation summaries for this function, if any.
calls Return the list of <CalleeValueInfo, CalleeInfo> pairs.
callsites Return memprof callsite summaries for this function, if any.
canAutoHide Return true if this value can be auto-hidden.
fflags Get function summary flags.
flags Get the flags for this GlobalValue (see struct GVFlags).
getBaseObject getBaseObject overloads
getOriginalName Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones.
getSummaryKind Which kind of summary subclass this is.
getTypeIdInfo Return type-identifier info for this function, or null if none.
getVisibility Return the visibility recorded for this global value.
importType Return whether this value should be imported as definition or declaration.
instCount Get the instruction count recorded for this function.
isDSOLocal Return true if this symbol was resolved DSO-locally.
isLive Return true if this global value is live.
linkage Return linkage type recorded for this global value.
modulePath Get the path to the module containing this function.
mutableAllocs Return a mutable reference to the memprof allocation summaries.
mutableCalls Return a mutable reference to the call-graph edge list.
mutableCallsites Return a mutable reference to the memprof callsite summaries.
noRenameOnPromotion Return true if promotion must not rename this static global.
notEligibleToImport Return true if this global value can't be imported.
paramAccesses Returns the list of known uses of pointer parameters.
promote Promote this local symbol to external linkage and mark it promoted.
refs Return the list of values referenced by this global value definition.
setCanAutoHide Set whether this value can be auto-hidden.
setDSOLocal Set whether this symbol was resolved DSO-locally.
setExternalLinkageForTest Set external linkage for testing without going through promote().
setImportKind Set whether to import this value as a definition or declaration.
setLinkage Sets the linkage to the value determined by global summary-based optimization. Will be applied in the ThinLTO backends.
setLive Set whether this global value is live.
setModulePath Set the path to the module containing this function, for use in the combined index.
setNoRecurse Mark this function as non-recursive.
setNoRenameOnPromotion Set whether promotion must not rename this static global.
setNoUnwind Mark this function as never unwinding.
setNotEligibleToImport Flag that this global value cannot be imported.
setOriginalName Initialize the original name hash in this summary.
setParamAccesses Sets the list of known uses of pointer parameters.
setVisibility Set the visibility recorded for this global value.
shouldImportAsDecl Return true if this value should be imported as a declaration.
specialRefCounts Return counts of readonly and writeonly references in RefEdgeList.
type_checked_load_const_vcalls Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics with all constant integer arguments.
type_checked_load_vcalls Returns the list of virtual calls made by this function using llvm.type.checked.load intrinsics that do not have all constant integer arguments.
type_test_assume_const_vcalls Returns the list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics with all constant integer arguments.
type_test_assume_vcalls 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.
type_tests 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.
wasPromoted Return true if this symbol was promoted from local linkage.

Static Member Functions

NameDescription
classof Check if this is a function summary.
makeDummyFunctionSummary Create an empty FunctionSummary (with specified call edges). Used to represent external nodes and the dummy root node.

Static Data Members

NameDescription
ExternalNode A dummy node to reference external functions that aren't in the index

Friends

NameDescription
llvm::GraphTraits<ValueInfo>GraphTraits specialization so ValueInfo can be used as a call-graph node.