15 #ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H 16 #define LLVM_LIB_IR_LLVMCONTEXTIMPL_H 60 class ValueHandleBase;
103 ETypes(E), isPacked(P) {}
106 : ETypes(ST->elements()), isPacked(ST->isPacked()) {}
111 if (ETypes != that.
ETypes)
141 return LHS ==
KeyTy(RHS);
156 ReturnType(R), Params(P), isVarArg(V) {}
158 : ReturnType(FT->getReturnType()), Params(FT->params()),
159 isVarArg(FT->isVarArg()) {}
166 if (Params != that.
Params)
197 return LHS ==
KeyTy(RHS);
213 : RawOps(Ops), Hash(calculateHash(Ops)) {}
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())
225 return RawOps.
empty() ? compareOps(Ops, RHS,
Offset)
226 : compareOps(RawOps, RHS,
Offset);
229 static unsigned calculateHash(
MDNode *
N,
unsigned Offset = 0);
286 Metadata *InlinedAt,
bool ImplicitCode)
287 : Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt),
288 ImplicitCode(ImplicitCode) {}
290 : Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()),
291 InlinedAt(L->getRawInlinedAt()), ImplicitCode(L->isImplicitCode()) {}
294 return Line == RHS->getLine() && Column == RHS->getColumn() &&
296 ImplicitCode == RHS->isImplicitCode();
300 return hash_combine(Line, Column, Scope, InlinedAt, ImplicitCode);
331 : CountNode(CountNode), LowerBound(LowerBound) {}
333 : CountNode(N->getRawCountNode()),
334 LowerBound(N->getLowerBound()) {}
337 if (LowerBound != RHS->getLowerBound())
341 if (
auto *MD = dyn_cast<ConstantAsMetadata>(CountNode))
342 if (RHSCount->getSExtValue() ==
343 cast<ConstantInt>(MD->getValue())->getSExtValue())
346 return CountNode == RHS->getRawCountNode();
350 if (
auto *MD = dyn_cast<ConstantAsMetadata>(CountNode))
351 return hash_combine(cast<ConstantInt>(MD->getValue())->getSExtValue(),
363 : Value(Value), Name(Name), IsUnsigned(IsUnsigned) {}
365 : Value(N->getValue()), Name(N->getRawName()),
366 IsUnsigned(N->isUnsigned()) {}
385 uint32_t AlignInBits,
unsigned Encoding,
unsigned Flags)
386 : Tag(Tag), Name(Name), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
387 Encoding(Encoding), Flags(Flags) {}
390 AlignInBits(N->getAlignInBits()), Encoding(N->getEncoding()), Flags(N->getFlags()) {}
401 return hash_combine(Tag, Name, SizeInBits, AlignInBits, Encoding);
421 uint32_t AlignInBits, uint64_t OffsetInBits,
424 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
425 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
426 AlignInBits(AlignInBits), DWARFAddressSpace(DWARFAddressSpace),
427 Flags(Flags), ExtraData(ExtraData) {}
429 : Tag(N->
getTag()), Name(N->getRawName()), File(N->getRawFile()),
430 Line(N->getLine()), Scope(N->getRawScope()),
431 BaseType(N->getRawBaseType()), SizeInBits(N->
getSizeInBits()),
432 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
433 DWARFAddressSpace(N->getDWARFAddressSpace()), Flags(N->getFlags()),
434 ExtraData(N->getRawExtraData()) {}
439 Scope == RHS->
getRawScope() && BaseType == RHS->getRawBaseType() &&
443 DWARFAddressSpace == RHS->getDWARFAddressSpace() &&
445 ExtraData == RHS->getRawExtraData();
452 if (Tag == dwarf::DW_TAG_member && Name)
453 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
454 if (CT->getRawIdentifier())
461 return hash_combine(Tag, Name, File, Line, Scope, BaseType, Flags);
482 if (Tag != dwarf::DW_TAG_member || !Name)
485 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
486 if (!CT || !CT->getRawIdentifier())
515 uint32_t AlignInBits, uint64_t OffsetInBits,
unsigned Flags,
516 Metadata *Elements,
unsigned RuntimeLang,
519 : Tag(Tag), Name(Name), File(File), Line(Line), Scope(Scope),
520 BaseType(BaseType), SizeInBits(SizeInBits), OffsetInBits(OffsetInBits),
521 AlignInBits(AlignInBits), Flags(Flags), Elements(Elements),
522 RuntimeLang(RuntimeLang), VTableHolder(VTableHolder),
523 TemplateParams(TemplateParams), Identifier(Identifier),
524 Discriminator(Discriminator) {}
526 : Tag(N->
getTag()), Name(N->getRawName()), File(N->getRawFile()),
527 Line(N->getLine()), Scope(N->getRawScope()),
528 BaseType(N->getRawBaseType()), SizeInBits(N->
getSizeInBits()),
529 OffsetInBits(N->getOffsetInBits()), AlignInBits(N->getAlignInBits()),
530 Flags(N->getFlags()), Elements(N->getRawElements()),
531 RuntimeLang(N->getRuntimeLang()), VTableHolder(N->getRawVTableHolder()),
532 TemplateParams(N->getRawTemplateParams()),
533 Identifier(N->getRawIdentifier()),
534 Discriminator(N->getRawDiscriminator()) {}
556 return hash_combine(Name, File, Line, BaseType, Scope, Elements,
567 : Flags(Flags), CC(CC), TypeArray(TypeArray) {}
569 : Flags(N->getFlags()), CC(N->getCC()), TypeArray(N->getRawTypeArray()) {}
588 : Filename(Filename), Directory(Directory), Checksum(Checksum),
591 : Filename(N->getRawFilename()), Directory(N->getRawDirectory()),
592 Checksum(N->getRawChecksum()), Source(N->getRawSource()) {}
595 return Filename == RHS->getRawFilename() &&
596 Directory == RHS->getRawDirectory() &&
597 Checksum == RHS->getRawChecksum() &&
598 Source == RHS->getRawSource();
603 Filename, Directory, Checksum ? Checksum->Kind : 0,
604 Checksum ? Checksum->Value :
nullptr, Source.
getValueOr(
nullptr));
629 unsigned ScopeLine,
Metadata *ContainingType,
630 unsigned VirtualIndex,
int ThisAdjustment,
unsigned Flags,
634 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
635 Line(Line), Type(Type), ScopeLine(ScopeLine),
636 ContainingType(ContainingType), VirtualIndex(VirtualIndex),
637 ThisAdjustment(ThisAdjustment), Flags(Flags), SPFlags(SPFlags),
638 Unit(Unit), TemplateParams(TemplateParams), Declaration(Declaration),
639 RetainedNodes(RetainedNodes), ThrownTypes(ThrownTypes) {}
641 : Scope(N->getRawScope()), Name(N->getRawName()),
642 LinkageName(N->getRawLinkageName()), File(N->getRawFile()),
643 Line(N->getLine()), Type(N->getRawType()), ScopeLine(N->getScopeLine()),
644 ContainingType(N->getRawContainingType()),
645 VirtualIndex(N->getVirtualIndex()),
646 ThisAdjustment(N->getThisAdjustment()), Flags(N->getFlags()),
647 SPFlags(N->getSPFlags()), Unit(N->getRawUnit()),
648 TemplateParams(N->getRawTemplateParams()),
649 Declaration(N->getRawDeclaration()),
650 RetainedNodes(N->getRawRetainedNodes()),
651 ThrownTypes(N->getRawThrownTypes()) {}
654 return Scope == RHS->getRawScope() && Name == RHS->getRawName() &&
655 LinkageName == RHS->getRawLinkageName() &&
656 File == RHS->
getRawFile() && Line == RHS->getLine() &&
657 Type == RHS->getRawType() && ScopeLine == RHS->getScopeLine() &&
658 ContainingType == RHS->getRawContainingType() &&
659 VirtualIndex == RHS->getVirtualIndex() &&
660 ThisAdjustment == RHS->getThisAdjustment() &&
661 Flags == RHS->getFlags() && SPFlags == RHS->getSPFlags() &&
662 Unit == RHS->getUnit() &&
663 TemplateParams == RHS->getRawTemplateParams() &&
664 Declaration == RHS->getRawDeclaration() &&
665 RetainedNodes == RHS->getRawRetainedNodes() &&
666 ThrownTypes == RHS->getRawThrownTypes();
669 bool isDefinition()
const {
return SPFlags & DISubprogram::SPFlagDefinition; }
675 if (!isDefinition() && LinkageName)
676 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
677 if (CT->getRawIdentifier())
697 return isDeclarationOfODRMember(LHS->isDefinition(), LHS->getRawScope(),
698 LHS->getRawLinkageName(),
699 LHS->getRawTemplateParams(), RHS);
709 if (IsDefinition || !Scope || !LinkageName)
712 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
713 if (!CT || !CT->getRawIdentifier())
722 return IsDefinition == RHS->isDefinition() && Scope == RHS->getRawScope() &&
723 LinkageName == RHS->getRawLinkageName() &&
724 TemplateParams == RHS->getRawTemplateParams();
735 : Scope(Scope), File(File), Line(Line), Column(Column) {}
737 : Scope(N->getRawScope()), File(N->getRawFile()), Line(N->getLine()),
738 Column(N->getColumn()) {}
756 : Scope(Scope), File(File), Discriminator(Discriminator) {}
758 : Scope(N->getRawScope()), File(N->getRawFile()),
759 Discriminator(N->getDiscriminator()) {}
777 : Scope(Scope), Name(Name), ExportSymbols(ExportSymbols) {}
779 : Scope(N->getRawScope()), Name(N->getRawName()),
780 ExportSymbols(N->getExportSymbols()) {}
801 : Scope(Scope), Name(Name), ConfigurationMacros(ConfigurationMacros),
802 IncludePath(IncludePath), ISysRoot(ISysRoot) {}
804 : Scope(N->getRawScope()), Name(N->getRawName()),
805 ConfigurationMacros(N->getRawConfigurationMacros()),
806 IncludePath(N->getRawIncludePath()), ISysRoot(N->getRawISysRoot()) {}
817 ConfigurationMacros, IncludePath, ISysRoot);
827 : Name(N->getRawName()), Type(N->getRawType()) {}
843 : Tag(Tag), Name(Name), Type(Type), Value(Value) {}
845 : Tag(N->
getTag()), Name(N->getRawName()), Type(N->getRawType()),
846 Value(N->getValue()) {}
871 bool IsLocalToUnit,
bool IsDefinition,
874 : Scope(Scope), Name(Name), LinkageName(LinkageName), File(File),
875 Line(Line), Type(Type), IsLocalToUnit(IsLocalToUnit),
876 IsDefinition(IsDefinition),
877 StaticDataMemberDeclaration(StaticDataMemberDeclaration),
878 TemplateParams(TemplateParams), AlignInBits(AlignInBits) {}
880 : Scope(N->getRawScope()), Name(N->getRawName()),
881 LinkageName(N->getRawLinkageName()), File(N->getRawFile()),
882 Line(N->getLine()), Type(N->getRawType()),
883 IsLocalToUnit(N->isLocalToUnit()), IsDefinition(N->isDefinition()),
884 StaticDataMemberDeclaration(N->getRawStaticDataMemberDeclaration()),
885 TemplateParams(N->getRawTemplateParams()),
886 AlignInBits(N->getAlignInBits()) {}
894 StaticDataMemberDeclaration ==
908 return hash_combine(Scope, Name, LinkageName, File, Line, Type,
909 IsLocalToUnit, IsDefinition,
910 StaticDataMemberDeclaration);
925 Metadata *Type,
unsigned Arg,
unsigned Flags,
927 : Scope(Scope), Name(Name), File(File), Line(Line), Type(Type), Arg(Arg),
928 Flags(Flags), AlignInBits(AlignInBits) {}
930 : Scope(N->getRawScope()), Name(N->getRawName()), File(N->getRawFile()),
931 Line(N->getLine()), Type(N->getRawType()), Arg(N->getArg()),
932 Flags(N->getFlags()), AlignInBits(N->getAlignInBits()) {}
949 return hash_combine(Scope, Name, File, Line, Type, Arg, Flags);
960 : Scope(Scope), Name(Name), File(File), Line(Line) {}
962 : Scope(N->getRawScope()), Name(N->getRawName()), File(N->getRawFile()),
963 Line(N->getLine()) {}
996 : Variable(Variable), Expression(Expression) {}
998 : Variable(N->getRawVariable()), Expression(N->getRawExpression()) {}
1020 : Name(Name), File(File), Line(Line), GetterName(GetterName),
1021 SetterName(SetterName), Attributes(Attributes), Type(Type) {}
1023 : Name(N->getRawName()), File(N->getRawFile()), Line(N->getLine()),
1024 GetterName(N->getRawGetterName()), SetterName(N->getRawSetterName()),
1035 return hash_combine(Name, File, Line, GetterName, SetterName, Attributes,
1050 : Tag(Tag), Scope(Scope), Entity(Entity), File(File), Line(Line),
1053 : Tag(N->
getTag()), Scope(N->getRawScope()), Entity(N->getRawEntity()),
1054 File(N->getRawFile()), Line(N->getLine()), Name(N->getRawName()) {}
1063 return hash_combine(Tag, Scope, Entity, File, Line, Name);
1074 : MIType(MIType), Line(Line), Name(Name), Value(Value) {}
1076 : MIType(N->getMacinfoType()), Line(N->getLine()), Name(N->getRawName()),
1077 Value(N->getRawValue()) {}
1097 : MIType(MIType), Line(Line), File(File), Elements(Elements) {}
1099 : MIType(N->getMacinfoType()), Line(N->getLine()), File(N->getRawFile()),
1100 Elements(N->getRawElements()) {}
1128 return KeyTy(N).getHashValue();
1134 return SubsetEqualTy::isSubsetEqual(LHS, RHS) || LHS.isKeyOf(RHS);
1137 static bool isEqual(
const NodeTy *LHS,
const NodeTy *RHS) {
1142 return SubsetEqualTy::isSubsetEqual(LHS, RHS);
1146 #define HANDLE_MDNODE_LEAF(CLASS) using CLASS##Info = MDNodeInfo<CLASS>; 1147 #include "llvm/IR/Metadata.def" 1169 bool erase(
unsigned ID);
1175 void getAll(
SmallVectorImpl<std::pair<unsigned, MDNode *>> &Result)
const;
1180 template <
class PredTy>
void remove_if(PredTy shouldRemove) {
1208 void insert(
unsigned ID,
MDNode &MD);
1209 bool erase(
unsigned ID);
1214 void getAll(
SmallVectorImpl<std::pair<unsigned, MDNode *>> &Result)
const;
1224 void *InlineAsmDiagContext =
nullptr;
1227 bool RespectDiagnosticFilters =
false;
1228 bool DiagnosticsHotnessRequested =
false;
1229 uint64_t DiagnosticsHotnessThreshold = 0;
1233 void *YieldOpaqueHandle =
nullptr;
1253 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \ 1254 DenseSet<CLASS *, CLASS##Info> CLASS##s; 1255 #include "llvm/IR/Metadata.def" 1295 Type VoidTy, LabelTy, HalfTy, FloatTy, DoubleTy, MetadataTy, TokenTy;
1310 unsigned NamedStructTypesUniqueID = 0;
1343 int getOrAddScopeRecordIdxEntry(
MDNode *
N,
int ExistingIdx);
1344 int getOrAddScopeInlinedAtIdxEntry(
MDNode *Scope,
MDNode *IA,
int ExistingIdx);
1379 bool DiscardValueNames =
false;
1385 void dropTriviallyDeadConstantArrays();
1403 #endif // LLVM_LIB_IR_LLVMCONTEXTIMPL_H static unsigned calculateHash(MDNode *N, unsigned Offset=0)
static APInt getTombstoneKey()
static bool isEqual(const KeyTy &LHS, const FunctionType *RHS)
static APFloat getTombstoneKey()
MDString * getRawName() const
DenseMap< unsigned, IntegerType * > IntegerTypes
ArrayRef< uint64_t > getElements() const
uint64_t getOffsetInBits() const
Type
MessagePack types as defined in the standard, with the exception of Integer being divided into a sign...
static bool isEqual(const NodeTy *LHS, const NodeTy *RHS)
bool isKeyOf(const MDTuple *RHS) const
StringMap< MDString, BumpPtrAllocator > MDStringCache
static bool isSubsetEqual(const KeyTy &LHS, const NodeTy *RHS)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags, uint32_t AlignInBits)
static unsigned getHashValue(const KeyTy &Key)
bool isDefinition() const
FoldingSet< AttributeImpl > AttrsSet
Metadata * getRawVariable() const
This class represents lattice values for constants.
static unsigned getHashValue(const KeyTy &Key)
Metadata * getRawScope() const
Structure for hashing arbitrary MDNode operands.
MDString * getRawName() const
Metadata * getRawVTableHolder() const
DenseMap< std::pair< const Function *, const BasicBlock * >, BlockAddress * > BlockAddresses
Metadata * TemplateParams
MDString * getRawName() const
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
unsigned getHashValue() const
static StructType * getTombstoneKey()
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
Configuration point for MDNodeInfo::isEqual().
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, Metadata *Discriminator)
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
unsigned getDiscriminator() const
MDString * getRawValue() const
bool isKeyOf(const DIMacro *RHS) const
MDNodeKeyImpl(const GenericDINode *N)
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt, bool ImplicitCode)
unsigned getHashValue() const
constexpr T getValueOr(U &&value) const LLVM_LVALUE_FUNCTION
unsigned getHashValue() const
Metadata * getRawFile() const
Return the raw underlying file.
static bool isEqual(const KeyTy &LHS, const StructType *RHS)
Metadata * getRawInlinedAt() const
bool operator!=(const KeyTy &that) const
static unsigned getHashValue(const StructType *ST)
bool isKeyOf(const DINamespace *RHS) const
unsigned getHashValue() const
MDNodeKeyImpl(MDString *Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type)
unsigned getHashValue() const
MDNodeKeyImpl(unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, unsigned Flags)
unsigned getHashValue() const
Metadata * getRawScope() const
MDNodeOpsKey(const NodeTy *N, unsigned Offset=0)
DenseMap< std::pair< Type *, unsigned >, PointerType * > ASPointerTypes
MDNodeKeyImpl(const DISubrange *N)
Metadata * getRawTemplateParams() const
MDNodeKeyImpl(const DITemplateTypeParameter *N)
MDNodeKeyImpl(ArrayRef< uint64_t > Elements)
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Line, unsigned Column)
Multimap-like storage for metadata attachments for globals.
static unsigned calculateHash(GenericDINode *N)
unsigned getHashValue() const
This file defines the MallocAllocator and BumpPtrAllocator interfaces.
unsigned getBitWidth() const
Return the number of bits in the APInt.
MDNodeKeyImpl(const DIEnumerator *N)
MDString * getRawName() const
static bool isSubsetEqual(const KeyTy &LHS, const DISubprogram *RHS)
static NodeTy * getEmptyKey()
bool isKeyOf(const DISubroutineType *RHS) const
unsigned getHashValue() const
The address of a basic block.
Metadata * getRawTypeArray() const
DenseMap< const Instruction *, MDAttachmentMap > InstructionMetadata
Collection of per-instruction metadata used in this context.
amdgpu Simplify well known AMD library false Value Value const Twine & Name
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)
unsigned getHashValue() const
static APInt getEmptyKey()
Class to represent struct types.
KeyTy(const FunctionType *FT)
uint64_t VAL
Used to store the <= 64 bits integer value.
unsigned getHashValue() const
Using name and line to get hash value. It should already be mostly unique.
MDNodeKeyImpl(const DIBasicType *N)
MDString * getRawSetterName() 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
std::unique_ptr< DiagnosticHandler > DiagHandler
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits)
std::vector< MDNode * > DistinctMDNodes
unsigned getHashValue() const
uint64_t getSizeInBits() const
Metadata * getRawType() const
DenseMap< const Value *, ValueName * > ValueNames
static const uint16_t * lookup(unsigned opcode, unsigned domain, ArrayRef< uint16_t[3]> Table)
BumpPtrAllocator TypeAllocator
TypeAllocator - All dynamically allocated types are allocated from this.
MDNodeKeyImpl(const MDTuple *N)
This file implements a class to represent arbitrary precision integral constant values and operations...
static unsigned getHashValue(const FunctionType *FT)
MDString * getRawISysRoot() const
static StructType * getEmptyKey()
ConstantUniqueMap< InlineAsm > InlineAsms
op_iterator op_begin() const
AttributeList getAttributes(LLVMContext &C, ID id)
Return the attributes for an intrinsic.
MDNodeKeyImpl(const DISubprogram *N)
bool getExportSymbols() const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, unsigned ScopeLine, Metadata *ContainingType, unsigned VirtualIndex, int ThisAdjustment, unsigned Flags, unsigned SPFlags, Metadata *Unit, Metadata *TemplateParams, Metadata *Declaration, Metadata *RetainedNodes, Metadata *ThrownTypes)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *ISysRoot)
bool isLocalToUnit() const
Class to represent function types.
Optional< DIFile::ChecksumInfo< MDString * > > Checksum
ArrayRef< Type * > ETypes
unsigned getRuntimeLang() const
MDString * getRawName() 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.
unsigned getHashValue() const
uint32_t getAlignInBits() const
ArrayConstantsTy ArrayConstants
bool isKeyOf(const DISubprogram *RHS) const
Metadata * getRawEntity() const
bool isDefinition() const
DenseMap< std::pair< Type *, unsigned >, VectorType * > VectorTypes
MDNodeKeyImpl(MDString *Name, Metadata *Type)
bool isKeyOf(const DITemplateValueParameter *RHS) const
bool isKeyOf(const DIMacroFile *RHS) const
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
Class to represent pointers.
Metadata * getRawFile() const
bool isKeyOf(const DIGlobalVariable *RHS) const
MDNodeKeyImpl(unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name)
bool isKeyOf(const DISubrange *RHS) const
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
Metadata * getValue() const
KeyTy(const StructType *ST)
StringMap< unsigned > CustomMDKindNames
CustomMDKindNames - Map to hold the metadata string to ID mapping.
bool operator==(const KeyTy &that) const
bool isKeyOf(const DILexicalBlock *RHS) const
unsigned getColumn() const
static bool isSubsetEqual(const DIDerivedType *LHS, const DIDerivedType *RHS)
Metadata * getRawDiscriminator() const
MDNodeKeyImpl(Metadata *Variable, Metadata *Expression)
A single checksum, represented by a Kind and a Value (a string).
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.
bool operator!=(const KeyTy &that) const
unsigned getHashValue() const
Allocate memory in an ever growing pool, as if by bump-pointer.
size_t size() const
size - Get the array size.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
CountType getCount() const
This file contains the declarations for the subclasses of Constant, which represent the different fla...
unsigned getHashValue() const
unsigned getHashValue() const
Metadata * getRawExpression() const
MDNodeKeyImpl(const DIExpression *N)
unsigned getHashValue() const
static unsigned calculateHash(MDTuple *N)
MDNodeKeyImpl(unsigned MIType, unsigned Line, MDString *Name, MDString *Value)
unsigned getAttributes() const
bool compareOps(const NodeTy *RHS, unsigned Offset=0) const
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
bool isKeyOf(const DIGlobalVariableExpression *RHS) const
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...
bool isKeyOf(const DIImportedEntity *RHS) const
unsigned getHashValue() const
unsigned getHashValue() const
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)
Class to represent integer types.
static FunctionType * getEmptyKey()
MDNodeKeyImpl(const DIDerivedType *N)
auto remove_if(R &&Range, UnaryPredicate P) -> decltype(adl_begin(Range))
Provide wrappers to std::remove_if which take ranges instead of having to pass begin/end explicitly...
bool isKeyOf(const DILabel *RHS) const
static unsigned getHashValue(const NodeTy *N)
MDString * getRawConfigurationMacros() const
bool isKeyOf(const DIEnumerator *RHS) const
iterator erase(const_iterator CI)
bool isKeyOf(const DIBasicType *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)
Metadata * getRawType() const
MDString * getRawName() const
MDString * getRawName() const
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
unsigned getHashValue() const
VectorConstantsTy VectorConstants
MDNodeKeyImpl(int64_t Value, bool IsUnsigned, MDString *Name)
An imported module (C++ using directive or similar).
static bool isEqual(const KeyTy &LHS, const NodeTy *RHS)
Metadata * getRawElements() const
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
MDNodeKeyImpl(MDString *Filename, MDString *Directory, Optional< DIFile::ChecksumInfo< MDString *>> Checksum, Optional< MDString *> Source)
static bool isSubsetEqual(const NodeTy *LHS, const NodeTy *RHS)
Metadata * getRawScope() const
DenseMap< const GlobalObject *, MDGlobalAttachmentMap > GlobalObjectMetadata
Collection of per-GlobalObject metadata used in this context.
This is the shared class of boolean and integer constants.
MDNodeKeyImpl(Metadata *CountNode, int64_t LowerBound)
Metadata * getRawTemplateParams() const
static NodeTy * getTombstoneKey()
MDNodeKeyImpl(const DIGlobalVariableExpression *N)
bool isKeyOf(const DIDerivedType *RHS) const
MDNodeKeyImpl(const DIMacro *N)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
MDNodeKeyImpl(const DILabel *N)
FunctionTypeSet FunctionTypes
MDString * getRawHeader() const
FoldingSet< AttributeListImpl > AttrsLists
MDNodeKeyImpl(ArrayRef< Metadata *> Ops)
Optional< MDString * > Source
Metadata * TemplateParams
static Optional< unsigned > getTag(const TargetRegisterInfo *TRI, const MachineInstr &MI, const LoadInfo &LI)
Metadata * getRawElements() const
Metadata * getRawFile() const
bool isKeyOf(const DITemplateTypeParameter *RHS) const
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
MDNodeKeyImpl(const DITemplateValueParameter *N)
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)
This file contains constants used for implementing Dwarf debug support.
Class for arbitrary precision integers.
Metadata * getRawFile() const
bool isKeyOf(const DICompositeType *RHS) const
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
A (clang) module that has been imported by the compile unit.
void(*)(const SMDiagnostic &, void *Context, unsigned LocCookie) InlineAsmDiagHandlerTy
Metadata * ContainingType
unsigned getHashValue() const
unsigned getHashValue() const
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)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, Metadata *File, unsigned Line)
MDNodeKeyImpl(const DIModule *N)
Metadata * getRawFile() const
MDNodeKeyImpl(const DIImportedEntity *N)
Metadata * getRawBaseType() const
static FunctionType * getTombstoneKey()
MDString * getRawName() const
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *Type, Metadata *Value)
MDNodeKeyImpl(const DILocation *L)
bool isKeyOf(const DILexicalBlockFile *RHS) const
Type array for a subprogram.
StructTypeSet AnonStructTypes
LLVM_ATTRIBUTE_ALWAYS_INLINE iterator end()
MDString * getRawIdentifier() const
unsigned getEncoding() const
bool isKeyOf(const GenericDINode *RHS) const
static unsigned getHashValue(const APInt &Key)
unsigned getHashValue() const
DenseMap< std::pair< const char *, unsigned >, unsigned > DiscriminatorTable
DiscriminatorTable - This table maps file:line locations to an integer representing the next DWARF pa...
LLVM_NODISCARD bool empty() const
StringMap< StructType * > NamedStructTypes
Metadata * getRawScope() const
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
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.
MDString * getRawName() const
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
unsigned getMacinfoType() const
unsigned getHashValue() const
ConstantUniqueMap< ConstantExpr > ExprConstants
ArrayRef< Type * > Params
bool operator==(const KeyTy &that) const
MDString * getRawLinkageName() const
Metadata * getRawStaticDataMemberDeclaration() const
KeyTy(const Type *R, const ArrayRef< Type *> &P, bool V)
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)
uint32_t getAlignInBits() const
MDNodeKeyImpl(unsigned Tag, MDString *Header, ArrayRef< Metadata *> DwarfOps)
bool isKeyOf(const DIFile *RHS) const
StructConstantsTy StructConstants
unsigned getSizeInBits(unsigned Reg, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI) const
Get the size in bits of Reg.
DenseMap< Type *, std::unique_ptr< UndefValue > > UVConstants
void remove_if(PredTy shouldRemove)
Erase matching attachments.
bool bitwiseIsEqual(const APFloat &RHS) const
Metadata * getRawScope() const
unsigned getHashValue() const
MDNodeKeyImpl(const DILexicalBlock *N)
StringSet - A wrapper for StringMap that provides set-like functionality.
bool isKeyOf(const DIModule *RHS) const
FoldingSet< AttributeSetNode > AttrsSetNodes
Metadata * getRawScope() const
bool isKeyOf(const DILocation *RHS) const
Metadata * StaticDataMemberDeclaration
bool isKeyOf(const DIObjCProperty *RHS) const
StringRef - Represent a constant reference to a string, i.e.
MDString * getRawIncludePath() const
bool isKeyOf(const DILocalVariable *RHS) const
DenseMap< Type *, PointerType * > PointerTypes
bool operator==(uint64_t V1, const APInt &V2)
MDNodeOpsKey(ArrayRef< Metadata *> Ops)
Metadata * getRawType() const
Metadata * getRawScope() const
unsigned getHashValue() const
unsigned getNumOperands() const
Return number of MDNode operands.
Map-like storage for metadata attachments.
KeyTy(const ArrayRef< Type *> &E, bool P)
StringMap< ConstantDataSequential * > CDSConstants
Optional< DenseMap< const MDString *, DICompositeType * > > DITypeMap
Metadata * TemplateParams
MDString * getRawName() const
MDString * getRawGetterName() const
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Discriminator)
Metadata * getRawScope() const
StringSet SectionStrings
Stable collection of section strings.
bool empty() const
empty - Check if the array is empty.
static unsigned getHashValue(const KeyTy &Key)
Basic type, like 'int' or 'float'.
MDNodeKeyImpl(unsigned Flags, uint8_t CC, Metadata *TypeArray)
bool isKeyOf(const DIExpression *RHS) const