GlobalValueSummaryCode

Enum GlobalValueSummaryCode 

Source
#[non_exhaustive]
#[repr(u8)]
pub enum GlobalValueSummaryCode {
Show 32 variants PerModule = 1, PerModuleProfile = 2, PerModuleGlobalvarInitRefs = 3, Combined = 4, CombinedProfile = 5, CombinedGlobalvarInitRefs = 6, Alias = 7, CombinedAlias = 8, CombinedOriginalName = 9, Version = 10, TypeTests = 11, TypeTestAssumeVCalls = 12, TypeCheckedLoadVCalls = 13, TypeTestAssumeConstVCall = 14, TypeCheckedLoadConstVCall = 15, ValueGuid = 16, CfiFunctionDefs = 17, CfiFunctionDecls = 18, PerModuleRelBf = 19, Flags = 20, TypeId = 21, TypeIdMetadata = 22, PerModuleVtableGlobalvarInitRefs = 23, BlockCount = 24, ParamAccess = 25, PerModuleCallsiteInfo = 26, PerModuleAllocInfo = 27, CombinedCallsiteInfo = 28, CombinedAllocInfo = 29, StackIds = 30, AllocContextIds = 31, ContextRadixTreeArray = 32,
}
Expand description

The summary section uses different codes in the per-module and combined index cases.

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

PerModule = 1

PERMODULE

[valueid, flags, instcount, numrefs, numrefs x valueid, n x (valueid)]

§

PerModuleProfile = 2

PERMODULE_PROFILE

[valueid, flags, instcount, numrefs, numrefs x valueid, n x (valueid, hotness+tailcall)]

§

PerModuleGlobalvarInitRefs = 3

PERMODULE_GLOBALVAR_INIT_REFS

[valueid, flags, n x valueid]

§

Combined = 4

COMBINED

[valueid, modid, flags, instcount, numrefs, numrefs x valueid, n x (valueid)]

§

CombinedProfile = 5

COMBINED_PROFILE

[valueid, modid, flags, instcount, numrefs, numrefs x valueid, n x (valueid, hotness+tailcall)]

§

CombinedGlobalvarInitRefs = 6

COMBINED_GLOBALVAR_INIT_REFS

[valueid, modid, flags, n x valueid]

§

Alias = 7

ALIAS

[valueid, flags, valueid]

§

CombinedAlias = 8

COMBINED_ALIAS

[valueid, modid, flags, valueid]

§

CombinedOriginalName = 9

COMBINED_ORIGINAL_NAME

[original_name_hash]

§

Version = 10

VERSION of the summary, bumped when adding flags for instance.

§

TypeTests = 11

The list of llvm.type.test type identifiers used by the following function that are used other than by an llvm.assume.

[n x typeid]

§

TypeTestAssumeVCalls = 12

The list of virtual calls made by this function using llvm.assume(llvm.type.test) intrinsics that do not have all constant integer arguments.

[n x (typeid, offset)]

§

TypeCheckedLoadVCalls = 13

The list of virtual calls made by this function using llvm.type.checked.load intrinsics that do not have all constant integer arguments.

[n x (typeid, offset)]

§

TypeTestAssumeConstVCall = 14

Identifies a virtual call made by this function using an llvm.assume(llvm.type.test) intrinsic with all constant integer arguments.

[typeid, offset, n x arg]

§

TypeCheckedLoadConstVCall = 15

Identifies a virtual call made by this function using an llvm.type.checked.load intrinsic with all constant integer arguments.

[typeid, offset, n x arg]

§

ValueGuid = 16

Assigns a GUID to a value ID. This normally appears only in combined summaries, but it can also appear in per-module summaries for PGO data.

[valueid, guid]

§

CfiFunctionDefs = 17

The list of local functions with CFI jump tables. Function names are strings in strtab.

[n * name]

§

CfiFunctionDecls = 18

The list of external functions with CFI jump tables. Function names are strings in strtab.

[n * name]

§

PerModuleRelBf = 19

Per-module summary that also adds relative block frequency to callee info.

