llvm::DISubprogram

Subprogram description. Uses SubclassData1.

Synopsis

Declared in <llvm/IR/DebugInfoMetadata.h>

class DISubprogram
    : public DILocalScope

Base Classes

NameDescription
DILocalScopeA scope for locals.

Type Aliases

NameDescription
op_iterator Iterator over this node's operands.
op_range Range of this node's operands.

Enums

NameDescription
DIFlags Debug info flags.
DISPFlags Debug info subprogram flags.
MetadataKind RTTI identifiers for concrete metadata subclasses.

Member Functions

NameDescription
operator= [deleted]Copy assignment is deleted; MDNode is non-copyable.
areAllCallsDescribed Return true if all calls described.
cleanupRetainedNodes Remove cross-subprogram retained-node references after merging.
cleanupRetainedNodesIf Filter retained nodes with predicate Pred.
clone Return a (temporary) clone of this.
cloneWithFlags Returns a new temporary DISubprogram with updated Flags
describes Check if this subprogram describes the given function.
dump dump overloads
dumpTree dumpTree overloads
forEachRetainedNode Invoke callbacks for every retained node on this subprogram.
getAnnotations Return the annotations.
getContainingType Return the containing type.
getContext Return the LLVM context that owns this node.
getDeclaration Return the declaration.
getDirectory Return the directory.
getFile Return the file.
getFilename Return the filename.
getFlags Return the flags.
getKeyInstructionsEnabled Return the key instructions enabled.
getLine Return the line.
getLinkageName Return the linkage name.
getMetadataID Return the metadata kind ID for this node.
getName Return the name.
getNonLexicalBlockFileScope Get the first non DILexicalBlockFile scope of this scope.
getNumOperands Return number of MDNode operands.
getNumTemporaryUses Return the number of uses of this temporary metadata node.
getOperand Return the operand at index I.
getRawAnnotations Return the raw annotations operand.
getRawContainingType Return the raw containing type operand.
getRawDeclaration Return the raw declaration operand.
getRawFile Return the raw underlying file.
getRawLinkageName Return the raw linkage name operand.
getRawName Return the raw name operand.
getRawRetainedNodes Return the raw retained nodes operand.
getRawScope Return the raw scope operand.
getRawTargetFuncName Return the raw target func name operand.
getRawTemplateParams Return the raw template params operand.
getRawThrownTypes Return the raw thrown types operand.
getRawType Return the raw type operand.
getRawUnit Return the raw unit operand.
getRetainedNodes Return the retained nodes.
getSPFlags Return the sp flags.
getScope Return the scope.
getScopeLine Return the scope line.
getSource Return the source.
getSubprogram Get the subprogram for this scope.
getTag Return the tag.
getTargetFuncName Return the target func name.
getTemplateParams Return the template params.
getThisAdjustment Return the this adjustment.
getThrownTypes Return the thrown types.
getType Return the type.
getUnit Return the unit.
getVirtualIndex Return the virtual index.
getVirtuality Return the virtuality.
isAlwaysReplaceable Return true if this node kind is always RAUW-replaceable (e.g. DIAssignID).
isArtificial Return true if this is artificial.
isDefinition Return true if this is definition.
isDeleted Check if this is deleted member function.
isDistinct Return true if this node is distinct (not uniqued).
isElemental Return true if this is elemental.
isExplicit Return true if this is explicit.
isLValueReference Check if this is reference-qualified.
isLocalToUnit Return true if this is local to unit.
isMainSubprogram Return true if this is main subprogram.
isNameSimplified Return true if this is name simplified.
isNoReturn Check if this is marked as noreturn.
isObjCDirect Return true if this is obj c direct.
isOptimized Return true if this is optimized.
isPrivate Return true if this is private.
isProtected Return true if this is protected.
isPrototyped Return true if this is prototyped.
isPublic Return true if this is public.
isPure Return true if this is pure.
isRValueReference Check if this is rvalue-reference-qualified.
isRecursive Return true if this is recursive.
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.
isThunk Return true if this is thunk.
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.
replaceDeclaration Replace the declaration.
replaceLinkageName Only used by clients of CloneFunction, and only right after the cloning.
replaceOperandWith Replace a specific operand.
replaceRawLinkageName Replace the raw linkage name.
replaceRetainedNodes Replace the retained nodes.
replaceType Replace the type.
replaceUnit Replace the unit.
resolve Resolve a unique, unresolved node.
resolveCycles Resolve cycles.
retainNodes Retain the given metadata nodes on this subprogram.
setScopeLine Set the scope line.

