15 #ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H
16 #define LLVM_LIB_IR_LLVMCONTEXTIMPL_H
44 class DiagnosticInfoOptimizationRemark;
45 class DiagnosticInfoOptimizationRemarkMissed;
46 class DiagnosticInfoOptimizationRemarkAnalysis;
118 return LHS ==
KeyTy(RHS);
166 return LHS ==
KeyTy(RHS);
184 template <
class NodeTy>
186 : Ops(N->op_begin() +
Offset, N->op_end()), Hash(N->
getHash()) {}
188 template <
class NodeTy>
190 if (
getHash() != RHS->getHash())
193 assert((RawOps.empty() || Ops.empty()) &&
"Two sets of operands?");
254 : Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt) {}
257 : Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()),
258 InlinedAt(L->getRawInlinedAt()) {}
261 return Line == RHS->getLine() && Column == RHS->getColumn() &&
295 : Count(Count), LowerBound(LowerBound) {}
297 : Count(N->getCount()), LowerBound(N->getLowerBound()) {}
311 :
Value(N->getValue()),
Name(N->getRawName()) {}
327 uint32_t AlignInBits,
unsigned Encoding)
328 : Tag(Tag), Name(Name), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
329 Encoding(Encoding) {}
332 AlignInBits(N->getAlignInBits()), Encoding(N->getEncoding()) {}
362 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
363 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
364 AlignInBits(AlignInBits), Flags(Flags), ExtraData(ExtraData) {}
367 Line(N->getLine()), Scope(N->getRawScope()),
368 BaseType(N->getRawBaseType()), SizeInBits(N->
getSizeInBits()),
369 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
370 Flags(N->getFlags()), ExtraData(N->getRawExtraData()) {}
375 Scope == RHS->
getRawScope() && BaseType == RHS->getRawBaseType() &&
379 ExtraData == RHS->getRawExtraData();
385 if (
Tag == dwarf::DW_TAG_member &&
Name)
386 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
387 if (CT->getRawIdentifier())
413 if (Tag != dwarf::DW_TAG_member || !Name)
416 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
417 if (!CT || !CT->getRawIdentifier())
446 Metadata *Elements,
unsigned RuntimeLang,
449 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
450 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
451 AlignInBits(AlignInBits), Flags(Flags), Elements(Elements),
452 RuntimeLang(RuntimeLang), VTableHolder(VTableHolder),
453 TemplateParams(TemplateParams), Identifier(Identifier) {}
456 Line(N->getLine()), Scope(N->getRawScope()),
457 BaseType(N->getRawBaseType()), SizeInBits(N->
getSizeInBits()),
458 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
459 Flags(N->getFlags()), Elements(N->getRawElements()),
460 RuntimeLang(N->getRuntimeLang()), VTableHolder(N->getRawVTableHolder()),
461 TemplateParams(N->getRawTemplateParams()),
462 Identifier(N->getRawIdentifier()) {}
493 : Flags(Flags), CC(CC), TypeArray(TypeArray) {}
495 :
Flags(N->getFlags()), CC(N->getCC()), TypeArray(N->getRawTypeArray()) {}
512 : Filename(Filename), Directory(Directory), CSKind(CSKind),
513 Checksum(Checksum) {}
515 : Filename(N->getRawFilename()), Directory(N->getRawDirectory()),
516 CSKind(N->getChecksumKind()), Checksum(N->getRawChecksum()) {}
525 return hash_combine(Filename, Directory, CSKind, Checksum);
552 bool IsLocalToUnit,
bool IsDefinition,
unsigned ScopeLine,
553 Metadata *ContainingType,
unsigned Virtuality,
554 unsigned VirtualIndex,
int ThisAdjustment,
unsigned Flags,
557 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
558 Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit),
559 IsDefinition(IsDefinition), ScopeLine(ScopeLine),
560 ContainingType(ContainingType), Virtuality(Virtuality),
561 VirtualIndex(VirtualIndex), ThisAdjustment(ThisAdjustment),
562 Flags(Flags), IsOptimized(IsOptimized), Unit(Unit),
563 TemplateParams(TemplateParams), Declaration(Declaration),
564 Variables(Variables) {}
566 : Scope(N->getRawScope()),
Name(N->getRawName()),
568 Line(N->getLine()),
Type(N->getRawType()),
569 IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()),
570 ScopeLine(N->getScopeLine()), ContainingType(N->getRawContainingType()),
571 Virtuality(N->
getVirtuality()), VirtualIndex(N->getVirtualIndex()),
572 ThisAdjustment(N->getThisAdjustment()),
Flags(N->getFlags()),
573 IsOptimized(N->isOptimized()),
Unit(N->getRawUnit()),
574 TemplateParams(N->getRawTemplateParams()),
575 Declaration(N->getRawDeclaration()), Variables(N->getRawVariables()) {}
578 return Scope == RHS->getRawScope() &&
Name == RHS->getRawName() &&
581 Type == RHS->getRawType() && IsLocalToUnit == RHS->isLocalToUnit() &&
582 IsDefinition == RHS->isDefinition() &&
583 ScopeLine == RHS->getScopeLine() &&
584 ContainingType == RHS->getRawContainingType() &&
585 Virtuality == RHS->getVirtuality() &&
586 VirtualIndex == RHS->getVirtualIndex() &&
587 ThisAdjustment == RHS->getThisAdjustment() &&
588 Flags == RHS->getFlags() && IsOptimized == RHS->isOptimized() &&
589 Unit == RHS->getUnit() &&
590 TemplateParams == RHS->getRawTemplateParams() &&
591 Declaration == RHS->getRawDeclaration() &&
592 Variables == RHS->getRawVariables();
599 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
600 if (CT->getRawIdentifier())
618 return isDeclarationOfODRMember(LHS->isDefinition(), LHS->getRawScope(),
619 LHS->getRawLinkageName(), RHS);
628 if (IsDefinition || !Scope || !LinkageName)
631 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
632 if (!CT || !CT->getRawIdentifier())
636 return IsDefinition == RHS->isDefinition() && Scope == RHS->getRawScope() &&
637 LinkageName == RHS->getRawLinkageName();
648 : Scope(Scope), File(File), Line(Line), Column(Column) {}
650 : Scope(N->getRawScope()),
File(N->getRawFile()), Line(N->getLine()),
651 Column(N->getColumn()) {}
668 : Scope(Scope), File(File), Discriminator(Discriminator) {}
670 : Scope(N->getRawScope()),
File(N->getRawFile()),
671 Discriminator(N->getDiscriminator()) {}
691 : Scope(Scope), File(File), Name(Name), Line(Line),
692 ExportSymbols(ExportSymbols) {}
694 : Scope(N->getRawScope()),
File(N->getRawFile()),
Name(N->getRawName()),
695 Line(N->getLine()), ExportSymbols(N->getExportSymbols()) {}
715 : Scope(Scope), Name(Name), ConfigurationMacros(ConfigurationMacros),
716 IncludePath(IncludePath), ISysRoot(ISysRoot) {}
718 : Scope(N->getRawScope()),
Name(N->getRawName()),
719 ConfigurationMacros(N->getRawConfigurationMacros()),
720 IncludePath(N->getRawIncludePath()), ISysRoot(N->getRawISysRoot()) {}
730 ConfigurationMacros, IncludePath, ISysRoot);
740 :
Name(N->getRawName()),
Type(N->getRawType()) {}
755 : Tag(Tag), Name(Name), Type(Type), Value(Value) {}
758 Value(N->getValue()) {}
781 bool IsLocalToUnit,
bool IsDefinition,
783 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
784 Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit),
785 IsDefinition(IsDefinition),
786 StaticDataMemberDeclaration(StaticDataMemberDeclaration),
787 AlignInBits(AlignInBits) {}
789 : Scope(N->getRawScope()),
Name(N->getRawName()),
791 Line(N->getLine()),
Type(N->getRawType()),
792 IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()),
793 StaticDataMemberDeclaration(N->getRawStaticDataMemberDeclaration()),
794 AlignInBits(N->getAlignInBits()) {}
802 StaticDataMemberDeclaration ==
815 IsLocalToUnit, IsDefinition,
816 StaticDataMemberDeclaration);
833 : Scope(Scope), Name(Name), File(File), Line(Line), Type(Type), Arg(Arg),
834 Flags(Flags), AlignInBits(AlignInBits) {}
836 : Scope(N->getRawScope()),
Name(N->getRawName()),
File(N->getRawFile()),
837 Line(N->getLine()),
Type(N->getRawType()), Arg(N->getArg()),
838 Flags(N->getFlags()), AlignInBits(N->getAlignInBits()) {}
877 : Variable(Variable), Expression(Expression) {}
879 : Variable(N->getRawVariable()), Expression(N->getRawExpression()) {}
900 : Name(Name), File(File), Line(Line), GetterName(GetterName),
901 SetterName(SetterName), Attributes(Attributes), Type(Type) {}
903 :
Name(N->getRawName()),
File(N->getRawFile()), Line(N->getLine()),
904 GetterName(N->getRawGetterName()), SetterName(N->getRawSetterName()),
928 : Tag(Tag), Scope(Scope), Entity(Entity), Line(Line), Name(Name) {}
930 :
Tag(N->
getTag()), Scope(N->getRawScope()), Entity(N->getRawEntity()),
931 Line(N->getLine()),
Name(N->getRawName()) {}
950 : MIType(MIType), Line(Line), Name(Name), Value(Value) {}
952 : MIType(N->getMacinfoType()), Line(N->getLine()),
Name(N->getRawName()),
953 Value(N->getRawValue()) {}
972 : MIType(MIType), Line(Line), File(File), Elements(Elements) {}
974 : MIType(N->getMacinfoType()), Line(N->getLine()),
File(N->getRawFile()),
975 Elements(N->getRawElements()) {}
987 template <
class NodeTy>
struct MDNodeInfo {
998 return KeyTy(N).getHashValue();
1005 static bool isEqual(
const NodeTy *LHS,
const NodeTy *RHS) {
1014 #define HANDLE_MDNODE_LEAF(CLASS) typedef MDNodeInfo<CLASS> CLASS##Info;
1015 #include "llvm/IR/Metadata.def"
1022 bool empty()
const {
return Attachments.empty(); }
1023 size_t size()
const {
return Attachments.size(); }
1048 template <
class PredTy>
void remove_if(PredTy shouldRemove) {
1117 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
1118 DenseSet<CLASS *, CLASS##Info> CLASS##s;
1119 #include "llvm/IR/Metadata.def"
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
void(* DiagnosticHandlerTy)(const DiagnosticInfo &DI, void *Context)
Defines the type of a diagnostic handler.
static StructType * getTombstoneKey()
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
static const fltSemantics & Bogus()
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real...
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
MDNodeKeyImpl< NodeTy > KeyTy
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)
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)
ConstantUniqueMap< ConstantVector > VectorConstantsTy
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
MDNodeKeyImpl(const DIGlobalVariable *N)
static unsigned getHashValue(const APFloat &Key)
MDNodeKeyImpl(unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements)
struct fuzzer::@269 Flags
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)
FoldingSet< AttributeSetImpl > AttrsLists
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)
ConstantUniqueMap< ConstantArray > ArrayConstantsTy
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
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 *ExtraData)
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
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
MDNodeSubsetEqualImpl< NodeTy > SubsetEqualTy
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)
size_t size() const
size - Get the array size.
DenseSet< FunctionType *, FunctionTypeKeyInfo > FunctionTypeSet
Class to represent pointers.
MDString * getRawChecksum() const
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
MDNodeKeyImpl(ArrayRef< Metadata * > Ops)
void getAll(SmallVectorImpl< std::pair< unsigned, MDNode * >> &Result) const
Copy out all the attachments.
MDNodeKeyImpl(unsigned Tag, Metadata *Scope, Metadata *Entity, unsigned Line, MDString *Name)
LLVMContext::YieldCallbackTy YieldCallback
Metadata * getRawScope() const
MDString * getRawName() const
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
MDNodeKeyImpl< NodeTy > KeyTy
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
ConstantUniqueMap< ConstantStruct > StructConstantsTy
bool isKeyOf(const DIExpression *RHS) const
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)
MDNodeKeyImpl(const DISubroutineType *N)
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
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
MDNodeKeyImpl< DISubprogram > KeyTy
static unsigned getHashValue(const NodeTy *N)
bool isKeyOf(const DIImportedEntity *RHS) const
DenseSet< StructType *, AnonStructTypeKeyInfo > StructTypeSet
DenseMap< APInt, std::unique_ptr< ConstantInt >, DenseMapAPIntKeyInfo > IntMapTy
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
static bool isDeclarationOfODRMember(bool IsDefinition, const Metadata *Scope, const MDString *LinkageName, const DISubprogram *RHS)
Subprograms compare equal if they declare the same function in an ODR 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)
An imported module (C++ using directive or similar).
unsigned getTag(StringRef TagString)
static bool isEqual(const KeyTy &LHS, const NodeTy *RHS)
bool isKeyOf(const DISubprogram *RHS) const
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
int getOrAddScopeRecordIdxEntry(MDNode *N, int ExistingIdx)
Metadata * TemplateParams
bool isKeyOf(const DILocation *RHS) const
MDNodeKeyImpl(int64_t Value, MDString *Name)
Metadata * getRawEntity() const
static GCRegistry::Add< ShadowStackGC > C("shadow-stack","Very portable GC for uncooperative code generators")
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
MDNodeKeyImpl(const DITemplateValueParameter *N)
void(* InlineAsmDiagHandlerTy)(const SMDiagnostic &, void *Context, unsigned LocCookie)
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.
DenseMap< APFloat, std::unique_ptr< ConstantFP >, DenseMapAPFloatKeyInfo > FPMapTy
void insert(unsigned ID, MDNode &MD)
A (clang) module that has been imported by the compile unit.
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)
static FunctionType * getTombstoneKey()
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *Type, Metadata *Value)
MDNodeKeyImpl(const DILocation *L)
Type array for a subprogram.
StructTypeSet AnonStructTypes
Metadata * getRawScope() const
DenseMap< Value *, ValueHandleBase * > ValueHandlesTy
ValueHandles - This map keeps track of all of the value handles that are watching a Value*...
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
MDNodeKeyImpl< DIDerivedType > KeyTy
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 DiagnosticHotnessRequested
bool isKeyOf(const DITemplateValueParameter *RHS) const
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt)
ConstantUniqueMap< ConstantExpr > ExprConstants
AttributeSet getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
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
MDNodeKeyImpl(Metadata *Scope, Metadata *File, MDString *Name, unsigned Line, bool ExportSymbols)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
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(* YieldCallbackTy)(LLVMContext *Context, void *OpaqueHandle)
Defines the type of a yield callback.
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