25 : TheTrueVal(nullptr), TheFalseVal(nullptr),
26 VoidTy(C,
Type::VoidTyID),
27 LabelTy(C,
Type::LabelTyID),
28 HalfTy(C,
Type::HalfTyID),
31 MetadataTy(C,
Type::MetadataTyID),
32 TokenTy(C,
Type::TokenTyID),
33 X86_FP80Ty(C,
Type::X86_FP80TyID),
34 FP128Ty(C,
Type::FP128TyID),
35 PPC_FP128Ty(C,
Type::PPC_FP128TyID),
36 X86_MMXTy(C,
Type::X86_MMXTyID),
64 I->dropAllReferences();
65 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
66 for (auto *I : CLASS##s) \
67 I->dropAllReferences();
68 #include "llvm/IR/Metadata.def"
72 Pair.second->dropUsers();
74 Pair.second->dropUse();
77 for (
MDNode *
I : DistinctMDNodes)
78 I->deleteAsSubclass();
79 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
80 for (CLASS * I : CLASS##s) \
82 #include "llvm/IR/Metadata.def"
86 I->dropAllReferences();
88 I->dropAllReferences();
90 I->dropAllReferences();
92 I->dropAllReferences();
93 ExprConstants.freeConstants();
94 ArrayConstants.freeConstants();
95 StructConstants.freeConstants();
96 VectorConstants.freeConstants();
106 delete CDSConstant.second;
107 CDSConstants.clear();
133 MDVs.
reserve(MetadataAsValues.size());
134 for (
auto &Pair : MetadataAsValues)
136 MetadataAsValues.clear();
142 for (
auto &Pair : ValuesAsMetadata)
153 if (
C->use_empty()) {
155 C->destroyConstant();
190 "Expected hash of MDOperand to equal hash of Metadata*");
208 Tags[
T.second] =
T.first();
218 void UnaryConstantExpr::anchor() { }
220 void BinaryConstantExpr::anchor() { }
222 void SelectConstantExpr::anchor() { }
224 void ExtractElementConstantExpr::anchor() { }
226 void InsertElementConstantExpr::anchor() { }
228 void ShuffleVectorConstantExpr::anchor() { }
230 void ExtractValueConstantExpr::anchor() { }
232 void InsertValueConstantExpr::anchor() { }
234 void GetElementPtrConstantExpr::anchor() { }
236 void CompareConstantExpr::anchor() { }
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
void push_back(const T &Elt)
Tracking metadata reference owned by Metadata.
FoldingSet< AttributeImpl > AttrsSet
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
iterator find(StringRef Key)
bool RespectDiagnosticFilters
op_iterator op_begin() const
static const Metadata * get_hashable_data(const MDOperand &X)
Make MDOperand transparent for hashing.
LLVMContext::InlineAsmDiagHandlerTy InlineAsmDiagHandler
void reserve(size_type N)
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
op_iterator op_end() const
OptBisect & getOptBisect()
Access the object which manages optimization bisection for failure analysis.
FoldingSet< AttributeSetImpl > AttrsLists
This file contains the simple types necessary to represent the attributes associated with functions a...
std::vector< MDNode * > DistinctMDNodes
ConstantUniqueMap< InlineAsm > InlineAsms
unsigned NamedStructTypesUniqueID
LLVMContextImpl(LLVMContext &C)
const Type::TypeID FloatTyID
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayConstantsTy ArrayConstants
static GCRegistry::Add< CoreCLRGC > E("coreclr","CoreCLR-compatible GC")
LLVMContext::YieldCallbackTy YieldCallback
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
This class implements a mechanism to disable passes and individual optimizations at compile time base...
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)
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang","erlang-compatible garbage collector")
LLVM_NODISCARD bool empty() const
uint32_t getOperandBundleTagID(StringRef Tag) const
void * InlineAsmDiagContext
VectorConstantsTy VectorConstants
LLVMContextImpl *const pImpl
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
void dropTriviallyDeadConstantArrays()
Destroy ConstantArrays in LLVMContext if they are not used.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
This file declares the interface for bisecting optimizations.
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
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...
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
bool DiagnosticHotnessRequested
ConstantUniqueMap< ConstantExpr > ExprConstants
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
const Type::TypeID DoubleTyID
StructConstantsTy StructConstants
DenseMap< Type *, std::unique_ptr< UndefValue > > UVConstants
static ManagedStatic< OptBisect > OptBisector
Singleton instance of the OptBisect class.
FoldingSet< AttributeSetNode > AttrsSetNodes
LLVMContext::DiagnosticHandlerTy DiagnosticHandler
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
StringRef - Represent a constant reference to a string, i.e.
ManagedStatic - This transparently changes the behavior of global statics to be lazily constructed on...
StringMap< ConstantDataSequential * > CDSConstants