29 DILocation::DILocation(
LLVMContext &
C, StorageType Storage,
unsigned Line,
32 :
MDNode(C, DILocationKind, Storage, MDs) {
34 "Expected a scope and optional inlined-at");
37 assert(Column < (1u << 16) &&
"Expected 16-bit column");
39 SubclassData32 = Line;
40 SubclassData16 = Column;
42 setImplicitCode(ImplicitCode);
47 if (Column >= (1u << 16))
53 Metadata *InlinedAt,
bool ImplicitCode,
54 StorageType Storage,
bool ShouldCreate) {
60 DILocationInfo::KeyTy(Line, Column, Scope,
61 InlinedAt, ImplicitCode)))
66 assert(ShouldCreate &&
"Expected non-uniqued nodes to always be created");
87 for (
DILocation *L = LocA->getInlinedAt(); L; L = L->getInlinedAt())
88 InlinedLocationsA.
insert(L);
93 Locations.
insert(std::make_pair(S, L));
97 L = L->getInlinedAt();
101 S = LocB->getScope();
102 L = LocB->getInlinedAt();
104 if (Locations.
count(std::make_pair(S, L)))
109 L = L->getInlinedAt();
115 if (!S || !isa<DILocalScope>(S))
116 S = LocA->getScope();
122 uint64_t RemainingWork = 0U;
128 RemainingWork = std::accumulate(Components.
begin(), Components.
end(), RemainingWork);
132 unsigned NextBitInsertionIndex = 0;
133 while (RemainingWork > 0) {
134 unsigned C = Components[I++];
136 unsigned EC = encodeComponent(C);
137 Ret |= (EC << NextBitInsertionIndex);
138 NextBitInsertionIndex += encodingBits(C);
145 unsigned TBD, TDF, TCI = 0;
147 if (TBD == BD && TDF == DF && TCI == CI)
154 BD = getUnsignedFromPrefixEncoding(D);
155 DF = getUnsignedFromPrefixEncoding(getNextComponentInDiscriminator(D));
156 CI = getUnsignedFromPrefixEncoding(
157 getNextComponentInDiscriminator(getNextComponentInDiscriminator(D)));
164 #include "llvm/IR/DebugInfoFlags.def" 165 .Default(DINode::FlagZero);
170 #define HANDLE_DI_FLAG(ID, NAME) \ 172 return "DIFlag" #NAME; 173 #include "llvm/IR/DebugInfoFlags.def" 183 if (
DIFlags A = Flags & FlagAccessibility) {
184 if (A == FlagPrivate)
186 else if (A == FlagProtected)
192 if (
DIFlags R = Flags & FlagPtrToMemberRep) {
193 if (R == FlagSingleInheritance)
194 SplitFlags.
push_back(FlagSingleInheritance);
195 else if (R == FlagMultipleInheritance)
196 SplitFlags.
push_back(FlagMultipleInheritance);
198 SplitFlags.
push_back(FlagVirtualInheritance);
201 if ((Flags & FlagIndirectVirtualBase) == FlagIndirectVirtualBase) {
202 Flags &= ~FlagIndirectVirtualBase;
203 SplitFlags.
push_back(FlagIndirectVirtualBase);
206 #define HANDLE_DI_FLAG(ID, NAME) \ 207 if (DIFlags Bit = Flags & Flag##NAME) { \ 208 SplitFlags.push_back(Bit); \ 211 #include "llvm/IR/DebugInfoFlags.def" 216 if (
auto *
T = dyn_cast<DIType>(
this))
217 return T->getScope();
219 if (
auto *
SP = dyn_cast<DISubprogram>(
this))
220 return SP->getScope();
222 if (
auto *LB = dyn_cast<DILexicalBlockBase>(
this))
223 return LB->getScope();
225 if (
auto *NS = dyn_cast<DINamespace>(
this))
226 return NS->getScope();
228 if (
auto *CB = dyn_cast<DICommonBlock>(
this))
229 return CB->getScope();
231 if (
auto *M = dyn_cast<DIModule>(
this))
232 return M->getScope();
234 assert((isa<DIFile>(
this) || isa<DICompileUnit>(
this)) &&
235 "Unhandled type of scope.");
240 if (
auto *
T = dyn_cast<DIType>(
this))
242 if (
auto *
SP = dyn_cast<DISubprogram>(
this))
243 return SP->getName();
244 if (
auto *NS = dyn_cast<DINamespace>(
this))
245 return NS->getName();
246 if (
auto *CB = dyn_cast<DICommonBlock>(
this))
247 return CB->getName();
248 if (
auto *M = dyn_cast<DIModule>(
this))
250 assert((isa<DILexicalBlockBase>(
this) || isa<DIFile>(
this) ||
251 isa<DICompileUnit>(
this)) &&
252 "Unhandled type of scope.");
268 GenericDINodeInfo::KeyTy
Key(Tag, Header, DwarfOps);
273 Hash = Key.getHash();
275 assert(ShouldCreate &&
"Expected non-uniqued nodes to always be created");
282 Context, Storage, Hash, Tag, PreOps, DwarfOps),
286 void GenericDINode::recalculateHash() {
287 setHash(GenericDINodeInfo::KeyTy::calculateHash(
this));
290 #define UNWRAP_ARGS_IMPL(...) __VA_ARGS__ 291 #define UNWRAP_ARGS(ARGS) UNWRAP_ARGS_IMPL ARGS 292 #define DEFINE_GETIMPL_LOOKUP(CLASS, ARGS) \ 294 if (Storage == Uniqued) { \ 295 if (auto *N = getUniqued(Context.pImpl->CLASS##s, \ 296 CLASS##Info::KeyTy(UNWRAP_ARGS(ARGS)))) \ 301 assert(ShouldCreate && \ 302 "Expected non-uniqued nodes to always be created"); \ 305 #define DEFINE_GETIMPL_STORE(CLASS, ARGS, OPS) \ 306 return storeImpl(new (array_lengthof(OPS)) \ 307 CLASS(Context, Storage, UNWRAP_ARGS(ARGS), OPS), \ 308 Storage, Context.pImpl->CLASS##s) 309 #define DEFINE_GETIMPL_STORE_NO_OPS(CLASS, ARGS) \ 310 return storeImpl(new (0u) CLASS(Context, Storage, UNWRAP_ARGS(ARGS)), \ 311 Storage, Context.pImpl->CLASS##s) 312 #define DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS(CLASS, OPS) \ 313 return storeImpl(new (array_lengthof(OPS)) CLASS(Context, Storage, OPS), \ 314 Storage, Context.pImpl->CLASS##s) 315 #define DEFINE_GETIMPL_STORE_N(CLASS, ARGS, OPS, NUM_OPS) \ 316 return storeImpl(new (NUM_OPS) \ 317 CLASS(Context, Storage, UNWRAP_ARGS(ARGS), OPS), \ 318 Storage, Context.pImpl->CLASS##s) 324 return getImpl(Context, CountNode, Lo, Storage, ShouldCreate);
345 MDString *Name, uint64_t SizeInBits,
346 uint32_t AlignInBits,
unsigned Encoding,
351 (Tag, Name, SizeInBits, AlignInBits, Encoding, Flags));
352 Metadata *Ops[] = {
nullptr,
nullptr, Name};
358 switch (getEncoding()) {
359 case dwarf::DW_ATE_signed:
360 case dwarf::DW_ATE_signed_char:
362 case dwarf::DW_ATE_unsigned:
363 case dwarf::DW_ATE_unsigned_char:
373 uint32_t AlignInBits, uint64_t OffsetInBits,
378 (Tag, Name, File, Line, Scope, BaseType, SizeInBits,
379 AlignInBits, OffsetInBits, DWARFAddressSpace, Flags,
383 DIDerivedType, (Tag, Line, SizeInBits, AlignInBits, OffsetInBits,
384 DWARFAddressSpace, Flags), Ops);
399 AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang,
400 VTableHolder, TemplateParams, Identifier, Discriminator));
402 Elements, VTableHolder, TemplateParams, Identifier,
405 AlignInBits, OffsetInBits, Flags),
412 uint64_t SizeInBits,
uint32_t AlignInBits, uint64_t OffsetInBits,
421 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
422 AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang,
423 VTableHolder, TemplateParams, &Identifier, Discriminator);
426 assert(CT->getRawIdentifier() == &Identifier &&
"Wrong ODR identifier?");
427 if (!CT->isForwardDecl() || (Flags & DINode::FlagFwdDecl))
431 CT->mutate(Tag, Line, RuntimeLang, SizeInBits, AlignInBits, OffsetInBits,
434 Elements, VTableHolder, TemplateParams, &Identifier,
437 "Mismatched number of operands");
438 for (
unsigned I = 0,
E = CT->getNumOperands();
I !=
E; ++
I)
439 if (Ops[
I] != CT->getOperand(
I))
440 CT->setOperand(
I, Ops[
I]);
447 uint64_t SizeInBits,
uint32_t AlignInBits, uint64_t OffsetInBits,
456 Context, Tag, Name, File, Line, Scope, BaseType, SizeInBits,
457 AlignInBits, OffsetInBits, Flags, Elements, RuntimeLang, VTableHolder,
458 TemplateParams, &Identifier, Discriminator);
475 Metadata *Ops[] = {
nullptr,
nullptr,
nullptr, TypeArray};
491 return ChecksumKindName[CSKind - 1];
511 Metadata *Ops[] = {Filename, Directory, CS ? CS->Value :
nullptr,
519 unsigned RuntimeVersion,
MDString *SplitDebugFilename,
522 uint64_t DWOId,
bool SplitDebugInlining,
bool DebugInfoForProfiling,
531 File, Producer, Flags, SplitDebugFilename,
532 EnumTypes, RetainedTypes, GlobalVariables, ImportedEntities,
535 Context, Storage, SourceLanguage, IsOptimized,
536 RuntimeVersion, EmissionKind, DWOId, SplitDebugInlining,
537 DebugInfoForProfiling, NameTableKind, RangesBaseAddress,
545 .Case(
"NoDebug", NoDebug)
546 .
Case(
"FullDebug", FullDebug)
547 .
Case(
"LineTablesOnly", LineTablesOnly)
548 .
Case(
"DebugDirectivesOnly", DebugDirectivesOnly)
563 case NoDebug:
return "NoDebug";
564 case FullDebug:
return "FullDebug";
565 case LineTablesOnly:
return "LineTablesOnly";
566 case DebugDirectivesOnly:
return "DebugDirectivesOnly";
584 if (
auto *Block = dyn_cast<DILexicalBlockBase>(
this))
585 return Block->getScope()->getSubprogram();
586 return const_cast<DISubprogram *
>(cast<DISubprogram>(
this));
590 if (
auto *File = dyn_cast<DILexicalBlockFile>(
this))
591 return File->getScope()->getNonLexicalBlockFileScope();
598 #include "llvm/IR/DebugInfoFlags.def" 599 .Default(SPFlagZero);
605 case SPFlagVirtuality:
607 #define HANDLE_DISP_FLAG(ID, NAME) \ 609 return "DISPFlag" #NAME; 610 #include "llvm/IR/DebugInfoFlags.def" 621 #define HANDLE_DISP_FLAG(ID, NAME) \ 622 if (DISPFlags Bit = Flags & SPFlag##NAME) { \ 623 SplitFlags.push_back(Bit); \ 626 #include "llvm/IR/DebugInfoFlags.def" 633 unsigned ScopeLine,
Metadata *ContainingType,
unsigned VirtualIndex,
640 (Scope, Name, LinkageName, File, Line, Type, ScopeLine,
641 ContainingType, VirtualIndex, ThisAdjustment, Flags,
642 SPFlags, Unit, TemplateParams, Declaration,
643 RetainedNodes, ThrownTypes));
646 Declaration, RetainedNodes, ContainingType, TemplateParams, ThrownTypes};
649 if (!TemplateParams) {
657 (Line, ScopeLine, VirtualIndex, ThisAdjustment, Flags, SPFlags), Ops,
661 bool DISubprogram::describes(
const Function *
F)
const {
662 assert(F &&
"Invalid function");
678 assert(Scope &&
"Expected scope");
686 unsigned Discriminator,
689 assert(Scope &&
"Expected scope");
722 DIModule, (Scope, Name, ConfigurationMacros, IncludePath, SysRoot));
750 Metadata *Type,
bool IsLocalToUnit,
bool IsDefinition,
751 Metadata *StaticDataMemberDeclaration,
757 Type, IsLocalToUnit, IsDefinition,
758 StaticDataMemberDeclaration,
759 TemplateParams, AlignInBits));
766 StaticDataMemberDeclaration,
769 (Line, IsLocalToUnit, IsDefinition, AlignInBits), Ops);
780 assert(Arg <= UINT16_MAX &&
"Expected argument number to fit in 16-bits");
782 assert(Scope &&
"Expected scope");
785 (Scope, Name, File, Line, Type, Arg, Flags,
793 const Metadata *RawType = getRawType();
796 if (
auto *
T = dyn_cast<DIType>(RawType))
797 if (uint64_t
Size =
T->getSizeInBits())
800 if (
auto *DT = dyn_cast<DIDerivedType>(RawType)) {
802 RawType = DT->getRawBaseType();
818 assert(Scope &&
"Expected scope");
821 (Scope, Name, File, Line));
834 uint64_t
Op = getOp();
836 if (Op >= dwarf::DW_OP_breg0 && Op <= dwarf::DW_OP_breg31)
842 case dwarf::DW_OP_bregx:
844 case dwarf::DW_OP_constu:
845 case dwarf::DW_OP_consts:
846 case dwarf::DW_OP_deref_size:
847 case dwarf::DW_OP_plus_uconst:
850 case dwarf::DW_OP_regx:
858 for (
auto I = expr_op_begin(),
E = expr_op_end();
I !=
E; ++
I) {
860 if (
I->get() +
I->getSize() >
E->get())
863 uint64_t
Op =
I->getOp();
864 if ((Op >= dwarf::DW_OP_reg0 && Op <= dwarf::DW_OP_reg31) ||
865 (Op >= dwarf::DW_OP_breg0 && Op <= dwarf::DW_OP_breg31))
874 return I->get() +
I->getSize() ==
E->get();
875 case dwarf::DW_OP_stack_value: {
877 if (
I->get() +
I->getSize() ==
E->get())
884 case dwarf::DW_OP_swap: {
892 if (getNumElements() == 1)
902 return I->get() == expr_op_begin()->get() &&
I->getArg(0) == 1 &&
903 getNumElements() == 2;
907 case dwarf::DW_OP_constu:
908 case dwarf::DW_OP_plus_uconst:
909 case dwarf::DW_OP_plus:
910 case dwarf::DW_OP_minus:
911 case dwarf::DW_OP_mul:
912 case dwarf::DW_OP_div:
913 case dwarf::DW_OP_mod:
914 case dwarf::DW_OP_or:
915 case dwarf::DW_OP_and:
916 case dwarf::DW_OP_xor:
917 case dwarf::DW_OP_shl:
918 case dwarf::DW_OP_shr:
919 case dwarf::DW_OP_shra:
920 case dwarf::DW_OP_deref:
921 case dwarf::DW_OP_deref_size:
922 case dwarf::DW_OP_xderef:
923 case dwarf::DW_OP_lit0:
924 case dwarf::DW_OP_not:
925 case dwarf::DW_OP_dup:
926 case dwarf::DW_OP_regx:
927 case dwarf::DW_OP_bregx:
938 if (getNumElements() == 0)
941 for (
const auto &It : expr_ops()) {
942 switch (It.getOp()) {
945 case dwarf::DW_OP_stack_value:
958 if (getNumElements() == 0)
963 for (
const auto &It : expr_ops()) {
964 switch (It.getOp()) {
968 default:
return true;
977 for (
auto I = Start;
I != End; ++
I)
990 }
else if (Offset < 0) {
998 if (getNumElements() == 0) {
1003 if (getNumElements() == 2 && Elements[0] == dwarf::DW_OP_plus_uconst) {
1004 Offset = Elements[1];
1008 if (getNumElements() == 3 && Elements[0] == dwarf::DW_OP_constu) {
1009 if (Elements[2] == dwarf::DW_OP_plus) {
1010 Offset = Elements[1];
1013 if (Elements[2] == dwarf::DW_OP_minus) {
1014 Offset = -Elements[1];
1023 unsigned &AddrClass) {
1026 const unsigned PatternSize = 4;
1027 if (Expr->Elements.size() >= PatternSize &&
1028 Expr->Elements[PatternSize - 4] == dwarf::DW_OP_constu &&
1029 Expr->Elements[PatternSize - 2] == dwarf::DW_OP_swap &&
1030 Expr->Elements[PatternSize - 1] == dwarf::DW_OP_xderef) {
1031 AddrClass = Expr->Elements[PatternSize - 3];
1033 if (Expr->Elements.size() == PatternSize)
1037 Expr->Elements.size() - PatternSize));
1048 appendOffset(Ops, Offset);
1055 return prependOpcodes(Expr, Ops, StackValue, EntryValue);
1062 assert(Expr &&
"Can't prepend ops to this expression");
1077 if (
Op.getOp() == dwarf::DW_OP_stack_value)
1080 Ops.
push_back(dwarf::DW_OP_stack_value);
1084 Op.appendToVector(Ops);
1087 Ops.
push_back(dwarf::DW_OP_stack_value);
1093 assert(Expr && !Ops.
empty() &&
"Can't append ops to this expression");
1099 if (
Op.getOp() == dwarf::DW_OP_stack_value ||
1106 Op.appendToVector(NewOps);
1109 NewOps.append(Ops.
begin(), Ops.
end());
1115 assert(Expr && !Ops.
empty() &&
"Can't append ops to this expression");
1118 return Op == dwarf::DW_OP_stack_value ||
1121 "Can't append this op");
1128 unsigned DropUntilStackValue = FI.
hasValue() ? 3 : 0;
1131 bool NeedsDeref = (Expr->
getNumElements() > DropUntilStackValue) &&
1132 (ExprOpsBeforeFragment.
back() != dwarf::DW_OP_stack_value);
1133 bool NeedsStackValue = NeedsDeref || ExprOpsBeforeFragment.
empty();
1141 if (NeedsStackValue)
1142 NewOps.
push_back(dwarf::DW_OP_stack_value);
1147 const DIExpression *Expr,
unsigned OffsetInBits,
unsigned SizeInBits) {
1152 switch (
Op.getOp()) {
1154 case dwarf::DW_OP_shr:
1155 case dwarf::DW_OP_shra:
1156 case dwarf::DW_OP_shl:
1157 case dwarf::DW_OP_plus:
1158 case dwarf::DW_OP_plus_uconst:
1159 case dwarf::DW_OP_minus:
1168 uint64_t FragmentOffsetInBits =
Op.getArg(0);
1169 uint64_t FragmentSizeInBits =
Op.getArg(1);
1170 (void)FragmentSizeInBits;
1171 assert((OffsetInBits + SizeInBits <= FragmentSizeInBits) &&
1172 "new fragment outside of original fragment");
1173 OffsetInBits += FragmentOffsetInBits;
1177 Op.appendToVector(Ops);
1180 assert(Expr &&
"Unknown DIExpression");
1189 if (getNumElements() != 3 && getNumElements() != 6)
1191 if (getElement(0) != dwarf::DW_OP_constu ||
1192 getElement(2) != dwarf::DW_OP_stack_value)
1201 dwarf::TypeKind TK = Signed ? dwarf::DW_ATE_signed : dwarf::DW_ATE_unsigned;
1208 unsigned FromSize,
unsigned ToSize,
1210 return appendToStack(Expr, getExtOps(FromSize, ToSize, Signed));
1216 bool ShouldCreate) {
1218 Metadata *Ops[] = {Variable, Expression};
1230 SetterName, Attributes, Type));
1239 bool ShouldCreate) {
1242 (Tag, Scope, Entity, File, Line, Name));
1259 bool ShouldCreate) {
1261 (MIType, Line, File, Elements));
Scope
Defines the scope in which this symbol should be visible: Default – Visible in the public interface ...
static void appendOffset(SmallVectorImpl< uint64_t > &Ops, int64_t Offset)
Append Ops with operations to apply the Offset.
const_iterator end(StringRef path)
Get end iterator over path.
ArrayRef< uint64_t > getElements() const
bool isConstant() const
Determine whether this represents a standalone constant value.
static std::string getLinkageName(GlobalValue::LinkageTypes LT)
const T & back() const
back - Get the last element.
const_iterator begin(StringRef path, Style style=Style::native)
Get begin iterator over path.
static DICompositeType * getODRTypeIfExists(LLVMContext &Context, MDString &Identifier)
This class represents lattice values for constants.
static const DILocation * getMergedLocation(const DILocation *LocA, const DILocation *LocB)
When two instructions are combined into a single instruction we also need to combine the original loc...
amdgpu Simplify well known AMD library false FunctionCallee Value const Twine & Name
void push_back(const T &Elt)
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
unsigned getSize() const
Return the size of the operand.
Only used in LLVM metadata.
Optional< Signedness > getSignedness() const
Return the signedness of this type, or None if this type is neither signed nor unsigned.
static T * storeImpl(T *N, StorageType Storage, StoreT &Store)
static IntegerType * getInt64Ty(LLVMContext &C)
StringSwitch & Case(StringLiteral S, T Value)
static Optional< ChecksumKind > getChecksumKind(StringRef CSKindStr)
static DIExpression * prepend(const DIExpression *Expr, uint8_t Flags, int64_t Offset=0)
Prepend DIExpr with a deref and offset operation and optionally turn it into a stack value or/and an ...
static DISPFlags splitFlags(DISPFlags Flags, SmallVectorImpl< DISPFlags > &SplitFlags)
Split up a flags bitfield for easier printing.
ArrayRef< T > makeArrayRef(const T &OneElt)
Construct an ArrayRef from a single element.
static StringRef getFlagString(DISPFlags Flag)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
LLVM_NODISCARD R Default(T Value)
bool none_of(R &&Range, UnaryPredicate P)
Provide wrappers to std::none_of which take ranges instead of having to pass begin/end explicitly...
static StringRef getName(Value *V)
Only used in LLVM metadata.
LLVM_NODISCARD bool empty() const
empty - Check if the string is empty.
Holds the characteristics of one fragment of a larger variable.
static DIExpression * append(const DIExpression *Expr, ArrayRef< uint64_t > Ops)
Append the opcodes Ops to DIExpr.
LLVMContext & getContext() const
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
static Optional< FragmentInfo > getFragmentInfo(expr_op_iterator Start, expr_op_iterator End)
Retrieve the details of this fragment expression.
Analysis containing CSE Info
Flag
These should be considered private to the implementation of the MCInstrDesc class.
StringRef getString() const
static StringRef getFlagString(DIFlags Flag)
static MDTuple * get(LLVMContext &Context, ArrayRef< Metadata *> MDs)
A switch()-like statement whose cases are string literals.
static T * getUniqued(DenseSet< T *, InfoT > &Store, const typename InfoT::KeyTy &Key)
A single checksum, represented by a Kind and a Value (a string).
static Optional< unsigned > encodeDiscriminator(unsigned BD, unsigned DF, unsigned CI)
Raw encoding of the discriminator.
The instances of the Type class are immutable: once they are created, they are never changed...
This is an important class for using LLVM in a threaded context.
DISubprogram * getSubprogram() const
Get the attached subprogram.
Instrumentation for Order File
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
static MDTuple * getDistinct(LLVMContext &Context, ArrayRef< Metadata *> MDs)
Only used in LLVM metadata.
SmallSet - This maintains a set of unique values, optimizing for the case when the set is small (less...
static const char * nameTableKindString(DebugNameTableKind PK)
std::pair< iterator, bool > insert(PtrType Ptr)
Inserts Ptr if and only if there is no element in the container equal to Ptr.
bool isODRUniquingDebugTypes() const
Whether there is a string map for uniquing debug info identifiers across the context.
bool isImplicit() const
Return whether this is an implicit location description.
A pair of DIGlobalVariable and DIExpression.
static ExtOps getExtOps(unsigned FromSize, unsigned ToSize, bool Signed)
Returns the ops for a zero- or sign-extension in a DIExpression.
static DIExpression * appendToStack(const DIExpression *Expr, ArrayRef< uint64_t > Ops)
Convert DIExpr into a stack value if it isn't one already by appending DW_OP_deref if needed...
Optional< FragmentInfo > getFragmentInfo() const
Retrieve the details of this fragment expression.
static DIExpression * prependOpcodes(const DIExpression *Expr, SmallVectorImpl< uint64_t > &Ops, bool StackValue=false, bool EntryValue=false)
Prepend DIExpr with the given opcodes and optionally turn it into a stack value.
Only used in LLVM metadata.
amdgpu Simplify well known AMD library false FunctionCallee Value * Arg
std::pair< NoneType, bool > insert(const T &V)
insert - Insert an element into the set if it isn't already there.
DebugNameTableKind getNameTableKind() const
DIScope * getScope() const
LLVMContextImpl *const pImpl
static RegisterPass< DebugifyFunctionPass > DF("debugify-function", "Attach debug info to a function")
An imported module (C++ using directive or similar).
DILocalScope * getNonLexicalBlockFileScope() const
Get the first non DILexicalBlockFile scope of this scope.
Base class for scope-like contexts.
iterator_range< expr_op_iterator > expr_ops() const
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
bool isComplex() const
Return whether the location is computed on the expression stack, meaning it cannot be a simple regist...
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements...
static DISPFlags getFlag(StringRef Flag)
Align max(MaybeAlign Lhs, Align Rhs)
zlib-gnu style compression
StringRef getName() const
Optional< uint64_t > getSizeInBits() const
Determines the size of the variable's type.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
static DIFlags splitFlags(DIFlags Flags, SmallVectorImpl< DIFlags > &SplitFlags)
Split up a flags bitfield.
static GCRegistry::Add< StatepointGC > D("statepoint-example", "an example strategy for statepoint")
static ConstantInt * getSigned(IntegerType *Ty, int64_t V)
Return a ConstantInt with the specified value for the specified type.
ArrayRef< T > drop_back(size_t N=1) const
Drop the last N elements of the array.
DISubprogram * getSubprogram() const
Get the subprogram for this scope.
DebugEmissionKind getEmissionKind() const
static DIFlags getFlag(StringRef Flag)
A (clang) module that has been imported by the compile unit.
unsigned unsigned DILocalScope * Scope
Generic tagged DWARF-like metadata node.
unsigned getNumElements() const
void append(in_iter in_start, in_iter in_end)
Add the specified range to the end of the SmallVector.
Type array for a subprogram.
LLVM_NODISCARD bool empty() const
static DIExpression * appendExt(const DIExpression *Expr, unsigned FromSize, unsigned ToSize, bool Signed)
Append a zero- or sign-extension to Expr.
StringRef getName() const
Return a constant reference to the value's name.
bool extractIfOffset(int64_t &Offset) const
If this is a constant offset, extract it.
DISPFlags
Debug info subprogram flags.
static DICompositeType * buildODRType(LLVMContext &Context, MDString &Identifier, unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, DIFlags Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, Metadata *Discriminator)
Build a DICompositeType with the given ODR identifier.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
LLVM Value Representation.
An iterator for expression operands.
StringRef - Represent a constant reference to a string, i.e.
static LazyValueInfoImpl & getImpl(void *&PImpl, AssumptionCache *AC, const DataLayout *DL, DominatorTree *DT=nullptr)
This lazily constructs the LazyValueInfoImpl.
static void decodeDiscriminator(unsigned D, unsigned &BD, unsigned &DF, unsigned &CI)
Raw decoder for values in an encoded discriminator D.
Optional< DenseMap< const MDString *, DICompositeType * > > DITypeMap
static const char * emissionKindString(DebugEmissionKind EK)
bool empty() const
empty - Check if the array is empty.
static const DIExpression * extractAddressClass(const DIExpression *Expr, unsigned &AddrClass)
Checks if the last 4 elements of the expression are DW_OP_constu <DWARF address="" space>=""> DW_OP_s...
static Optional< DIExpression * > createFragmentExpression(const DIExpression *Expr, unsigned OffsetInBits, unsigned SizeInBits)
Create a DIExpression to describe one part of an aggregate variable that is fragmented across multipl...
Basic type, like 'int' or 'float'.
std::array< uint64_t, 6 > ExtOps
size_type count(const T &V) const
count - Return 1 if the element is in the set, 0 otherwise.