DWARF expression.
Synopsis
Declared in <llvm/IR/DebugInfoMetadata.h>
class DIExpression
: public MDNode
Description
This is (almost) a DWARF expression that modifies the location of a variable, or the location of a single piece of a variable, or (when using DW_OP_stack_value) is the constant variable value.
TODO: Co‐allocate the expression elements. TODO: Separate from MDNode, or otherwise drop Distinct and Temporary storage types.
Base Classes
Name |
Description |
Metadata node. |
Types
Name |
Description |
A view of a DW_OP_LLVM_arg operation. |
|
A view of a DW_OP_constu operation. |
|
A view of a DW_OP_LLVM_convert operation. |
|
A view of a DW_OP_LLVM_entry_value operation. |
|
A lightweight wrapper around an expression operand. |
|
A view of the DW_OP_LLVM_extract_bits_[sz]ext operations. |
|
A view of a DW_OP_LLVM_fragment operation. |
|
A view of a DW_OP_plus_uconst operation. |
|
A view of a DW_OP_LLVM_tag_offset operation. |
|
An iterator for expression operands. |
Type Aliases
Name |
Description |
Opcode sequence used to append a zero or sign extension. |
|
Fragment describing a bit‐range within a variable. |
|
Iterator over DIExpression element words. |
|
Iterator over this node's operands. |
|
Range of this node's operands. |
Enums
Name |
Description |
RTTI identifiers for concrete metadata subclasses. |
|
Flags controlling DIExpression::prepend. |
|
Sign information for a constant DIExpression. |
Member Functions
Name |
Description |
|
Copy assignment is deleted; MDNode is non‐copyable. |
Return a (temporary) clone of this. |
|
Constant‐fold a leading constant operand in a DIExpression. |
|
|
|
|
|
Return the elements begin. |
|
Return the elements end. |
|
Visit the elements via ExprOperand wrappers. |
|
Return the expr op end. |
|
Return the expr ops. |
|
If this is a constant offset, extract it. If there is no expression, return true with an offset of zero. |
|
Extract a leading constant address offset from an expression. |
|
Fold constant math operations in a DIExpression. |
|
Determine the relative position of the fragments described by this DIExpression and |
|
Check if fragments overlap between this DIExpression and |
|
Return how many bits in this expression still carry an active value. |
|
Return the LLVM context that owns this node. |
|
Return the element. |
|
Return the elements. |
|
Retrieve the details of this fragment expression. |
|
Return the metadata kind ID for this node. |
|
Return the num elements. |
|
Return the number of unique DW_OP_LLVM_arg location operands. |
|
Return number of MDNode operands. |
|
Return the number of uses of this temporary metadata node. |
|
Return the operand at index |
|
Return expression elements, skipping a leading DW_OP_LLVM_arg 0. |
|
Returns true iff this DIExpression contains at least one instance of |
|
Return true if this node kind is always RAUW‐replaceable (e.g. DIAssignID). |
|
Return whether the location is computed on the expression stack, meaning it cannot be a simple register location. |
|
Return true if this is constant. |
|
Return whether there is exactly one operator and it is a DW_OP_deref; |
|
Return true if this node is distinct (not uniqued). |
|
Check if the expression consists of exactly one entry value operand. (This is the only configuration of entry values that is supported.) |
|
Return whether this is a piece of an aggregate variable. |
|
Return whether this is an implicit location description. |
|
Return true if this node supports RAUW replacement. |
|
Check if node is fully resolved. |
|
Return true if this expression uses a single starting location. |
|
Check whether MDNode is a vtable access. |
|
Return true if this is a temporary (forward‐declaration) metadata node. |
|
Return true if this node is uniqued in the context. |
|
Return true if this is valid. |
|
Return an iterator to the first operand. |
|
Return an iterator past the last operand. |
|
Return this node's operands as an array reference. |
|
|
Ordinary allocation is deleted; use the custom MDNode allocators. |
|
|
|
|
|
|
RAUW a temporary. |
|
Replace a specific operand. |
|
Resolve a unique, unresolved node. |
|
Resolve cycles. |
|
Return whether the first element a DW_OP_deref. |
Static Member Functions
Name |
Description |
Append opcodes to a DIExpression. |
|
Append a zero‐ or sign‐extension to |
|
Append |
|
Append opcodes to each use of a given DW_OP_LLVM_arg. |
|
Append opcodes after ensuring the expression is a stack value. |
|
Computes a fragment, bit‐extract operation if needed, and new constant offset to describe a part of a variable covered by some memory. |
|
Rewrite expression ops into a canonical variadic form. |
|
Check whether |
|
Methods for metadata merging. Concatenate metadata nodes |
|
Convert a single‐location expression to non‐variadic form. |
|
Convert an expression into one suitable for an undef debug value. |
|
Convert a non‐variadic expression into variadic form. |
|
Create a DIExpression describing one fragment of an aggregate. |
|
Deallocate a node created by getTemporary. |
|
Checks if the last 4 elements of the expression are DW_OP_constu <DWARF Address Space> DW_OP_swap DW_OP_xderef and extracts the <DWARF Address Space>. |
|
Extract a leading constant address offset from expression ops. |
|
Compare the relative position of two fragments. |
|
Check if fragments overlap between a pair of FragmentInfos. |
|
Convert CaptureComponents to !captures metadata. The return value may be nullptr. |
|
|
|
|
|
Returns the ops for a zero‐ or sign‐extension in a DIExpression. |
|
Retrieve the details of this fragment expression. |
|
|
|
Merge alloc‐token metadata from two instructions. |
|
Merge callee‐type metadata from two instructions. |
|
Merge callsite metadata from two instructions. |
|
Merge memprof metadata from two instructions. |
|
Merge !prof metadata from two instructions. Currently only implemented with direct callsites with branch weights. |
|
Merge alias‐scope metadata, keeping scopes present in both. |
|
Merge align/dereferenceable metadata, returning the most generic bound. |
|
Merge FP‐math metadata, returning the most generic accuracy. |
|
Merge |
|
Merge noalias address‐space metadata, returning the most generic set. |
|
Merge !range metadata by taking the union of the integer intervals. |
|
Merge TBAA metadata, returning the most generic common tag. |
|
|
|
Intersect metadata nodes |
|
Return true if two debug values produce equivalent DWARF expressions. |
|
Prepend |
|
Prepend |
|
Remap DW_OP_LLVM_arg indices in a DIExpression. |
|
Replace a temporary node with a distinct one. |
|
Replace a temporary node with a permanent one. |
|
Replace a temporary node with a uniqued one. |
|
Convert !captures metadata to CaptureComponents. MD may be nullptr. |
Static Data Members
Name |
Description |
Metadata IDs that may generate poison. |
Protected Type Aliases
Name |
Description |
Range type over mutable |
Protected Enums
Name |
Description |
Active type of storage. |
Protected Member Functions
Name |
Description |
Drop all references held by this metadata node. |
|
Return the number of unresolved operands in this node. |
|
Default handling of a changed operand, which asserts. |
|
Return an iterator to the first mutable operand. |
|
Return an iterator past the last mutable operand. |
|
Return a mutable range over this node's operands. |
|
Delete operators |
|
Allocate an |
|
Resize the node to hold NumOps operands. |
|
Set the number of unresolved operands in this node. |
|
Set an operand. |
|
Register this node as a distinct MDNode owned by the LLVMContext. |
Protected Static Member Functions
Name |
Description |
|
Protected Data Members
Name |
Description |
Storage flag for non‐uniqued, otherwise unowned, metadata. |
|
One bit of subclass‐specific state packed into the metadata header. |
|
Sixteen bits of subclass‐specific state packed into the metadata header. |
|
Thirty‐two bits of subclass‐specific state packed into the metadata header. |
Friends
Name |
Description |
Metadata node. |
|
Private implementation details of |
Non-Member Functions
Name |
Description |
Return the named unroll hint metadata operand from loop id |
|
Lookup or compute a mapping for a piece of metadata. |
|
Version of MapMetadata with type safety for MDNode. |
|
Upgrade a scalar TBAA tag to the struct‐path aware TBAA format. |
|
Compute known bits from the range metadata. |
|
Extract branch weights from MD_prof metadata |
|
Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint32_t. |
|
Faster version of extractBranchWeights() that skips checks and must only be called with "branch_weights" metadata nodes. Supports uint64_t. |
|
Retrieve the total of all weights from MD_prof data. |
|
Find and return the loop attribute node for the attribute |
|
Return the offset to the first branch weight data |
|
Parse out a conservative ConstantRange from !range metadata. |
|
Find subprogram that is enclosing this scope. |
|
Create a debug‐info expression for a constant. |
|
Return the number of branch weights stored in |
|
Check if Branch Weight Metadata has an "expected" field from an llvm.expect* intrinsic |
|
Checks if an MDNode contains Branch Weight Metadata |
|
Check whether |
|
Return whether an MDNode might represent an access group. |
|
Checks if an MDNode contains value profiling Metadata |
|
Create a new loop identifier for a loop created from a loop transformation. |
|
Parse a DIExpression body at the beginning of the given string. |
|
Compute the union of two access‐group lists. |
|
Upgrade the loop attachment metadata node. |
|
Wrap a |
|
Returns the allocation type from an MIB metadata node. |
|
Returns the stack node from an MIB metadata node. |
Created with MrDocs