15 #ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H
16 #define LLVM_LIB_IR_LLVMCONTEXTIMPL_H
60 class ValueHandleBase;
141 return LHS ==
KeyTy(RHS);
197 return LHS ==
KeyTy(RHS);
215 template <
class NodeTy>
217 : Ops(N->op_begin() +
Offset, N->op_end()), Hash(N->
getHash()) {}
219 template <
class NodeTy>
221 if (
getHash() != RHS->getHash())
224 assert((RawOps.empty() || Ops.empty()) &&
"Two sets of operands?");
286 : Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt) {}
288 : Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()),
289 InlinedAt(L->getRawInlinedAt()) {}
292 return Line == RHS->getLine() && Column == RHS->getColumn() &&
328 : Count(Count), LowerBound(LowerBound) {}
330 : Count(N->getCount()), LowerBound(N->getLowerBound()) {}
345 :
Value(N->getValue()),
Name(N->getRawName()) {}
362 uint32_t AlignInBits,
unsigned Encoding)
363 : Tag(Tag), Name(Name), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
364 Encoding(Encoding) {}
367 AlignInBits(N->getAlignInBits()), Encoding(N->getEncoding()) {}
397 uint32_t AlignInBits, uint64_t OffsetInBits,
400 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
401 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
402 AlignInBits(AlignInBits), DWARFAddressSpace(DWARFAddressSpace),
403 Flags(Flags), ExtraData(ExtraData) {}
406 Line(N->getLine()), Scope(N->getRawScope()),
408 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
409 DWARFAddressSpace(N->getDWARFAddressSpace()),
Flags(N->getFlags()),
410 ExtraData(N->getRawExtraData()) {}
419 DWARFAddressSpace == RHS->getDWARFAddressSpace() &&
421 ExtraData == RHS->getRawExtraData();
428 if (
Tag == dwarf::DW_TAG_member &&
Name)
429 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
430 if (CT->getRawIdentifier())
458 if (Tag != dwarf::DW_TAG_member || !Name)
461 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
462 if (!CT || !CT->getRawIdentifier())
491 Metadata *Elements,
unsigned RuntimeLang,
494 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
495 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
496 AlignInBits(AlignInBits), Flags(Flags), Elements(Elements),
497 RuntimeLang(RuntimeLang), VTableHolder(VTableHolder),
498 TemplateParams(TemplateParams), Identifier(Identifier) {}
501 Line(N->getLine()), Scope(N->getRawScope()),
503 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
504 Flags(N->getFlags()), Elements(N->getRawElements()),
505 RuntimeLang(N->getRuntimeLang()), VTableHolder(N->getRawVTableHolder()),
506 TemplateParams(N->getRawTemplateParams()),
539 : Flags(Flags), CC(CC), TypeArray(TypeArray) {}
541 :
Flags(N->getFlags()), CC(N->getCC()), TypeArray(N->getRawTypeArray()) {}
559 : Filename(Filename), Directory(Directory), CSKind(CSKind),
560 Checksum(Checksum) {}
562 : Filename(N->getRawFilename()), Directory(N->getRawDirectory()),
563 CSKind(N->getChecksumKind()), Checksum(N->getRawChecksum()) {}
573 return hash_combine(Filename, Directory, CSKind, Checksum);
601 bool IsLocalToUnit,
bool IsDefinition,
unsigned ScopeLine,
602 Metadata *ContainingType,
unsigned Virtuality,
603 unsigned VirtualIndex,
int ThisAdjustment,
unsigned Flags,
607 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
608 Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit),
609 IsDefinition(IsDefinition), ScopeLine(ScopeLine),
610 ContainingType(ContainingType), Virtuality(Virtuality),
611 VirtualIndex(VirtualIndex), ThisAdjustment(ThisAdjustment),
612 Flags(Flags), IsOptimized(IsOptimized), Unit(Unit),
613 TemplateParams(TemplateParams), Declaration(Declaration),
614 Variables(Variables), ThrownTypes(ThrownTypes) {}
616 : Scope(N->getRawScope()),
Name(N->getRawName()),
618 Line(N->getLine()),
Type(N->getRawType()),
619 IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()),
620 ScopeLine(N->getScopeLine()), ContainingType(N->getRawContainingType()),
621 Virtuality(N->
getVirtuality()), VirtualIndex(N->getVirtualIndex()),
622 ThisAdjustment(N->getThisAdjustment()),
Flags(N->getFlags()),
623 IsOptimized(N->isOptimized()),
Unit(N->getRawUnit()),
624 TemplateParams(N->getRawTemplateParams()),
625 Declaration(N->getRawDeclaration()), Variables(N->getRawVariables()),
626 ThrownTypes(N->getRawThrownTypes()) {}
629 return Scope == RHS->getRawScope() &&
Name == RHS->getRawName() &&
632 Type == RHS->getRawType() && IsLocalToUnit == RHS->isLocalToUnit() &&
633 IsDefinition == RHS->isDefinition() &&
634 ScopeLine == RHS->getScopeLine() &&
635 ContainingType == RHS->getRawContainingType() &&
636 Virtuality == RHS->getVirtuality() &&
637 VirtualIndex == RHS->getVirtualIndex() &&
638 ThisAdjustment == RHS->getThisAdjustment() &&
639 Flags == RHS->getFlags() && IsOptimized == RHS->isOptimized() &&
640 Unit == RHS->getUnit() &&
641 TemplateParams == RHS->getRawTemplateParams() &&
642 Declaration == RHS->getRawDeclaration() &&
643 Variables == RHS->getRawVariables() &&
644 ThrownTypes == RHS->getRawThrownTypes();
652 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
653 if (CT->getRawIdentifier())
673 return isDeclarationOfODRMember(LHS->isDefinition(), LHS->getRawScope(),
674 LHS->getRawLinkageName(),
675 LHS->getRawTemplateParams(), RHS);
685 if (IsDefinition || !Scope || !LinkageName)
688 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
689 if (!CT || !CT->getRawIdentifier())
698 return IsDefinition == RHS->isDefinition() && Scope == RHS->getRawScope() &&
699 LinkageName == RHS->getRawLinkageName() &&
700 TemplateParams == RHS->getRawTemplateParams();
711 : Scope(Scope), File(File), Line(Line), Column(Column) {}
713 : Scope(N->getRawScope()),
File(N->getRawFile()), Line(N->getLine()),
714 Column(N->getColumn()) {}
732 : Scope(Scope), File(File), Discriminator(Discriminator) {}
734 : Scope(N->getRawScope()),
File(N->getRawFile()),
735 Discriminator(N->getDiscriminator()) {}
753 : Scope(Scope), Name(Name), ExportSymbols(ExportSymbols) {}
755 : Scope(N->getRawScope()),
Name(N->getRawName()),
756 ExportSymbols(N->getExportSymbols()) {}
777 : Scope(Scope), Name(Name), ConfigurationMacros(ConfigurationMacros),
778 IncludePath(IncludePath), ISysRoot(ISysRoot) {}
780 : Scope(N->getRawScope()),
Name(N->getRawName()),
781 ConfigurationMacros(N->getRawConfigurationMacros()),
782 IncludePath(N->getRawIncludePath()), ISysRoot(N->getRawISysRoot()) {}
793 ConfigurationMacros, IncludePath, ISysRoot);
803 :
Name(N->getRawName()),
Type(N->getRawType()) {}
819 : Tag(Tag), Name(Name), Type(Type), Value(Value) {}
822 Value(N->getValue()) {}
846 bool IsLocalToUnit,
bool IsDefinition,
848 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
849 Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit),
850 IsDefinition(IsDefinition),
851 StaticDataMemberDeclaration(StaticDataMemberDeclaration),
852 AlignInBits(AlignInBits) {}
854 : Scope(N->getRawScope()),
Name(N->getRawName()),
856 Line(N->getLine()),
Type(N->getRawType()),
857 IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()),
858 StaticDataMemberDeclaration(N->getRawStaticDataMemberDeclaration()),
859 AlignInBits(N->getAlignInBits()) {}
867 StaticDataMemberDeclaration ==
881 IsLocalToUnit, IsDefinition,
882 StaticDataMemberDeclaration);
899 : Scope(Scope), Name(Name), File(File), Line(Line), Type(Type), Arg(Arg),
900 Flags(Flags), AlignInBits(AlignInBits) {}
902 : Scope(N->getRawScope()),
Name(N->getRawName()),
File(N->getRawFile()),
903 Line(N->getLine()),
Type(N->getRawType()), Arg(N->getArg()),
904 Flags(N->getFlags()), AlignInBits(N->getAlignInBits()) {}
945 : Variable(Variable), Expression(Expression) {}
947 : Variable(N->getRawVariable()), Expression(N->getRawExpression()) {}
969 : Name(Name), File(File), Line(Line), GetterName(GetterName),
970 SetterName(SetterName), Attributes(Attributes), Type(Type) {}
972 :
Name(N->getRawName()),
File(N->getRawFile()), Line(N->getLine()),
973 GetterName(N->getRawGetterName()), SetterName(N->getRawSetterName()),
999 : Tag(Tag), Scope(Scope), Entity(Entity), File(File), Line(Line),
1002 :
Tag(N->
getTag()), Scope(N->getRawScope()), Entity(N->getRawEntity()),
1003 File(N->getRawFile()), Line(N->getLine()),
Name(N->getRawName()) {}
1023 : MIType(MIType), Line(Line), Name(Name), Value(Value) {}
1025 : MIType(N->getMacinfoType()), Line(N->getLine()),
Name(N->getRawName()),
1026 Value(N->getRawValue()) {}
1046 : MIType(MIType), Line(Line), File(File), Elements(Elements) {}
1048 : MIType(N->getMacinfoType()), Line(N->getLine()),
File(N->getRawFile()),
1049 Elements(N->getRawElements()) {}
1077 return KeyTy(N).getHashValue();
1086 static bool isEqual(
const NodeTy *LHS,
const NodeTy *RHS) {
1095 #define HANDLE_MDNODE_LEAF(CLASS) using CLASS##Info = MDNodeInfo<CLASS>;
1096 #include "llvm/IR/Metadata.def"
1103 bool empty()
const {
return Attachments.empty(); }
1104 size_t size()
const {
return Attachments.size(); }
1129 template <
class PredTy>
void remove_if(PredTy shouldRemove) {
1199 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
1200 DenseSet<CLASS *, CLASS##Info> CLASS##s;
1201 #include "llvm/IR/Metadata.def"
1340 #endif // LLVM_LIB_IR_LLVMCONTEXTIMPL_H
MDString * getRawGetterName() const
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
Metadata * getRawScope() const
bool operator!=(const KeyTy &that) const
static APInt getTombstoneKey()
static bool isEqual(const KeyTy &LHS, const FunctionType *RHS)
static APFloat getTombstoneKey()
bool isKeyOf(const GenericDINode *RHS) const
DenseMap< unsigned, IntegerType * > IntegerTypes
MDString * getRawIncludePath() const
static bool isEqual(const NodeTy *LHS, const NodeTy *RHS)
bool isKeyOf(const DILexicalBlock *RHS) const
StringMap< MDString, BumpPtrAllocator > MDStringCache
static bool isSubsetEqual(const KeyTy &LHS, const NodeTy *RHS)
unsigned getHashValue() const
Metadata * getRawTemplateParams() const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags, uint32_t AlignInBits)
static unsigned getHashValue(const KeyTy &Key)
FoldingSet< AttributeImpl > AttrsSet
KeyTy(const Type *R, const ArrayRef< Type * > &P, bool V)
static unsigned getHashValue(const KeyTy &Key)
unsigned getHashValue() const
bool isKeyOf(const MDTuple *RHS) const
Structure for hashing arbitrary MDNode operands.
MDNodeOpsKey(ArrayRef< Metadata * > Ops)
DenseMap< std::pair< const Function *, const BasicBlock * >, BlockAddress * > BlockAddresses
uint32_t getAlignInBits() const
KeyTy(const ArrayRef< Type * > &E, bool P)
auto remove_if(R &&Range, UnaryPredicate P) -> decltype(std::begin(Range))
Provide wrappers to std::remove_if which take ranges instead of having to pass begin/end explicitly...
bool compareOps(const NodeTy *RHS, unsigned Offset=0) const
static StructType * getTombstoneKey()
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
unsigned getHashValue() const
MDString * getRawName() const
unsigned getNumOperands() const
Return number of MDNode operands.
Configuration point for MDNodeInfo::isEqual().
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
unsigned getHashValue() const
MDNodeKeyImpl(const GenericDINode *N)
Metadata * getRawFile() const
Return the raw underlying file.
bool operator==(const KeyTy &that) const
static bool isEqual(const KeyTy &LHS, const StructType *RHS)
Metadata * getRawType() const
bool isKeyOf(const DIMacro *RHS) const
static unsigned getHashValue(const StructType *ST)
MDNodeKeyImpl(MDString *Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type)
bool RespectDiagnosticFilters
ConstantInt * TheFalseVal
unsigned getHashValue() const
op_iterator op_begin() const
unsigned getHashValue() const
MDNodeOpsKey(const NodeTy *N, unsigned Offset=0)
bool isKeyOf(const DINamespace *RHS) const
DenseMap< std::pair< Type *, unsigned >, PointerType * > ASPointerTypes
MDNodeKeyImpl(const DISubrange *N)
LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler
MDNodeKeyImpl(const DITemplateTypeParameter *N)
unsigned getVirtuality(StringRef VirtualityString)
Metadata * getRawScope() const
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
MDNodeKeyImpl(ArrayRef< uint64_t > Elements)
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Line, unsigned Column)
Multimap-like storage for metadata attachments for globals.
static unsigned calculateHash(GenericDINode *N)
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
unsigned getColumn() const
unsigned getHashValue() const
unsigned getHashValue() const
MDNodeKeyImpl(const DIEnumerator *N)
MDString * getRawName() const
bool isKeyOf(const DIBasicType *RHS) const
Metadata * getRawType() const
MDString * getRawName() const
static bool isSubsetEqual(const KeyTy &LHS, const DISubprogram *RHS)
static NodeTy * getEmptyKey()
MDString * getRawDirectory() const
void set(unsigned ID, MDNode &MD)
Set an attachment to a particular node.
The address of a basic block.
DenseMap< const Instruction *, MDAttachmentMap > InstructionMetadata
Collection of per-instruction metadata used in this context.
MDString * getRawHeader() const
static bool isDeclarationOfODRMember(bool IsDefinition, const Metadata *Scope, const MDString *LinkageName, const Metadata *TemplateParams, const DISubprogram *RHS)
Subprograms compare equal if they declare the same function in an ODR type.
MDNodeKeyImpl(const DIGlobalVariable *N)
static unsigned getHashValue(const APFloat &Key)
MDNodeKeyImpl(unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements)
static bool isEqual(const APInt &LHS, const APInt &RHS)
OptBisect & getOptBisect()
Access the object which manages optimization bisection for failure analysis.
static APInt getEmptyKey()
unsigned getHashValue() const
Class to represent struct types.
MDString * getRawName() const
KeyTy(const FunctionType *FT)
bool isKeyOf(const DIGlobalVariableExpression *RHS) const
uint64_t VAL
Used to store the <= 64 bits integer value.
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, unsigned Flags, Metadata *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, MDString *Identifier)
MDNodeKeyImpl(const DIBasicType *N)
MDString * getRawConfigurationMacros() const
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
MDNodeKeyImpl(const DIFile *N)
DenseMap< std::pair< Type *, uint64_t >, ArrayType * > ArrayTypes
bool DiscardValueNames
Flag to indicate if Value (other than GlobalValue) retains their name or not.
unsigned getHashValue() const
std::vector< MDNode * > DistinctMDNodes
unsigned getMacinfoType() const
DenseMap< const Value *, ValueName * > ValueNames
bool getExportSymbols() const
DIFile::ChecksumKind CSKind
BumpPtrAllocator TypeAllocator
TypeAllocator - All dynamically allocated types are allocated from this.
unsigned getHashValue() const
MDNodeKeyImpl(const MDTuple *N)
This file implements a class to represent arbitrary precision integral constant values and operations...
static unsigned getHashValue(const FunctionType *FT)
LLVM_NODISCARD bool empty() const
static StructType * getEmptyKey()
ConstantUniqueMap< InlineAsm > InlineAsms
Metadata * getRawFile() const
AttributeList getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
MDNodeKeyImpl(const DISubprogram *N)
Metadata * getRawStaticDataMemberDeclaration() const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *ISysRoot)
Class to represent function types.
int getOrAddScopeInlinedAtIdxEntry(MDNode *Scope, MDNode *IA, int ExistingIdx)
unsigned NamedStructTypesUniqueID
bool isKeyOf(const DIObjCProperty *RHS) const
ArrayRef< Type * > ETypes
LLVMContextImpl(LLVMContext &C)
unsigned getHashValue() const
MDNodeKeyImpl(const DIMacroFile *N)
Class to represent array types.
std::unique_ptr< ConstantTokenNone > TheNoneToken
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
hash_code hash_value(const APFloat &Arg)
See friend declarations above.
ArrayConstantsTy ArrayConstants
MDString * getRawName() const
DenseMap< std::pair< Type *, unsigned >, VectorType * > VectorTypes
MDNodeKeyImpl(MDString *Name, Metadata *Type)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, unsigned ScopeLine, Metadata *ContainingType, unsigned Virtuality, unsigned VirtualIndex, int ThisAdjustment, unsigned Flags, bool IsOptimized, Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *Variables, Metadata *ThrownTypes)
size_t size() const
size - Get the array size.
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
Class to represent pointers.
MDString * getRawChecksum() const
MDNodeKeyImpl(ArrayRef< Metadata * > Ops)
void getAll(SmallVectorImpl< std::pair< unsigned, MDNode * >> &Result) const
Copy out all the attachments.
LLVMContext::YieldCallbackTy YieldCallback
Metadata * getRawScope() const
MDString * getRawName() const
MDNodeKeyImpl(unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name)
unsigned getRuntimeLang() const
static ChecksumKind getChecksumKind(StringRef CSKindStr)
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
Metadata * getRawExpression() const
KeyTy(const StructType *ST)
This class implements a mechanism to disable passes and individual optimizations at compile time base...
StringMap< unsigned > CustomMDKindNames
CustomMDKindNames - Map to hold the metadata string to ID mapping.
MDString * getRawFilename() const
Metadata * getRawFile() const
static bool isSubsetEqual(const DIDerivedType *LHS, const DIDerivedType *RHS)
unsigned getHashValue() const
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *Variable, Metadata *Expression)
MDString * getRawValue() const
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.
StringMapEntry< uint32_t > * getOrInsertBundleTag(StringRef Tag)
Allocate memory in an ever growing pool, as if by bump-pointer.
unsigned getHashValue() const
bool isKeyOf(const DIExpression *RHS) const
MDNodeKeyImpl< NodeTy > KeyTy
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
static unsigned getSizeInBits(unsigned Reg, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI)
Get the size in bits of Reg.
bool bitwiseIsEqual(const APFloat &RHS) const
Metadata * getRawType() const
unsigned getHashValue() const
This file contains the declarations for the subclasses of Constant, which represent the different fla...
bool isLocalToUnit() const
bool isKeyOf(const DILocalVariable *RHS) const
MDNodeKeyImpl(const DIExpression *N)
static unsigned calculateHash(MDTuple *N)
MDNodeKeyImpl(unsigned MIType, unsigned Line, MDString *Name, MDString *Value)
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
static bool isEqual(const FunctionType *LHS, const FunctionType *RHS)
MDNodeKeyImpl(const DIObjCProperty *N)
Optional< unsigned > DWARFAddressSpace
MDNodeKeyImpl(const DISubroutineType *N)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, bool ExportSymbols)
A pair of DIGlobalVariable and DIExpression.
This file declares a class to represent arbitrary precision floating point values and provide a varie...
unsigned getHashValue() const
bool operator!=(const KeyTy &that) const
Metadata * getRawElements() const
MDString * getRawISysRoot() const
unsigned getBitWidth() const
Return the number of bits in the APInt.
This file defines various helper methods and classes used by LLVMContextImpl for creating and managin...
ValueHandlesTy ValueHandles
ArrayRef< uint64_t > Elements
MDNodeKeyImpl(const DILexicalBlockFile *N)
MDNodeKeyImpl(const DICompositeType *N)
static bool isSubsetEqual(const DISubprogram *LHS, const DISubprogram *RHS)
Metadata * getValue() const
uint32_t getAlignInBits() const
bool isKeyOf(const DIMacroFile *RHS) const
uint64_t DiagnosticsHotnessThreshold
unsigned getEncoding() const
Class to represent integer types.
uint64_t getOffsetInBits() const
unsigned getHashValue() const
static FunctionType * getEmptyKey()
MDNodeKeyImpl(const DIDerivedType *N)
unsigned getAttributes() const
static unsigned getHashValue(const NodeTy *N)
bool isKeyOf(const DIImportedEntity *RHS) const
DenseMap< const GlobalObject *, StringRef > GlobalObjectSections
Collection of per-GlobalObject sections used in this context.
static bool isEqual(const APFloat &LHS, const APFloat &RHS)
uint32_t getOperandBundleTagID(StringRef Tag) const
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
void * InlineAsmDiagContext
VectorConstantsTy VectorConstants
bool isKeyOf(const DIModule *RHS) const
void(*)(const DiagnosticInfo &DI, void *Context) DiagnosticHandlerTy
Defines the type of a diagnostic handler.
An imported module (C++ using directive or similar).
static bool isEqual(const KeyTy &LHS, const NodeTy *RHS)
bool isKeyOf(const DISubprogram *RHS) const
BaseType
A given derived pointer can have multiple base pointers through phi/selects.
Metadata * getRawScope() const
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
ArrayRef< uint64_t > getElements() const
static bool isSubsetEqual(const NodeTy *LHS, const NodeTy *RHS)
DenseMap< const GlobalObject *, MDGlobalAttachmentMap > GlobalObjectMetadata
Collection of per-GlobalObject metadata used in this context.
unsigned getHashValue() const
Metadata * getRawBaseType() const
unsigned getHashValue() const
This is the shared class of boolean and integer constants.
MDString * getRawName() const
Metadata * getRawVariable() const
static NodeTy * getTombstoneKey()
MDNodeKeyImpl(const DIGlobalVariableExpression *N)
Metadata * getRawInlinedAt() const
MDNodeKeyImpl(const DIMacro *N)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
MDNodeKeyImpl(MDString *Filename, MDString *Directory, DIFile::ChecksumKind CSKind, MDString *Checksum)
MDNode * lookup(unsigned ID) const
Get a particular attachment (if any).
unsigned getHashValue() const
MDString * getRawLinkageName() const
FunctionTypeSet FunctionTypes
FoldingSet< AttributeListImpl > AttrsLists
int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx)
Metadata * TemplateParams
bool isKeyOf(const DILocation *RHS) const
MDNodeKeyImpl(int64_t Value, MDString *Name)
static Optional< unsigned > getTag(const TargetRegisterInfo *TRI, const MachineInstr &MI, const LoadInfo &LI)
Metadata * getRawEntity() const
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
MDNodeKeyImpl(const DITemplateValueParameter *N)
bool isKeyOf(const DITemplateTypeParameter *RHS) const
StringMap - This is an unconventional map that is specialized for handling keys that are "strings"...
MDNodeKeyImpl(const DINamespace *N)
Class to represent vector types.
static bool isEqual(const StructType *LHS, const StructType *RHS)
Class for arbitrary precision integers.
unsigned getDiscriminator() const
void erase(unsigned ID)
Remove an attachment.
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
void insert(unsigned ID, MDNode &MD)
A (clang) module that has been imported by the compile unit.
void(*)(const SMDiagnostic &, void *Context, unsigned LocCookie) InlineAsmDiagHandlerTy
Metadata * ContainingType
MDNodeKeyImpl(int64_t Count, int64_t LowerBound)
DenseMapInfo for MDNode subclasses.
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
static bool isSubsetEqual(const KeyTy &LHS, const DIDerivedType *RHS)
static APFloat getEmptyKey()
Generic tagged DWARF-like metadata node.
MDNodeKeyImpl(const DILocalVariable *N)
bool isKeyOf(const DIDerivedType *RHS) const
MDNodeKeyImpl(const DIModule *N)
bool isKeyOf(const DIEnumerator *RHS) const
MDNodeKeyImpl(const DIImportedEntity *N)
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID...
static FunctionType * getTombstoneKey()
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *Type, Metadata *Value)
MDNodeKeyImpl(const DILocation *L)
Type array for a subprogram.
static std::vector< std::string > Flags
StructTypeSet AnonStructTypes
Metadata * getRawScope() const
Metadata * getRawScope() const
static unsigned getHashValue(const APInt &Key)
DenseMap< std::pair< const char *, unsigned >, unsigned > DiscriminatorTable
DiscriminatorTable - This table maps file:line locations to an integer representing the next DWARF pa...
StringMap< StructType * > NamedStructTypes
MDString * ConfigurationMacros
static bool isODRMember(unsigned Tag, const Metadata *Scope, const MDString *Name, const DIDerivedType *RHS)
Subprograms compare equal if they declare the same function in an ODR type.
std::unique_ptr< yaml::Output > DiagnosticsOutputFile
bool isKeyOf(const DICompositeType *RHS) const
static const fltSemantics & Bogus() LLVM_READNONE
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real...
DenseMap< const Function *, std::string > GCNames
Maintain the GC name for each function.
Metadata * getRawElements() const
MDString * getRawIdentifier() const
bool isKeyOf(const DIGlobalVariable *RHS) const
uint64_t getSizeInBits() const
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
MDNodeKeyImpl(unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding)
bool operator==(const KeyTy &that) const
bool isKeyOf(const DITemplateValueParameter *RHS) const
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt)
ConstantUniqueMap< ConstantExpr > ExprConstants
ArrayRef< Type * > Params
MDNodeKeyImpl(unsigned Tag, MDString *Header, ArrayRef< Metadata * > DwarfOps)
Metadata * getRawFile() const
Metadata * getRawScope() const
std::vector< uint8_t > Unit
unsigned getHashValue() const
bool isKeyOf(const DIFile *RHS) const
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, Optional< unsigned > DWARFAddressSpace, unsigned Flags, Metadata *ExtraData)
void getAll(SmallVectorImpl< std::pair< unsigned, MDNode * >> &Result) const
Appends all attachments for the global to Result, sorting by attachment ID.
MDString * getRawName() const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, uint32_t AlignInBits)
unsigned getHashValue() const
unsigned getHashValue() const
unsigned getHashValue() const
StructConstantsTy StructConstants
LLVM Value Representation.
bool DiagnosticsHotnessRequested
DenseMap< Type *, std::unique_ptr< UndefValue > > UVConstants
void remove_if(PredTy shouldRemove)
Erase matching attachments.
MDNodeKeyImpl(const DILexicalBlock *N)
bool isKeyOf(const DILexicalBlockFile *RHS) const
StringSet - A wrapper for StringMap that provides set-like functionality.
FoldingSet< AttributeSetNode > AttrsSetNodes
bool isDefinition() const
LLVMContext::DiagnosticHandlerTy DiagnosticHandler
Metadata * StaticDataMemberDeclaration
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
StringRef - Represent a constant reference to a string, i.e.
MDString * getRawName() const
int64_t getLowerBound() const
DenseMap< Type *, PointerType * > PointerTypes
MDString * getRawSetterName() const
bool isKeyOf(const DISubrange *RHS) const
Map-like storage for metadata attachments.
StringMap< ConstantDataSequential * > CDSConstants
Optional< DenseMap< const MDString *, DICompositeType * > > DITypeMap
Metadata * TemplateParams
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Discriminator)
bool isKeyOf(const DISubroutineType *RHS) const
StringSet SectionStrings
Stable collection of section strings.
static unsigned getHashValue(const KeyTy &Key)
Basic type, like 'int' or 'float'.
Metadata * getRawTypeArray() const
MDNodeKeyImpl(unsigned Flags, uint8_t CC, Metadata *TypeArray)
Metadata * getRawVTableHolder() const