25 VoidTy(C,
Type::VoidTyID),
26 LabelTy(C,
Type::LabelTyID),
27 HalfTy(C,
Type::HalfTyID),
30 MetadataTy(C,
Type::MetadataTyID),
31 TokenTy(C,
Type::TokenTyID),
32 X86_FP80Ty(C,
Type::X86_FP80TyID),
33 FP128Ty(C,
Type::FP128TyID),
34 PPC_FP128Ty(C,
Type::PPC_FP128TyID),
35 X86_MMXTy(C,
Type::X86_MMXTyID),
54 assert(InstructionMetadata.empty() &&
55 "Instructions with metadata have been leaked");
61 I->dropAllReferences();
62 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \ 63 for (auto *I : CLASS##s) \ 64 I->dropAllReferences(); 65 #include "llvm/IR/Metadata.def" 69 Pair.second->dropUsers();
71 Pair.second->dropUse();
74 for (
MDNode *
I : DistinctMDNodes)
75 I->deleteAsSubclass();
76 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \ 77 for (CLASS * I : CLASS##s) \ 79 #include "llvm/IR/Metadata.def" 83 I->dropAllReferences();
85 I->dropAllReferences();
87 I->dropAllReferences();
89 I->dropAllReferences();
90 ExprConstants.freeConstants();
91 ArrayConstants.freeConstants();
92 StructConstants.freeConstants();
93 VectorConstants.freeConstants();
103 delete CDSConstant.second;
104 CDSConstants.clear();
131 MDVs.
reserve(MetadataAsValues.size());
132 for (
auto &Pair : MetadataAsValues)
134 MetadataAsValues.clear();
140 for (
auto &Pair : ValuesAsMetadata)
153 C->destroyConstant();
187 unsigned RawHash = calculateHash(MDs);
189 "Expected hash of MDOperand to equal hash of Metadata*");
207 Tags[
T.second] =
T.first();
219 "Hit the maximum number of synchronization scopes allowed!");
226 for (
const auto &
SSE :
SSC)
227 SSNs[
SSE.second] =
SSE.first();
245 OPG = &(*OptBisector);
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
This is the base class for diagnostic handling in LLVM.
Tracking metadata reference owned by Metadata.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
FoldingSet< AttributeImpl > AttrsSet
This class represents lattice values for constants.
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
void push_back(const T &Elt)
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
uint32_t getOperandBundleTagID(StringRef Tag) const
iterator find(StringRef Key)
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
static const Metadata * get_hashable_data(const MDOperand &X)
Make MDOperand transparent for hashing.
void reserve(size_type N)
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
op_iterator op_end() const
DenseMap< const Instruction *, MDAttachmentMap > InstructionMetadata
Collection of per-instruction metadata used in this context.
std::vector< MDNode * > DistinctMDNodes
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
ConstantUniqueMap< InlineAsm > InlineAsms
op_iterator op_begin() const
LLVMContextImpl(LLVMContext &C)
const Type::TypeID FloatTyID
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
ArrayConstantsTy ArrayConstants
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
void setOptPassGate(OptPassGate &)
Set the object which can disable optional passes and individual optimizations at compile time...
OptPassGate & getOptPassGate() const
Access the object which can disable optional passes and individual optimizations at compile time...
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)
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
LLVM_NODISCARD bool empty() const
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
VectorConstantsTy VectorConstants
LLVMContextImpl *const pImpl
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
Align max(MaybeAlign Lhs, Align Rhs)
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.
FoldingSet< AttributeListImpl > AttrsLists
This file declares the interface for bisecting optimizations.
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
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.
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID...
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
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
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