PERMODULE_RELBF

[valueid, flags, instcount, numrefs, numrefs x valueid, n x (valueid, relblockfreq+tailcall)]

§

Flags = 20

Index-wide flags

§

TypeId = 21

Maps type identifier to summary information for that type identifier. Produced by the thin link (only lives in combined index).

TYPE_ID

[typeid, kind, bitwidth, align, size, bitmask, inlinebits, n x (typeid, kind, name, numrba, numrba x (numarg, numarg x arg, kind, info, byte, bit)]

§

TypeIdMetadata = 22

Maps type identifier to summary information for that type identifier computed from type metadata: the valueid of each vtable definition decorated with a type metadata for that identifier, and the offset from the corresponding type metadata. Exists in the per-module summary to provide information to thin link for index-based whole program devirtualization.

For background see overview at https://llvm.org/docs/TypeMetadata.html. The type metadata includes both the type identifier and the offset of the address point of the type (the address held by objects of that type which may not be the beginning of the virtual table). Vtable definitions are decorated with type metadata for the types they are compatible with.

TYPE_ID_METADATA

[typeid, n x (valueid, offset)]

§

PerModuleVtableGlobalvarInitRefs = 23

Summarizes vtable definition for use in index-based whole program devirtualization during the thin link.

PERMODULE_VTABLE_GLOBALVAR_INIT_REFS

[valueid, flags, varflags, numrefs, numrefs x valueid, n x (valueid, offset)]

§

BlockCount = 24

The total number of basic blocks in the module.

This is for pre-allocation of storage.

§

ParamAccess = 25

Range information for accessed offsets for every argument.

[n x (paramno, range, numcalls, numcalls x (callee_guid, paramno, range))]

§

PerModuleCallsiteInfo = 26

Summary of per-module memprof callsite metadata.

[valueid, n x stackidindex]

§

PerModuleAllocInfo = 27

Summary of per-module allocation memprof metadata.

[nummib, nummib x (alloc type, context radix tree index), [nummib x (numcontext x total size)]?]

§

CombinedCallsiteInfo = 28

Summary of combined index memprof callsite metadata.

[valueid, context radix tree index, numver, numver x version]

§

CombinedAllocInfo = 29

Summary of combined index allocation memprof metadata.

[nummib, numver, nummib x (alloc type, numstackids, numstackids x stackidindex), numver x version]

§

StackIds = 30

List of all stack ids referenced by index in the callsite and alloc infos.

[n x stack id]

§

AllocContextIds = 31

List of all full stack id pairs corresponding to the total sizes recorded at the end of the alloc info when reporting of hinted bytes is enabled. We use a fixed-width array, which is more efficient as these ids typically are close to 64 bits in size. The max fixed width value supported is 32 bits so each 64-bit context id hash is recorded as a pair (upper 32 bits first). This record must immediately precede the associated alloc info, and the entries must be in the exact same order as the corresponding sizes.

[nummib x (numcontext x full stack id)]

§

ContextRadixTreeArray = 32

Linearized radix tree of allocation contexts.

[n x entry]

Trait Implementations§

Source§

impl Clone for GlobalValueSummaryCode

Source§

fn clone(&self) -> GlobalValueSummaryCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for GlobalValueSummaryCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl TryFrom<u8> for GlobalValueSummaryCode

Source§

type Error = TryFromPrimitiveError<GlobalValueSummaryCode>

The type returned in the event of a conversion error.
Source§

fn try_from(number: u8) -> Result<Self, TryFromPrimitiveError<Self>>

Performs the conversion.
Source§

impl TryFromPrimitive for GlobalValueSummaryCode

Source§

const NAME: &'static str = "GlobalValueSummaryCode"

Source§

type Primitive = u8

Source§

type Error = TryFromPrimitiveError<GlobalValueSummaryCode>

Source§

fn try_from_primitive( number: Self::Primitive, ) -> Result<Self, TryFromPrimitiveError<Self>>

Source§

impl Copy for GlobalValueSummaryCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.