Metadata node.
Metadata nodes can be uniqued, like constants, or distinct. Temporary metadata nodes (with full support for RAUW) can be used to delay uniquing until forward references are known. The basic metadata node is an MDTuple.
There is limited support for RAUW at construction time. At construction time, if any operand is a temporary node (or an unresolved uniqued node, which indicates a transitive temporary operand), the node itself will be unresolved. As soon as all operands become resolved, it will drop RAUW support permanently.
If an unresolved node is part of a cycle, resolveCycles() needs to be called on some member of the cycle once all temporary nodes have been replaced.
MDNodes can be large or small, as well as resizable or non-resizable. Large MDNodes' operands are allocated in a separate storage vector, whereas small MDNodes' operands are co-allocated. Distinct and temporary MDnodes are resizable, but only MDTuples support this capability.
Clients can add operands to resizable MDNodes using push_back().
| Name | Description |
|---|---|
Metadata | Root of the metadata hierarchy. |
| Name | Description |
|---|---|
op_iterator | Iterator over this node's operands. |
op_range | Range of this node's operands. |
| Name | Description |
|---|---|
MetadataKind | RTTI identifiers for concrete metadata subclasses. |
| Name | Description |
|---|---|
MDNode [constructor] [deleted] | Copy construction is deleted; MDNode is non-copyable. |
operator= [deleted] | Copy assignment is deleted; MDNode is non-copyable. |
clone | Create a (temporary) clone of this. |
dump | dump overloads |
dumpTree | dumpTree overloads |
getContext | Return the LLVM context that owns this node. |
getMetadataID | Return the metadata kind ID for this node. |
getNumOperands | Return number of MDNode operands. |
getNumTemporaryUses | Return the number of uses of this temporary metadata node. |
getOperand | Return the operand at index I. |
isAlwaysReplaceable | Return true if this node kind is always RAUW-replaceable (e.g. DIAssignID). |
isDistinct | Return true if this node is distinct (not uniqued). |
isReplaceable | Return true if this node supports RAUW replacement. |
isResolved | Check if node is fully resolved. |
isTBAAVtableAccess | Check whether MDNode is a vtable access. |
isTemporary | Return true if this is a temporary (forward-declaration) metadata node. |
isUniqued | Return true if this node is uniqued in the context. |
op_begin | Return an iterator to the first operand. |
op_end | Return an iterator past the last operand. |
operands | Return this node's operands as an array reference. |
operator new [deleted] | Ordinary allocation is deleted; use the custom MDNode allocators. |
print | print overloads |
printAsOperand | printAsOperand overloads |
printTree | printTree overloads |
replaceAllUsesWith | RAUW a temporary. |
replaceOperandWith | Replace a specific operand. |
resolve | Resolve a unique, unresolved node. |
resolveCycles | Resolve cycles. |
| Name | Description |
|---|---|
classof | Methods for support type inquiry through isa, cast, and dyn_cast: |
concatenate | Methods for metadata merging. Concatenate metadata nodes A and B. |
deleteTemporary | Deallocate a node created by getTemporary. |
fromCaptureComponents | Convert CaptureComponents to !captures metadata. The return value may be nullptr. |
get | Return a uniqued tuple metadata node with operands MDs. |
getDistinct | Return a distinct (non-uniqued) tuple with operands MDs. |
getIfExists | Return an existing uniqued tuple for MDs, or null if none. |
getMergedAllocTokenMetadata | Merge alloc-token metadata from two instructions. |
getMergedCalleeTypeMetadata | Merge callee-type metadata from two instructions. |
getMergedCallsiteMetadata | Merge callsite metadata from two instructions. |
getMergedMemProfMetadata | Merge memprof metadata from two instructions. |
getMergedProfMetadata | Merge !prof metadata from two instructions. Currently only implemented with direct callsites with branch weights. |
getMostGenericAliasScope | Merge alias-scope metadata, keeping scopes present in both. |
getMostGenericAlignmentOrDereferenceable | Merge align/dereferenceable metadata, returning the most generic bound. |
getMostGenericFPMath | Merge FP-math metadata, returning the most generic accuracy. |
getMostGenericNoFPClass | Merge !nofpclass metadata by intersecting the allowed FP classes. |
getMostGenericNoaliasAddrspace | Merge noalias address-space metadata, returning the most generic set. |
getMostGenericRange | Merge !range metadata by taking the union of the integer intervals. |
getMostGenericTBAA | Merge TBAA metadata, returning the most generic common tag. |
getTemporary | Return a temporary tuple with operands MDs. |
intersect | Intersect metadata nodes A and B. |
replaceWithDistinct | Replace a temporary node with a distinct one. |
replaceWithPermanent | Replace a temporary node with a permanent one. |
replaceWithUniqued | Replace a temporary node with a uniqued one. |
toCaptureComponents | Convert !captures metadata to CaptureComponents. MD may be nullptr. |
| Name | Description |
|---|---|
PoisonGeneratingIDs | Metadata IDs that may generate poison. |
| Name | Description |
|---|---|
mutable_op_range | Range type over mutable MDOperand elements. |
| Name | Description |
|---|---|
StorageType | Active type of storage. |
| Name | Description |
|---|---|
MDNode [constructor] | Construct an MDNode in Context with subclass ID and operands. |
~MDNode [destructor] | Destroy this metadata node. |
dropAllReferences | Drop all references held by this metadata node. |
getNumUnresolved | Return the number of unresolved operands in this node. |
handleChangedOperand | Default handling of a changed operand, which asserts. |
mutable_begin | Return an iterator to the first mutable operand. |
mutable_end | Return an iterator past the last mutable operand. |
mutable_operands | Return a mutable range over this node's operands. |
operator delete | Delete operators |
operator new | Allocate an MDNode with NumOps operand slots and Storage kind. |
resize | Resize the node to hold NumOps operands. |
setNumUnresolved | Set the number of unresolved operands in this node. |
setOperand | Set an operand. |
storeDistinctInContext | Register this node as a distinct MDNode owned by the LLVMContext. |
| Name | Description |
|---|---|
storeImpl | storeImpl overloads |
| Name | Description |
|---|---|
Storage | Storage flag for non-uniqued, otherwise unowned, metadata. |
SubclassData1 | One bit of subclass-specific state packed into the metadata header. |
SubclassData16 | Sixteen bits of subclass-specific state packed into the metadata header. |
SubclassData32 | Thirty-two bits of subclass-specific state packed into the metadata header. |
| Name | Description |
|---|---|
llvm::DIAssignID | Assignment ID linking stores to dbg.assign intrinsics. |
llvm::LLVMContextImpl | Private implementation details of LLVMContext. |
llvm::ReplaceableMetadataImpl | Shared implementation of use-lists for replaceable metadata. |
| Name | Description |
|---|---|
GetUnrollMetadata | Return the named unroll hint metadata operand from loop id LoopID. |
MapMetadata | Lookup or compute a mapping for a piece of metadata. |
MapMetadata | Version of MapMetadata with type safety for MDNode. |
UpgradeTBAANode | Upgrade a scalar TBAA tag to the struct-path aware TBAA format. |
computeKnownBitsFromRangeMetadata | Compute known bits from the range metadata. KnownZero the set of bits that are known to be zero KnownOne the set of bits that are known to be one |
extractBranchWeights | Extract branch weights from MD_prof metadata |
extractFromBranchWeightMD32 | Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint32_t. |
extractFromBranchWeightMD64 | Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint64_t. |
extractProfTotalWeight | Retrieve the total of all weights from MD_prof data. |
findOptionMDForLoop | Find string metadata for a loop. |
findOptionMDForLoopID | Find and return the loop attribute node for the attribute Name in LoopID. Return nullptr if there is no such attribute. |
getBranchWeightMDNode | Get the branch weights metadata node |
getBranchWeightOffset | Return the offset to the first branch weight data |
getConstantRangeFromMetadata | Parse out a conservative ConstantRange from !range metadata. |
getDISubprogram | Find subprogram that is enclosing this scope. |
getExplicitlyUnknownBranchWeightsIfProfiled | Returns a metadata node containing unknown branch weights if the function has an entry count, otherwise returns nullptr. |
getMemCacheHintMetadata | Return the cache hint metadata node for a memory operand. |
getNumBranchWeights | Return the number of branch weights stored in ProfileData |
getPGOFuncNameMetadata | Return the PGOFuncName metadata node associated with function F. |
getUnrollMetadataForLoop | Return the named unroll hint metadata node attached to loop L. |
getValidBranchWeightMDNode | Get the valid branch weights metadata node |
hasBranchWeightOrigin | Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic |
intersectAccessGroups | Compute the intersection of access groups on two instructions. |
isBranchWeightMD | Checks if an MDNode contains Branch Weight Metadata |
isExplicitlyUnknownProfileMetadata | Check whether MD is explicitly-unknown profile metadata. |
isValidAsAccessGroup | Return whether an MDNode might represent an access group. |
isValueProfileMD | Checks if an MDNode contains value profiling Metadata |
makeFollowupLoopID | Create a new loop identifier for a loop created from a loop transformation. |
makePostTransformationMetadata | Create a new LoopID after the loop has been transformed. |
uniteAccessGroups | Compute the union of two access-group lists. |
upgradeInstructionLoopAttachment | Upgrade the loop attachment metadata node. |
wrap | Wrap a Metadata pointer as an opaque LLVMMetadataRef. |
memprof::buildCallstackMetadata | Build callstack metadata from the provided list of call stack ids. |
memprof::getMIBAllocType | Returns the allocation type from an MIB metadata node. |
memprof::getMIBStackNode | Returns the stack node from an MIB metadata node. |
| Name | Description |
|---|---|
DIAssignID | Assignment ID linking stores to dbg.assign intrinsics. |
DIExpression | DWARF expression. |
DIGlobalVariableExpression | A pair of DIGlobalVariable and DIExpression. |
DILocation | Debug location. |
DIMacroNode | Macro Info DWARF-like metadata node. |
DINode | Tagged DWARF-like metadata node. |
MDTuple | Tuple of metadata. |