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.
Definition at line 2349 of file DebugInfoMetadata.h.
Definition at line 2385 of file DebugInfoMetadata.h.
Definition at line 2527 of file DebugInfoMetadata.h.
Append the opcodes Ops to DIExpr.
Unlike appendToStack, the returned expression is a stack value only if DIExpr is a stack value. If DIExpr describes a fragment, the returned expression will describe the same fragment.
Definition at line 1006 of file DebugInfoMetadata.cpp.
References llvm::SmallVectorImpl< T >::append(), assert(), llvm::ArrayRef< T >::begin(), llvm::dwarf::DW_OP_LLVM_fragment, llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), expr_ops(), llvm::MDNode::get(), llvm::MDNode::getContext(), and llvm::None.
Referenced by appendToStack(), and llvm::LowerDbgDeclare().
Append Ops with operations to apply the Offset.
Definition at line 912 of file DebugInfoMetadata.cpp.
References llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by replaceOneDbgValueForAlloca(), and llvm::salvageDebugInfoImpl().
Convert DIExpr into a stack value if it isn't one already by appending DW_OP_deref if needed, and appending Ops to the resulting expression.
If DIExpr describes a fragment, the returned expression will describe the same fragment.
Definition at line 1028 of file DebugInfoMetadata.cpp.
References llvm::SmallVectorImpl< T >::append(), append(), assert(), llvm::ArrayRef< T >::back(), llvm::ArrayRef< T >::begin(), llvm::ArrayRef< T >::drop_back(), llvm::dwarf::DW_OP_LLVM_fragment, llvm::ArrayRef< T >::empty(), llvm::ArrayRef< T >::end(), getElements(), getFragmentInfo(), getNumElements(), llvm::Optional< T >::hasValue(), llvm::none_of(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Definition at line 2486 of file DebugInfoMetadata.h.
Create a DIExpression to describe one part of an aggregate variable that is fragmented across multiple Values.
The DW_OP_LLVM_fragment operation will be appended to the elements of Expr. If Expr already contains a DW_OP_LLVM_fragment OffsetInBits is interpreted as an offset into the existing fragment.
OffsetInBits Offset of the piece in bits.
SizeInBits Size of the piece in bits.
Creating a fragment expression may fail if Expr contains arithmetic operations that would be truncated.
Definition at line 1061 of file DebugInfoMetadata.cpp.
References assert(), llvm::dwarf::DW_OP_LLVM_fragment, expr_ops(), llvm::MDNode::get(), llvm::MDNode::getContext(), llvm::None, and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by getUnderlyingArgReg(), llvm::SelectionDAGBuilder::handleDebugValue(), llvm::SelectionDAG::transferDbgValues(), and transferSRADebugInfo().
Definition at line 2369 of file DebugInfoMetadata.h.
Definition at line 2387 of file DebugInfoMetadata.h.
Referenced by llvm::DwarfCompileUnit::constructLabelDIE(), and rotateSign().
Definition at line 2388 of file DebugInfoMetadata.h.
Visit the elements via ExprOperand wrappers.
These range iterators visit elements through ExprOperand wrappers. This is not guaranteed to be a valid range unless isValid() gives true.
Definition at line 2473 of file DebugInfoMetadata.h.
Referenced by llvm::DIExpressionCursor::DIExpressionCursor(), and llvm::DbgVariableLocation::extractFromMachineInstruction().
Definition at line 2476 of file DebugInfoMetadata.h.
Definition at line 2479 of file DebugInfoMetadata.h.
Referenced by append(), createFragmentExpression(), emitDebugValueComment(), and prependOpcodes().
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>="">.
Definition at line 949 of file DebugInfoMetadata.cpp.
References llvm::MDNode::get(), llvm::MDNode::getContext(), and llvm::makeArrayRef().
Referenced by llvm::DwarfCompileUnit::addLocationAttribute(), and llvm::DwarfCompileUnit::constructLabelDIE().
If this is a constant offset, extract it.
If there is no expression, return true with an offset of zero.
Definition at line 924 of file DebugInfoMetadata.cpp.
Determine the relative position of the fragments described by this DIExpression and Other.
Returns -1 if this is entirely before Other, 0 if this and Other overlap, 1 if this is entirely after Other.
Definition at line 2572 of file DebugInfoMetadata.h.
References getFragmentInfo(), r1(), and r2().
Check if fragments overlap between this DIExpression and Other.
Definition at line 2588 of file DebugInfoMetadata.h.
Referenced by llvm::DebugHandlerBase::beginFunction(), llvm::SelectionDAGBuilder::dropDanglingDebugInfo(), handleNewDebugValue(), and stashEntryDbgValues().
Definition at line 2377 of file DebugInfoMetadata.h.
References assert(), I, isConstant(), and llvm::ArrayRef< T >::size().
Definition at line 2373 of file DebugInfoMetadata.h.
Referenced by appendToStack(), llvm::MDNodeKeyImpl< DIExpression >::isKeyOf(), and rotateSign().
Definition at line 903 of file DebugInfoMetadata.cpp.
Referenced by llvm::DwarfExpression::addFragmentOffset(), appendToStack(), fragmentCmp(), llvm::SelectionDAGBuilder::handleDebugValue(), llvm::operator<(), and sortGlobalExprs().
Definition at line 2506 of file DebugInfoMetadata.h.
Definition at line 2375 of file DebugInfoMetadata.h.
Referenced by appendToStack(), emitDebugValueComment(), and getSubprogram().
Determine whether this represents a standalone constant value.
Definition at line 1097 of file DebugInfoMetadata.cpp.
References assert(), DEFINE_GETIMPL_LOOKUP, DEFINE_GETIMPL_STORE, DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS, llvm::dwarf::DW_OP_LLVM_fragment, File, isCanonical(), Name, and llvm::DILocation::Scope.
Definition at line 2511 of file DebugInfoMetadata.h.
Referenced by llvm::DwarfExpression::addFragmentOffset(), fragmentsOverlap(), and llvm::DebugLocEntry::Value::isFragment().
Definition at line 843 of file DebugInfoMetadata.cpp.
References llvm::dwarf::DW_OP_LLVM_convert, llvm::dwarf::DW_OP_LLVM_fragment, E, and I.
Prepend DIExpr with a deref and offset operation and optionally turn it into a stack value.
Definition at line 967 of file DebugInfoMetadata.cpp.
Referenced by AssignProtectedObjSet(), computeExprForSpill(), llvm::createNVPTXPrologEpilogPass(), llvm::createX86OptimizeLEAs(), findNextInsertLocation(), INITIALIZE_PASS(), processDbgDeclares(), llvm::replaceDbgDeclare(), and llvm::SelectionDAG::salvageDebugInfo().
Prepend DIExpr with the given opcodes and optionally turn it into a stack value.
Definition at line 981 of file DebugInfoMetadata.cpp.
References assert(), llvm::dwarf::DW_OP_LLVM_fragment, llvm::SmallVectorBase::empty(), expr_ops(), llvm::MDNode::get(), llvm::MDNode::getContext(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().
Referenced by llvm::salvageDebugInfoImpl(), and TryToShrinkGlobalToBoolean().
Return whether the first element a DW_OP_deref.
Definition at line 2491 of file DebugInfoMetadata.h.
Definition at line 2350 of file DebugInfoMetadata.h.
Definition at line 2351 of file DebugInfoMetadata.h.