Base class for types.

Synopsis

Declared in <llvm/IR/DebugInfoMetadata.h>

class DIType
    : public DIScope

Description

TODO: Remove the hardcoded name and context, since many types don't use them. TODO: Split up flags.

Uses the SubclassData32 Metadata slot.

Base Classes

Name

Description

DIScope

Base class for scope‐like contexts.

Type Aliases

Name

Description

op_iterator

Iterator over this node's operands.

op_range

Range of this node's operands.

Enums

Name

Description

DIFlags

Debug info flags.

MetadataKind

RTTI identifiers for concrete metadata subclasses.

Member Functions

Name

Description

operator= [deleted]

Copy assignment is deleted; MDNode is non‐copyable.

clone

Return a (temporary) clone of this.

cloneWithFlags

Returns a new temporary DIType with updated Flags

dump

dump overloads

dumpTree

dumpTree overloads

getAlignInBits

Return the align in bits.

getAlignInBytes

Return the align in bytes.

getContext

Return the LLVM context that owns this node.

getDirectory

Return the directory.

getExportSymbols

Return the export symbols.

getFile

Return the file.

getFilename

Return the filename.

getFlags

Return the flags.

getLine

Return the line.

getMetadataID

Return the metadata kind ID for this node.

getName

Return the name.

getNumExtraInhabitants

Return the num extra inhabitants.

getNumOperands

Return number of MDNode operands.

getNumTemporaryUses

Return the number of uses of this temporary metadata node.

getOffsetInBits

Return the offset in bits.

getOperand

Return the operand at index I.

getRawFile

Return the raw underlying file.

getRawName

Return the raw name operand.

getRawOffsetInBits

Return the raw offset in bits operand.

getRawScope

Return the raw scope operand.

getRawSizeInBits

Return the raw size in bits operand.

getScope

Return the scope.

getSizeInBits

Return the size in bits.

getSource

Return the source.

getTag

Return the tag.

isAlwaysReplaceable

Return true if this node kind is always RAUW‐replaceable (e.g. DIAssignID).

isAppleBlockExtension

Return true if this is apple block extension.

isArtificial

Return true if this is artificial.

isBigEndian

Return true if this is big endian.

isBitField

Return true if this is bit field.

isDistinct

Return true if this node is distinct (not uniqued).

isForwardDecl

Return true if this is forward decl.

isLValueReference

Return true if this is l value reference.

isLittleEndian

Return true if this is little endian.

isObjcClassComplete

Return true if this is objc class complete.

isObjectPointer

Return true if this is object pointer.

isPrivate

Return true if this is private.

isProtected

Return true if this is protected.

isPublic

Return true if this is public.

isRValueReference

Return true if this is r value reference.

isReplaceable

Return true if this node supports RAUW replacement.

isResolved

Check if node is fully resolved.

isStaticMember

Return true if this is static member.

isTBAAVtableAccess

Check whether MDNode is a vtable access.

isTemporary

Return true if this is a temporary (forward‐declaration) metadata node.

isTypePassByReference

Return true if this is type pass by reference.

isTypePassByValue

Return true if this is type pass by value.

isUniqued

Return true if this node is uniqued in the context.

isVector

Return true if this is vector.

isVirtual

Return true if this is virtual.

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.

Static Member Functions

Name

Description

classof

Check whether MD is this kind of metadata.

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.

getFlag

Return the flag.

getFlagString

Return the flag string.

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.

splitFlags

Split up a flags bitfield.

toCaptureComponents

Convert !captures metadata to CaptureComponents. MD may be nullptr.

Static Data Members

Name

Description

PoisonGeneratingIDs

Metadata IDs that may generate poison.

Protected Type Aliases

Name

Description

mutable_op_range

Range type over mutable MDOperand elements.

Protected Enums

Name

Description

StorageType

Active type of storage.

Protected Member Functions

Name

Description

DIType [constructor]

Construct a DIType.

~DIType [destructor]

Destroy this DIType.

dropAllReferences

Drop all references held by this metadata node.

getNumUnresolved

Return the number of unresolved operands in this node.

getOperandAs

Return the operand as.

getStringOperand

Return the string operand.

handleChangedOperand

Default handling of a changed operand, which asserts.

init

Initialize common DIType fields.

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.

mutate

Change fields in place.

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.

setTag

Allow subclasses to mutate the tag.

storeDistinctInContext

Register this node as a distinct MDNode owned by the LLVMContext.

Protected Static Member Functions

Name

Description

getCanonicalMDString

Return the canonical md string.

storeImpl

storeImpl overloads

Protected Data Members

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.

Protected Static Data Members

Name

Description

N_OPERANDS

Number of fixed operands shared by all DIType subclasses.

Non-Member Functions

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.

findOptionMDForLoopID

Find and return the loop attribute node for the attribute Name in LoopID. Return nullptr if there is no such attribute.

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.

getNumBranchWeights

Return the number of branch weights stored in ProfileData

hasBranchWeightOrigin

Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic

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.

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::getMIBAllocType

Returns the allocation type from an MIB metadata node.

memprof::getMIBStackNode

Returns the stack node from an MIB metadata node.

Derived Classes

Name

Description

DIBasicType

Basic type, like 'int' or 'float'.

DICompositeType

Composite types.

DIDerivedType

Derived types.

DIStringType

String type, Fortran CHARACTER(n)

DISubrangeType

Subrange type. This is somewhat similar to DISubrange, but it is also a DIType.

DISubroutineType

Type array for a subprogram.

Created with MrDocs