Static Member Functions

NameDescription
classof Check whether MD is this kind of metadata.
cleanupRetainedNodes Calls SP->cleanupRetainedNodes() for each distinct subprogram in the range.
cloneScopeForSubprogram Traverses the scope chain rooted at RootScope until it hits a Subprogram, recreating the chain with "NewSP" instead.
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 get overloads
getDistinct getDistinct overloads
getFlag Return the flag.
getFlagString Return the flag string.
getIfExists getIfExists overloads
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.
getRawRetainedNodeScope Return the raw retained node scope operand.
getRetainedNodeScope getRetainedNodeScope overloads
getTemporary getTemporary overloads
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 splitFlags overloads
toCaptureComponents Convert !captures metadata to CaptureComponents. MD may be nullptr.
toSPFlags Pack subprogram flags into a DISPFlags bitfield.
visitRetainedNode Visit one retained node with the appropriate callback.

Static Data Members

NameDescription
PoisonGeneratingIDs Metadata IDs that may generate poison.

Protected Type Aliases

NameDescription
mutable_op_range Range type over mutable MDOperand elements.

Protected Enums

NameDescription
StorageType Active type of storage.

Protected Member Functions

NameDescription
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.
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.
setTag Allow subclasses to mutate the tag.
storeDistinctInContext Register this node as a distinct MDNode owned by the LLVMContext.

Protected Static Member Functions

NameDescription
getCanonicalMDString Return the canonical md string.
storeImpl storeImpl overloads

Protected Data Members

NameDescription
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.

Friends

NameDescription
llvm::MDNodeMetadata node.
llvm::LLVMContextImplPrivate implementation details of LLVMContext.

Non-Member Functions

NameDescription
GetUnrollMetadataReturn the named unroll hint metadata operand from loop id LoopID.
MapMetadataLookup or compute a mapping for a piece of metadata.
MapMetadataVersion of MapMetadata with type safety for MDNode.
UpgradeTBAANodeUpgrade a scalar TBAA tag to the struct-path aware TBAA format.
computeKnownBitsFromRangeMetadataCompute 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
extractBranchWeightsExtract branch weights from MD_prof metadata
extractFromBranchWeightMD32Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint32_t.
extractFromBranchWeightMD64Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint64_t.
extractProfTotalWeightRetrieve the total of all weights from MD_prof data.
findOptionMDForLoopIDFind and return the loop attribute node for the attribute Name in LoopID. Return nullptr if there is no such attribute.
getBranchWeightOffsetReturn the offset to the first branch weight data
getConstantRangeFromMetadataParse out a conservative ConstantRange from !range metadata.
getDISubprogramFind subprogram that is enclosing this scope.
getNumBranchWeightsReturn the number of branch weights stored in ProfileData
hasBranchWeightOriginCheck if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic
isBranchWeightMDChecks if an MDNode contains Branch Weight Metadata
isExplicitlyUnknownProfileMetadataCheck whether MD is explicitly-unknown profile metadata.
isValidAsAccessGroupReturn whether an MDNode might represent an access group.
isValueProfileMDChecks if an MDNode contains value profiling Metadata
makeFollowupLoopIDCreate a new loop identifier for a loop created from a loop transformation.
uniteAccessGroupsCompute the union of two access-group lists.
upgradeInstructionLoopAttachmentUpgrade the loop attachment metadata node.
wrapWrap a Metadata pointer as an opaque LLVMMetadataRef.
memprof::getMIBAllocTypeReturns the allocation type from an MIB metadata node.
memprof::getMIBStackNodeReturns the stack node from an MIB metadata node.