14#ifndef LLVM_LIB_IR_LLVMCONTEXTIMPL_H
15#define LLVM_LIB_IR_LLVMCONTEXTIMPL_H
56class AttributeListImpl;
57class AttributeSetNode;
59class ConstantRangeAttributeImpl;
60class ConstantRangeListAttributeImpl;
61struct DiagnosticHandler;
68class LLVMRemarkStreamer;
73template <
typename T>
class StringMapEntry;
75class TypedPointerType;
89 return LHS.bitwiseIsEqual(
RHS);
253 template <
class NodeTy>
257 template <
class NodeTy>
324 Metadata *InlinedAt,
bool ImplicitCode)
325 : Line(Line), Column(Column), Scope(Scope), InlinedAt(InlinedAt),
326 ImplicitCode(ImplicitCode) {}
328 : Line(L->getLine()), Column(L->getColumn()), Scope(L->getRawScope()),
329 InlinedAt(L->getRawInlinedAt()), ImplicitCode(L->isImplicitCode()) {}
332 return Line ==
RHS->getLine() && Column ==
RHS->getColumn() &&
333 Scope ==
RHS->getRawScope() && InlinedAt ==
RHS->getRawInlinedAt() &&
334 ImplicitCode ==
RHS->isImplicitCode();
338 return hash_combine(Line, Column, Scope, InlinedAt, ImplicitCode);
353 return Tag ==
RHS->getTag() && Header ==
RHS->getRawHeader() &&
372 : CountNode(CountNode), LowerBound(LowerBound), UpperBound(UpperBound),
375 : CountNode(
N->getRawCountNode()), LowerBound(
N->getRawLowerBound()),
376 UpperBound(
N->getRawUpperBound()), Stride(
N->getRawStride()) {}
394 return BoundsEqual(CountNode,
RHS->getRawCountNode()) &&
395 BoundsEqual(LowerBound,
RHS->getRawLowerBound()) &&
396 BoundsEqual(UpperBound,
RHS->getRawUpperBound()) &&
397 BoundsEqual(Stride,
RHS->getRawStride());
402 if (
auto *MD = dyn_cast<ConstantAsMetadata>(CountNode))
403 return hash_combine(cast<ConstantInt>(MD->getValue())->getSExtValue(),
404 LowerBound, UpperBound, Stride);
405 return hash_combine(CountNode, LowerBound, UpperBound, Stride);
417 : CountNode(CountNode), LowerBound(LowerBound), UpperBound(UpperBound),
420 : CountNode(
N->getRawCountNode()), LowerBound(
N->getRawLowerBound()),
421 UpperBound(
N->getRawUpperBound()), Stride(
N->getRawStride()) {}
424 return (CountNode ==
RHS->getRawCountNode()) &&
425 (LowerBound ==
RHS->getRawLowerBound()) &&
426 (UpperBound ==
RHS->getRawUpperBound()) &&
427 (Stride ==
RHS->getRawStride());
431 auto *MD = dyn_cast_or_null<ConstantAsMetadata>(CountNode);
433 return hash_combine(cast<ConstantInt>(MD->getValue())->getSExtValue(),
434 LowerBound, UpperBound, Stride);
435 return hash_combine(CountNode, LowerBound, UpperBound, Stride);
448 IsUnsigned(IsUnsigned) {}
451 IsUnsigned(
N->isUnsigned()) {}
454 return Value.getBitWidth() ==
RHS->getValue().getBitWidth() &&
455 Value ==
RHS->getValue() && IsUnsigned ==
RHS->isUnsigned() &&
471 uint32_t AlignInBits,
unsigned Encoding,
unsigned Flags)
472 :
Tag(
Tag),
Name(
Name), SizeInBits(SizeInBits), AlignInBits(AlignInBits),
473 Encoding(Encoding), Flags(Flags) {}
476 AlignInBits(
N->getAlignInBits()), Encoding(
N->getEncoding()),
481 SizeInBits ==
RHS->getSizeInBits() &&
482 AlignInBits ==
RHS->getAlignInBits() &&
483 Encoding ==
RHS->getEncoding() && Flags ==
RHS->getFlags();
505 StringLengthExp(StringLengthExp), StringLocationExp(StringLocationExp),
506 SizeInBits(SizeInBits), AlignInBits(AlignInBits), Encoding(Encoding) {}
509 StringLength(
N->getRawStringLength()),
510 StringLengthExp(
N->getRawStringLengthExp()),
511 StringLocationExp(
N->getRawStringLocationExp()),
512 SizeInBits(
N->getSizeInBits()), AlignInBits(
N->getAlignInBits()),
513 Encoding(
N->getEncoding()) {}
517 StringLength ==
RHS->getRawStringLength() &&
518 StringLengthExp ==
RHS->getRawStringLengthExp() &&
519 StringLocationExp ==
RHS->getRawStringLocationExp() &&
520 SizeInBits ==
RHS->getSizeInBits() &&
521 AlignInBits ==
RHS->getAlignInBits() &&
522 Encoding ==
RHS->getEncoding();
552 std::optional<unsigned> DWARFAddressSpace,
553 std::optional<DIDerivedType::PtrAuthData> PtrAuthData,
557 AlignInBits(AlignInBits), DWARFAddressSpace(DWARFAddressSpace),
558 PtrAuthData(PtrAuthData), Flags(Flags), ExtraData(ExtraData),
562 Line(
N->getLine()), Scope(
N->getRawScope()),
563 BaseType(
N->getRawBaseType()), SizeInBits(
N->getSizeInBits()),
564 OffsetInBits(
N->getOffsetInBits()), AlignInBits(
N->getAlignInBits()),
565 DWARFAddressSpace(
N->getDWARFAddressSpace()),
566 PtrAuthData(
N->getPtrAuthData()), Flags(
N->
getFlags()),
567 ExtraData(
N->getRawExtraData()),
Annotations(
N->getRawAnnotations()) {}
571 File ==
RHS->getRawFile() && Line ==
RHS->getLine() &&
572 Scope ==
RHS->getRawScope() &&
BaseType ==
RHS->getRawBaseType() &&
573 SizeInBits ==
RHS->getSizeInBits() &&
574 AlignInBits ==
RHS->getAlignInBits() &&
575 OffsetInBits ==
RHS->getOffsetInBits() &&
576 DWARFAddressSpace ==
RHS->getDWARFAddressSpace() &&
577 PtrAuthData ==
RHS->getPtrAuthData() && Flags ==
RHS->getFlags() &&
578 ExtraData ==
RHS->getRawExtraData() &&
586 if (
Tag == dwarf::DW_TAG_member &&
Name)
587 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
588 if (CT->getRawIdentifier())
608 return isODRMember(
LHS->getTag(),
LHS->getRawScope(),
LHS->getRawName(),
617 if (
Tag != dwarf::DW_TAG_member || !
Name)
620 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
621 if (!CT || !CT->getRawIdentifier())
626 Scope ==
RHS->getRawScope();
656 Metadata *Elements,
unsigned RuntimeLang,
663 AlignInBits(AlignInBits), Flags(Flags), Elements(Elements),
664 RuntimeLang(RuntimeLang), VTableHolder(VTableHolder),
665 TemplateParams(TemplateParams), Identifier(Identifier),
666 Discriminator(Discriminator), DataLocation(DataLocation),
667 Associated(Associated), Allocated(Allocated), Rank(Rank),
671 Line(
N->getLine()), Scope(
N->getRawScope()),
672 BaseType(
N->getRawBaseType()), SizeInBits(
N->getSizeInBits()),
673 OffsetInBits(
N->getOffsetInBits()), AlignInBits(
N->getAlignInBits()),
674 Flags(
N->
getFlags()), Elements(
N->getRawElements()),
675 RuntimeLang(
N->getRuntimeLang()), VTableHolder(
N->getRawVTableHolder()),
676 TemplateParams(
N->getRawTemplateParams()),
677 Identifier(
N->getRawIdentifier()),
678 Discriminator(
N->getRawDiscriminator()),
679 DataLocation(
N->getRawDataLocation()),
680 Associated(
N->getRawAssociated()), Allocated(
N->getRawAllocated()),
681 Rank(
N->getRawRank()),
Annotations(
N->getRawAnnotations()) {}
685 File ==
RHS->getRawFile() && Line ==
RHS->getLine() &&
686 Scope ==
RHS->getRawScope() &&
BaseType ==
RHS->getRawBaseType() &&
687 SizeInBits ==
RHS->getSizeInBits() &&
688 AlignInBits ==
RHS->getAlignInBits() &&
689 OffsetInBits ==
RHS->getOffsetInBits() && Flags ==
RHS->getFlags() &&
690 Elements ==
RHS->getRawElements() &&
691 RuntimeLang ==
RHS->getRuntimeLang() &&
692 VTableHolder ==
RHS->getRawVTableHolder() &&
693 TemplateParams ==
RHS->getRawTemplateParams() &&
694 Identifier ==
RHS->getRawIdentifier() &&
695 Discriminator ==
RHS->getRawDiscriminator() &&
696 DataLocation ==
RHS->getRawDataLocation() &&
697 Associated ==
RHS->getRawAssociated() &&
698 Allocated ==
RHS->getRawAllocated() && Rank ==
RHS->getRawRank() &&
718 : Flags(Flags),
CC(
CC), TypeArray(TypeArray) {}
720 : Flags(
N->
getFlags()),
CC(
N->getCC()), TypeArray(
N->getRawTypeArray()) {}
723 return Flags ==
RHS->getFlags() &&
CC ==
RHS->getCC() &&
724 TypeArray ==
RHS->getRawTypeArray();
733 std::optional<DIFile::ChecksumInfo<MDString *>>
Checksum;
739 : Filename(Filename), Directory(Directory), Checksum(Checksum),
742 : Filename(
N->getRawFilename()), Directory(
N->getRawDirectory()),
743 Checksum(
N->getRawChecksum()), Source(
N->getRawSource()) {}
746 return Filename ==
RHS->getRawFilename() &&
747 Directory ==
RHS->getRawDirectory() &&
748 Checksum ==
RHS->getRawChecksum() && Source ==
RHS->getRawSource();
752 return hash_combine(Filename, Directory, Checksum ? Checksum->Kind : 0,
753 Checksum ? Checksum->Value :
nullptr, Source);
780 unsigned ScopeLine,
Metadata *ContainingType,
781 unsigned VirtualIndex,
int ThisAdjustment,
unsigned Flags,
787 Line(Line),
Type(
Type), ScopeLine(ScopeLine),
788 ContainingType(ContainingType), VirtualIndex(VirtualIndex),
789 ThisAdjustment(ThisAdjustment), Flags(Flags), SPFlags(SPFlags),
790 Unit(Unit), TemplateParams(TemplateParams), Declaration(Declaration),
791 RetainedNodes(RetainedNodes), ThrownTypes(ThrownTypes),
794 : Scope(
N->getRawScope()),
Name(
N->getRawName()),
796 Line(
N->getLine()),
Type(
N->getRawType()), ScopeLine(
N->getScopeLine()),
797 ContainingType(
N->getRawContainingType()),
798 VirtualIndex(
N->getVirtualIndex()),
799 ThisAdjustment(
N->getThisAdjustment()), Flags(
N->
getFlags()),
800 SPFlags(
N->getSPFlags()), Unit(
N->getRawUnit()),
801 TemplateParams(
N->getRawTemplateParams()),
802 Declaration(
N->getRawDeclaration()),
803 RetainedNodes(
N->getRawRetainedNodes()),
804 ThrownTypes(
N->getRawThrownTypes()),
806 TargetFuncName(
N->getRawTargetFuncName()) {}
809 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
811 File ==
RHS->getRawFile() && Line ==
RHS->getLine() &&
812 Type ==
RHS->getRawType() && ScopeLine ==
RHS->getScopeLine() &&
813 ContainingType ==
RHS->getRawContainingType() &&
814 VirtualIndex ==
RHS->getVirtualIndex() &&
815 ThisAdjustment ==
RHS->getThisAdjustment() &&
816 Flags ==
RHS->getFlags() && SPFlags ==
RHS->getSPFlags() &&
817 Unit ==
RHS->getUnit() &&
818 TemplateParams ==
RHS->getRawTemplateParams() &&
819 Declaration ==
RHS->getRawDeclaration() &&
820 RetainedNodes ==
RHS->getRawRetainedNodes() &&
821 ThrownTypes ==
RHS->getRawThrownTypes() &&
823 TargetFuncName ==
RHS->getRawTargetFuncName();
826 bool isDefinition()
const {
return SPFlags & DISubprogram::SPFlagDefinition; }
833 if (
auto *CT = dyn_cast_or_null<DICompositeType>(Scope))
834 if (
auto *
ID = CT->getRawIdentifier())
835 ScopeLinkageName =
ID->getString();
841 isa_and_nonnull<DICompositeType>(Scope))
856 return isDeclarationOfODRMember(
LHS.isDefinition(),
LHS.Scope,
857 LHS.LinkageName,
LHS.TemplateParams,
RHS);
861 return isDeclarationOfODRMember(
LHS->isDefinition(),
LHS->getRawScope(),
862 LHS->getRawLinkageName(),
863 LHS->getRawTemplateParams(),
RHS);
876 auto *CT = dyn_cast_or_null<DICompositeType>(Scope);
877 if (!CT || !CT->getRawIdentifier())
886 return IsDefinition ==
RHS->isDefinition() && Scope ==
RHS->getRawScope() &&
888 TemplateParams ==
RHS->getRawTemplateParams();
899 : Scope(Scope), File(File), Line(Line), Column(Column) {}
901 : Scope(
N->getRawScope()), File(
N->getRawFile()), Line(
N->getLine()),
902 Column(
N->getColumn()) {}
905 return Scope ==
RHS->getRawScope() && File ==
RHS->getRawFile() &&
906 Line ==
RHS->getLine() && Column ==
RHS->getColumn();
920 : Scope(Scope), File(File), Discriminator(Discriminator) {}
922 : Scope(
N->getRawScope()), File(
N->getRawFile()),
923 Discriminator(
N->getDiscriminator()) {}
926 return Scope ==
RHS->getRawScope() && File ==
RHS->getRawFile() &&
927 Discriminator ==
RHS->getDiscriminator();
941 : Scope(Scope),
Name(
Name), ExportSymbols(ExportSymbols) {}
943 : Scope(
N->getRawScope()),
Name(
N->getRawName()),
944 ExportSymbols(
N->getExportSymbols()) {}
947 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
948 ExportSymbols ==
RHS->getExportSymbols();
963 : Scope(Scope), Decl(Decl),
Name(
Name), File(File), LineNo(LineNo) {}
965 : Scope(
N->getRawScope()), Decl(
N->getRawDecl()),
Name(
N->getRawName()),
966 File(
N->getRawFile()), LineNo(
N->getLineNo()) {}
969 return Scope ==
RHS->getRawScope() && Decl ==
RHS->getRawDecl() &&
970 Name ==
RHS->getRawName() && File ==
RHS->getRawFile() &&
971 LineNo ==
RHS->getLineNo();
991 MDString *APINotesFile,
unsigned LineNo,
bool IsDecl)
992 : File(File), Scope(Scope),
Name(
Name),
993 ConfigurationMacros(ConfigurationMacros), IncludePath(IncludePath),
994 APINotesFile(APINotesFile), LineNo(LineNo), IsDecl(IsDecl) {}
996 : File(
N->getRawFile()), Scope(
N->getRawScope()),
Name(
N->getRawName()),
997 ConfigurationMacros(
N->getRawConfigurationMacros()),
998 IncludePath(
N->getRawIncludePath()),
999 APINotesFile(
N->getRawAPINotesFile()), LineNo(
N->getLineNo()),
1000 IsDecl(
N->getIsDecl()) {}
1003 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
1004 ConfigurationMacros ==
RHS->getRawConfigurationMacros() &&
1005 IncludePath ==
RHS->getRawIncludePath() &&
1006 APINotesFile ==
RHS->getRawAPINotesFile() &&
1007 File ==
RHS->getRawFile() && LineNo ==
RHS->getLineNo() &&
1008 IsDecl ==
RHS->getIsDecl();
1024 :
Name(
N->getRawName()),
Type(
N->getRawType()),
1025 IsDefault(
N->isDefault()) {}
1029 IsDefault ==
RHS->isDefault();
1047 IsDefault(
N->isDefault()),
Value(
N->getValue()) {}
1051 Type ==
RHS->getRawType() && IsDefault ==
RHS->isDefault() &&
1076 bool IsLocalToUnit,
bool IsDefinition,
1080 Line(Line),
Type(
Type), IsLocalToUnit(IsLocalToUnit),
1081 IsDefinition(IsDefinition),
1082 StaticDataMemberDeclaration(StaticDataMemberDeclaration),
1083 TemplateParams(TemplateParams), AlignInBits(AlignInBits),
1086 : Scope(
N->getRawScope()),
Name(
N->getRawName()),
1088 Line(
N->getLine()),
Type(
N->getRawType()),
1089 IsLocalToUnit(
N->isLocalToUnit()), IsDefinition(
N->isDefinition()),
1090 StaticDataMemberDeclaration(
N->getRawStaticDataMemberDeclaration()),
1091 TemplateParams(
N->getRawTemplateParams()),
1092 AlignInBits(
N->getAlignInBits()),
Annotations(
N->getRawAnnotations()) {}
1095 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
1097 File ==
RHS->getRawFile() && Line ==
RHS->getLine() &&
1098 Type ==
RHS->getRawType() && IsLocalToUnit ==
RHS->isLocalToUnit() &&
1099 IsDefinition ==
RHS->isDefinition() &&
1100 StaticDataMemberDeclaration ==
1101 RHS->getRawStaticDataMemberDeclaration() &&
1102 TemplateParams ==
RHS->getRawTemplateParams() &&
1103 AlignInBits ==
RHS->getAlignInBits() &&
1116 IsLocalToUnit, IsDefinition,
1138 : Scope(
N->getRawScope()),
Name(
N->getRawName()), File(
N->getRawFile()),
1139 Line(
N->getLine()),
Type(
N->getRawType()), Arg(
N->getArg()),
1140 Flags(
N->
getFlags()), AlignInBits(
N->getAlignInBits()),
1144 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
1145 File ==
RHS->getRawFile() && Line ==
RHS->getLine() &&
1146 Type ==
RHS->getRawType() && Arg ==
RHS->getArg() &&
1147 Flags ==
RHS->getFlags() && AlignInBits ==
RHS->getAlignInBits() &&
1170 : Scope(Scope),
Name(
Name), File(File), Line(Line) {}
1172 : Scope(
N->getRawScope()),
Name(
N->getRawName()), File(
N->getRawFile()),
1173 Line(
N->getLine()) {}
1176 return Scope ==
RHS->getRawScope() &&
Name ==
RHS->getRawName() &&
1177 File ==
RHS->getRawFile() && Line ==
RHS->getLine();
1191 return Elements ==
RHS->getElements();
1206 : Variable(
N->getRawVariable()),
Expression(
N->getRawExpression()) {}
1209 return Variable ==
RHS->getRawVariable() &&
1228 :
Name(
Name), File(File), Line(Line), GetterName(GetterName),
1231 :
Name(
N->getRawName()), File(
N->getRawFile()), Line(
N->getLine()),
1232 GetterName(
N->getRawGetterName()), SetterName(
N->getRawSetterName()),
1236 return Name ==
RHS->getRawName() && File ==
RHS->getRawFile() &&
1237 Line ==
RHS->getLine() && GetterName ==
RHS->getRawGetterName() &&
1238 SetterName ==
RHS->getRawSetterName() &&
1259 :
Tag(
Tag), Scope(Scope), Entity(Entity), File(File), Line(Line),
1262 :
Tag(
N->
getTag()), Scope(
N->getRawScope()), Entity(
N->getRawEntity()),
1263 File(
N->getRawFile()), Line(
N->getLine()),
Name(
N->getRawName()),
1264 Elements(
N->getRawElements()) {}
1267 return Tag ==
RHS->getTag() && Scope ==
RHS->getRawScope() &&
1268 Entity ==
RHS->getRawEntity() && File ==
RHS->getFile() &&
1269 Line ==
RHS->getLine() &&
Name ==
RHS->getRawName() &&
1270 Elements ==
RHS->getRawElements();
1287 : MIType(
N->getMacinfoType()), Line(
N->getLine()),
Name(
N->getRawName()),
1288 Value(
N->getRawValue()) {}
1291 return MIType ==
RHS->getMacinfoType() && Line ==
RHS->getLine() &&
1308 : MIType(MIType), Line(Line), File(File), Elements(Elements) {}
1310 : MIType(
N->getMacinfoType()), Line(
N->getLine()), File(
N->getRawFile()),
1311 Elements(
N->getRawElements()) {}
1314 return MIType ==
RHS->getMacinfoType() && Line ==
RHS->getLine() &&
1315 File ==
RHS->getRawFile() && Elements ==
RHS->getRawElements();
1383 return KeyTy(
N).getHashValue();
1401#define HANDLE_MDNODE_LEAF(CLASS) using CLASS##Info = MDNodeInfo<CLASS>;
1402#include "llvm/IR/Metadata.def"
1450 template <
class PredTy>
void remove_if(PredTy shouldRemove) {
1525#define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
1526 DenseSet<CLASS *, CLASS##Info> CLASS##s;
1527#include "llvm/IR/Metadata.def"
1530 std::optional<DenseMap<const MDString *, DICompositeType *>>
DITypeMap;
This file defines the StringMap class.
This file declares a class to represent arbitrary precision floating point values and provide a varie...
This file implements a class to represent arbitrary precision integral constant values and operations...
This file defines the BumpPtrAllocator interface.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
This file contains the declarations for the subclasses of Constant, which represent the different fla...
This file defines DenseMapInfo traits for DenseMap.
This file defines the DenseMap class.
This file defines the DenseSet and SmallDenseSet classes.
This file contains constants used for implementing Dwarf debug support.
This file defines a hash set that can be used to remove duplication of nodes in a graph.
Module.h This file contains the declarations for the Module class.
static StringRef getName(Value *V)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file defines the SmallPtrSet class.
This file defines the SmallVector class.
static uint32_t getFlags(const Symbol *Sym)
Class for arbitrary precision integers.
Annotations lets you mark points and ranges inside source code, for tests:
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
size_t size() const
size - Get the array size.
bool empty() const
empty - Check if the array is empty.
Class to represent array types.
LLVM Basic Block Representation.
The address of a basic block.
Allocate memory in an ever growing pool, as if by bump-pointer.
This is the shared class of boolean and integer constants.
int64_t getSExtValue() const
Return the constant as a 64-bit integer value after it has been sign extended as appropriate for the ...
List of ValueAsMetadata, to be used as an argument to a dbg.value intrinsic.
Basic type, like 'int' or 'float'.
A pair of DIGlobalVariable and DIExpression.
An imported module (C++ using directive or similar).
Represents a module in the programming language, for example, a Clang module, or a Fortran module.
String type, Fortran CHARACTER(n)
Type array for a subprogram.
Per-instruction record of debug-info.
Implements a dense probed hash-table based set.
Class representing an expression and its matching format.
FoldingSet - This template class is used to instantiate a specialized implementation of the folding s...
Class to represent function types.
Generic tagged DWARF-like metadata node.
Class to represent integer types.
DenseMap< const GlobalValue *, StringRef > GlobalValuePartitions
Collection of per-GlobalValue partitions used in this context.
DenseMap< const GlobalValue *, GlobalValue::SanitizerMetadata > GlobalValueSanitizerMetadata
DenseMap< unsigned, std::unique_ptr< ConstantInt > > IntOneConstants
bool DiagnosticsHotnessRequested
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
DenseMap< unsigned, std::unique_ptr< ConstantInt > > IntZeroConstants
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
std::string DefaultTargetCPU
DenseMap< APFloat, std::unique_ptr< ConstantFP > > FPConstants
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
StringMap< MDString, BumpPtrAllocator > MDStringCache
ConstantInt * TheFalseVal
TargetExtTypeSet TargetExtTypes
DenseMap< DIAssignID *, SmallVector< Instruction *, 1 > > AssignmentIDToInstrs
Map DIAssignID -> Instructions with that attachment.
DenseMap< Type *, std::unique_ptr< PoisonValue > > PVConstants
DenseMap< std::pair< const Function *, const BasicBlock * >, BlockAddress * > BlockAddresses
DenseMap< APInt, std::unique_ptr< ConstantInt > > IntConstants
std::vector< MDNode * > DistinctMDNodes
std::optional< uint32_t > DiagnosticsMisExpectTolerance
The percentage of difference between profiling branch weights and llvm.expect branch weights to toler...
FoldingSet< AttributeImpl > AttrsSet
StructTypeSet AnonStructTypes
std::unique_ptr< ConstantTokenNone > TheNoneToken
DenseMap< const Value *, ValueName * > ValueNames
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
void setOptPassGate(OptPassGate &)
Set the object which can disable optional passes and individual optimizations at compile time.
VectorConstantsTy VectorConstants
std::unique_ptr< LLVMRemarkStreamer > LLVMRS
The specialized remark streamer used by LLVM's OptimizationRemarkEmitter.
bool DiscardValueNames
Flag to indicate if Value (other than GlobalValue) retains their name or not.
DenseMap< const GlobalValue *, NoCFIValue * > NoCFIValues
DenseMap< const Function *, std::string > GCNames
Maintain the GC name for each function.
bool RespectDiagnosticFilters
DenseMap< Type *, std::unique_ptr< UndefValue > > UVConstants
OptPassGate & getOptPassGate() const
Access the object which can disable optional passes and individual optimizations at compile time.
DenseMap< std::pair< Type *, unsigned >, TypedPointerType * > ASTypedPointerTypes
DenseMap< std::pair< Type *, uint64_t >, ArrayType * > ArrayTypes
std::string DefaultTargetFeatures
DenseMap< const Value *, MDAttachments > ValueMetadata
Collection of metadata used in this context.
DenseMap< Module *, unsigned > MachineFunctionNums
MachineFunctionNums - Keep the next available unique number available for a MachineFunction in given ...
StringMap< unsigned > CustomMDKindNames
CustomMDKindNames - Map to hold the metadata string to ID mapping.
StringMapEntry< uint32_t > * getOrInsertBundleTag(StringRef Tag)
std::unique_ptr< DiagnosticHandler > DiagHandler
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
DbgMarker * getTrailingDbgRecords(BasicBlock *B)
DenseMap< const GlobalObject *, StringRef > GlobalObjectSections
Collection of per-GlobalObject sections used in this context.
StringMap< std::unique_ptr< ConstantDataSequential > > CDSConstants
StructConstantsTy StructConstants
DenseMap< std::pair< Type *, ElementCount >, VectorType * > VectorTypes
std::unique_ptr< remarks::RemarkStreamer > MainRemarkStreamer
The main remark streamer used by all the other streamers (e.g.
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
void deleteTrailingDbgRecords(BasicBlock *B)
FoldingSet< AttributeSetNode > AttrsSetNodes
FoldingSet< AttributeListImpl > AttrsLists
ConstantUniqueMap< ConstantPtrAuth > ConstantPtrAuths
DenseMap< TargetExtType *, std::unique_ptr< ConstantTargetNone > > CTNConstants
SpecificBumpPtrAllocator< ConstantRangeAttributeImpl > ConstantRangeAttributeAlloc
std::optional< uint64_t > DiagnosticsHotnessThreshold
The minimum hotness value a diagnostic needs in order to be included in optimization diagnostics.
ConstantUniqueMap< ConstantExpr > ExprConstants
uint32_t getOperandBundleTagID(StringRef Tag) const
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
DenseMap< unsigned, PointerType * > PointerTypes
void setTrailingDbgRecords(BasicBlock *B, DbgMarker *M)
DenseMap< std::pair< ElementCount, APInt >, std::unique_ptr< ConstantInt > > IntSplatConstants
LLVMContext::YieldCallbackTy YieldCallback
DenseMap< unsigned, IntegerType * > IntegerTypes
StringMap< StructType * > NamedStructTypes
std::vector< ConstantRangeListAttributeImpl * > ConstantRangeListAttributes
PointerType * AS0PointerType
DenseSet< DIArgList *, DIArgListInfo > DIArgLists
ValueHandlesTy ValueHandles
ArrayConstantsTy ArrayConstants
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
bool MisExpectWarningRequested
ConstantUniqueMap< InlineAsm > InlineAsms
DenseMap< std::pair< const char *, unsigned >, unsigned > DiscriminatorTable
DiscriminatorTable - This table maps file:line locations to an integer representing the next DWARF pa...
DenseMap< const GlobalValue *, DSOLocalEquivalent * > DSOLocalEquivalents
unsigned NamedStructTypesUniqueID
SmallDenseMap< BasicBlock *, DbgMarker * > TrailingDbgRecords
Mapping of blocks to collections of "trailing" DbgVariableRecords.
FunctionTypeSet FunctionTypes
std::optional< DenseMap< const MDString *, DICompositeType * > > DITypeMap
DenseMap< std::pair< ElementCount, APFloat >, std::unique_ptr< ConstantFP > > FPSplatConstants
This is an important class for using LLVM in a threaded context.
void(*)(LLVMContext *Context, void *OpaqueHandle) YieldCallbackTy
Defines the type of a yield callback.
Multimap-like storage for metadata attachments.
void insert(unsigned ID, MDNode &MD)
Adds an attachment to a particular node.
void remove_if(PredTy shouldRemove)
Erase matching attachments.
void get(unsigned ID, SmallVectorImpl< MDNode * > &Result) const
Appends all attachments with the given ID to Result in insertion order.
void getAll(SmallVectorImpl< std::pair< unsigned, MDNode * > > &Result) const
Appends all attachments for the global to Result, sorting by attachment ID.
void set(unsigned ID, MDNode *MD)
Set an attachment to a particular node.
MDNode * lookup(unsigned ID) const
Returns the first attachment with the given ID or nullptr if no such attachment exists.
bool erase(unsigned ID)
Remove attachments with the given ID.
Structure for hashing arbitrary MDNode operands.
MDNodeOpsKey(const NodeTy *N, unsigned Offset=0)
bool compareOps(const NodeTy *RHS, unsigned Offset=0) const
MDNodeOpsKey(ArrayRef< Metadata * > Ops)
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
Class to represent pointers.
SmallPtrSet - This class implements a set which is optimized for holding SmallSize or less elements.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
A BumpPtrAllocator that allows only elements of a specific type to be allocated.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
StringMap - This is an unconventional map that is specialized for handling keys that are "strings",...
StringRef - Represent a constant reference to a string, i.e.
Class to represent struct types.
Class to represent target extensions types, which are generally unintrospectable from target-independ...
The instances of the Type class are immutable: once they are created, they are never changed.
A few GPU targets, such as DXIL and SPIR-V, have typed pointers.
Saves strings in the provided stable storage and returns a StringRef with a stable character pointer.
LLVM Value Representation.
Base class of all SIMD vector types.
unsigned getTag(StringRef TagString)
@ C
The default llvm calling convention, compatible with C.
@ BasicBlock
Various leaf nodes.
This is an optimization pass for GlobalISel generic memory operations.
hash_code hash_value(const FixedPointSemantics &Val)
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
void erase_if(Container &C, UnaryPredicate P)
Provide a container algorithm similar to C++ Library Fundamentals v2's erase_if which is equivalent t...
hash_code hash_combine(const Ts &...args)
Combine values into a single hash_code.
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
Implement std::hash so that hash_code can be used in STL containers.
static const fltSemantics & Bogus() LLVM_READNONE
A Pseudo fltsemantic used to construct APFloats that cannot conflict with anything real.
KeyTy(const ArrayRef< Type * > &E, bool P)
KeyTy(const StructType *ST)
bool operator==(const KeyTy &that) const
ArrayRef< Type * > ETypes
bool operator!=(const KeyTy &that) const
static StructType * getEmptyKey()
static bool isEqual(const StructType *LHS, const StructType *RHS)
static unsigned getHashValue(const StructType *ST)
static unsigned getHashValue(const KeyTy &Key)
static StructType * getTombstoneKey()
static bool isEqual(const KeyTy &LHS, const StructType *RHS)
DenseMapInfo for DIArgList.
static unsigned getHashValue(const KeyTy &Key)
static DIArgList * getEmptyKey()
static unsigned getHashValue(const DIArgList *N)
static bool isEqual(const DIArgList *LHS, const DIArgList *RHS)
static DIArgList * getTombstoneKey()
static bool isEqual(const KeyTy &LHS, const DIArgList *RHS)
ArrayRef< ValueAsMetadata * > Args
DIArgListKeyInfo(const DIArgList *N)
DIArgListKeyInfo(ArrayRef< ValueAsMetadata * > Args)
unsigned getHashValue() const
bool isKeyOf(const DIArgList *RHS) const
A single checksum, represented by a Kind and a Value (a string).
static bool isEqual(const APFloat &LHS, const APFloat &RHS)
static APFloat getTombstoneKey()
static APFloat getEmptyKey()
static unsigned getHashValue(const APFloat &Key)
An information struct used to provide DenseMap with the various necessary components for a given valu...
ArrayRef< Type * > Params
bool operator==(const KeyTy &that) const
bool operator!=(const KeyTy &that) const
KeyTy(const Type *R, const ArrayRef< Type * > &P, bool V)
KeyTy(const FunctionType *FT)
static unsigned getHashValue(const FunctionType *FT)
static FunctionType * getTombstoneKey()
static bool isEqual(const KeyTy &LHS, const FunctionType *RHS)
static unsigned getHashValue(const KeyTy &Key)
static bool isEqual(const FunctionType *LHS, const FunctionType *RHS)
static FunctionType * getEmptyKey()
DenseMapInfo for MDNode subclasses.
static unsigned getHashValue(const KeyTy &Key)
static bool isEqual(const NodeTy *LHS, const NodeTy *RHS)
static bool isEqual(const KeyTy &LHS, const NodeTy *RHS)
static unsigned getHashValue(const NodeTy *N)
MDNodeKeyImpl< NodeTy > KeyTy
static NodeTy * getTombstoneKey()
static NodeTy * getEmptyKey()
bool isKeyOf(const DIBasicType *RHS) const
unsigned getHashValue() const
MDNodeKeyImpl(const DIBasicType *N)
MDNodeKeyImpl(unsigned Tag, MDString *Name, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding, unsigned Flags)
unsigned getHashValue() const
bool isKeyOf(const DICommonBlock *RHS) const
MDNodeKeyImpl(const DICommonBlock *N)
MDNodeKeyImpl(Metadata *Scope, Metadata *Decl, MDString *Name, Metadata *File, unsigned LineNo)
unsigned getHashValue() const
Metadata * TemplateParams
MDNodeKeyImpl(const DICompositeType *N)
bool isKeyOf(const DICompositeType *RHS) 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 *Elements, unsigned RuntimeLang, Metadata *VTableHolder, Metadata *TemplateParams, MDString *Identifier, Metadata *Discriminator, Metadata *DataLocation, Metadata *Associated, Metadata *Allocated, Metadata *Rank, Metadata *Annotations)
std::optional< DIDerivedType::PtrAuthData > PtrAuthData
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *File, unsigned Line, Metadata *Scope, Metadata *BaseType, uint64_t SizeInBits, uint32_t AlignInBits, uint64_t OffsetInBits, std::optional< unsigned > DWARFAddressSpace, std::optional< DIDerivedType::PtrAuthData > PtrAuthData, unsigned Flags, Metadata *ExtraData, Metadata *Annotations)
MDNodeKeyImpl(const DIDerivedType *N)
bool isKeyOf(const DIDerivedType *RHS) const
std::optional< unsigned > DWARFAddressSpace
unsigned getHashValue() const
MDNodeKeyImpl(APInt Value, bool IsUnsigned, MDString *Name)
unsigned getHashValue() const
MDNodeKeyImpl(int64_t Value, bool IsUnsigned, MDString *Name)
bool isKeyOf(const DIEnumerator *RHS) const
MDNodeKeyImpl(const DIEnumerator *N)
bool isKeyOf(const DIExpression *RHS) const
ArrayRef< uint64_t > Elements
MDNodeKeyImpl(const DIExpression *N)
MDNodeKeyImpl(ArrayRef< uint64_t > Elements)
unsigned getHashValue() const
std::optional< DIFile::ChecksumInfo< MDString * > > Checksum
MDNodeKeyImpl(const DIFile *N)
bool isKeyOf(const DIFile *RHS) const
unsigned getHashValue() const
MDNodeKeyImpl(MDString *Filename, MDString *Directory, std::optional< DIFile::ChecksumInfo< MDString * > > Checksum, MDString *Source)
bool isKeyOf(const DIGenericSubrange *RHS) const
MDNodeKeyImpl(const DIGenericSubrange *N)
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride)
MDNodeKeyImpl(Metadata *Variable, Metadata *Expression)
unsigned getHashValue() const
bool isKeyOf(const DIGlobalVariableExpression *RHS) const
MDNodeKeyImpl(const DIGlobalVariableExpression *N)
Metadata * StaticDataMemberDeclaration
bool isKeyOf(const DIGlobalVariable *RHS) const
Metadata * TemplateParams
MDNodeKeyImpl(Metadata *Scope, MDString *Name, MDString *LinkageName, Metadata *File, unsigned Line, Metadata *Type, bool IsLocalToUnit, bool IsDefinition, Metadata *StaticDataMemberDeclaration, Metadata *TemplateParams, uint32_t AlignInBits, Metadata *Annotations)
MDNodeKeyImpl(const DIGlobalVariable *N)
unsigned getHashValue() const
bool isKeyOf(const DIImportedEntity *RHS) const
MDNodeKeyImpl(unsigned Tag, Metadata *Scope, Metadata *Entity, Metadata *File, unsigned Line, MDString *Name, Metadata *Elements)
MDNodeKeyImpl(const DIImportedEntity *N)
unsigned getHashValue() const
unsigned getHashValue() const
Using name and line to get hash value. It should already be mostly unique.
bool isKeyOf(const DILabel *RHS) const
MDNodeKeyImpl(const DILabel *N)
MDNodeKeyImpl(Metadata *Scope, MDString *Name, Metadata *File, unsigned Line)
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Discriminator)
MDNodeKeyImpl(const DILexicalBlockFile *N)
bool isKeyOf(const DILexicalBlockFile *RHS) const
bool isKeyOf(const DILexicalBlock *RHS) const
MDNodeKeyImpl(const DILexicalBlock *N)
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *Scope, Metadata *File, unsigned Line, unsigned Column)
unsigned getHashValue() const
bool isKeyOf(const DILocalVariable *RHS) const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, Metadata *File, unsigned Line, Metadata *Type, unsigned Arg, unsigned Flags, uint32_t AlignInBits, Metadata *Annotations)
MDNodeKeyImpl(const DILocalVariable *N)
MDNodeKeyImpl(unsigned Line, unsigned Column, Metadata *Scope, Metadata *InlinedAt, bool ImplicitCode)
unsigned getHashValue() const
MDNodeKeyImpl(const DILocation *L)
bool isKeyOf(const DILocation *RHS) const
MDNodeKeyImpl(const DIMacroFile *N)
unsigned getHashValue() const
MDNodeKeyImpl(unsigned MIType, unsigned Line, Metadata *File, Metadata *Elements)
bool isKeyOf(const DIMacroFile *RHS) const
MDNodeKeyImpl(const DIMacro *N)
MDNodeKeyImpl(unsigned MIType, unsigned Line, MDString *Name, MDString *Value)
bool isKeyOf(const DIMacro *RHS) const
unsigned getHashValue() const
MDNodeKeyImpl(const DIModule *N)
MDNodeKeyImpl(Metadata *File, Metadata *Scope, MDString *Name, MDString *ConfigurationMacros, MDString *IncludePath, MDString *APINotesFile, unsigned LineNo, bool IsDecl)
bool isKeyOf(const DIModule *RHS) const
MDString * ConfigurationMacros
unsigned getHashValue() const
MDNodeKeyImpl(const DINamespace *N)
unsigned getHashValue() const
MDNodeKeyImpl(Metadata *Scope, MDString *Name, bool ExportSymbols)
bool isKeyOf(const DINamespace *RHS) const
unsigned getHashValue() const
MDNodeKeyImpl(const DIObjCProperty *N)
bool isKeyOf(const DIObjCProperty *RHS) const
MDNodeKeyImpl(MDString *Name, Metadata *File, unsigned Line, MDString *GetterName, MDString *SetterName, unsigned Attributes, Metadata *Type)
MDNodeKeyImpl(const DIStringType *N)
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *StringLength, Metadata *StringLengthExp, Metadata *StringLocationExp, uint64_t SizeInBits, uint32_t AlignInBits, unsigned Encoding)
bool isKeyOf(const DIStringType *RHS) const
Metadata * StringLocationExp
Metadata * StringLengthExp
unsigned getHashValue() const
Metadata * ContainingType
Metadata * TemplateParams
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, Metadata *Annotations, MDString *TargetFuncName)
bool isDefinition() const
unsigned getHashValue() const
MDString * TargetFuncName
bool isKeyOf(const DISubprogram *RHS) const
MDNodeKeyImpl(const DISubprogram *N)
MDNodeKeyImpl(Metadata *CountNode, Metadata *LowerBound, Metadata *UpperBound, Metadata *Stride)
unsigned getHashValue() const
bool isKeyOf(const DISubrange *RHS) const
MDNodeKeyImpl(const DISubrange *N)
bool isKeyOf(const DISubroutineType *RHS) const
MDNodeKeyImpl(unsigned Flags, uint8_t CC, Metadata *TypeArray)
unsigned getHashValue() const
MDNodeKeyImpl(const DISubroutineType *N)
MDNodeKeyImpl(const DITemplateTypeParameter *N)
bool isKeyOf(const DITemplateTypeParameter *RHS) const
MDNodeKeyImpl(MDString *Name, Metadata *Type, bool IsDefault)
unsigned getHashValue() const
MDNodeKeyImpl(const DITemplateValueParameter *N)
MDNodeKeyImpl(unsigned Tag, MDString *Name, Metadata *Type, bool IsDefault, Metadata *Value)
unsigned getHashValue() const
bool isKeyOf(const DITemplateValueParameter *RHS) const
static unsigned calculateHash(GenericDINode *N)
unsigned getHashValue() const
MDNodeKeyImpl(const GenericDINode *N)
MDNodeKeyImpl(unsigned Tag, MDString *Header, ArrayRef< Metadata * > DwarfOps)
bool isKeyOf(const GenericDINode *RHS) const
bool isKeyOf(const MDTuple *RHS) const
MDNodeKeyImpl(ArrayRef< Metadata * > Ops)
MDNodeKeyImpl(const MDTuple *N)
unsigned getHashValue() const
static unsigned calculateHash(MDTuple *N)
static bool isSubsetEqual(const DIDerivedType *LHS, const DIDerivedType *RHS)
static bool isSubsetEqual(const KeyTy &LHS, const DIDerivedType *RHS)
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.
static bool isSubsetEqual(const DISubprogram *LHS, const DISubprogram *RHS)
static bool isSubsetEqual(const KeyTy &LHS, const DISubprogram *RHS)
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.
Configuration point for MDNodeInfo::isEqual().
static bool isSubsetEqual(const KeyTy &LHS, const NodeTy *RHS)
static bool isSubsetEqual(const NodeTy *LHS, const NodeTy *RHS)
KeyTy(StringRef N, const ArrayRef< Type * > &TP, const ArrayRef< unsigned > &IP)
ArrayRef< unsigned > IntParams
bool operator==(const KeyTy &that) const
KeyTy(const TargetExtType *TT)
ArrayRef< Type * > TypeParams
bool operator!=(const KeyTy &that) const
static unsigned getHashValue(const TargetExtType *FT)
static bool isEqual(const TargetExtType *LHS, const TargetExtType *RHS)
static bool isEqual(const KeyTy &LHS, const TargetExtType *RHS)
static unsigned getHashValue(const KeyTy &Key)
static TargetExtType * getTombstoneKey()
static TargetExtType * getEmptyKey()