38 VoidTy(
C,
Type::VoidTyID), LabelTy(
C,
Type::LabelTyID),
39 HalfTy(
C,
Type::HalfTyID), BFloatTy(
C,
Type::BFloatTyID),
41 MetadataTy(
C,
Type::MetadataTyID), TokenTy(
C,
Type::TokenTyID),
42 X86_FP80Ty(
C,
Type::X86_FP80TyID), FP128Ty(
C,
Type::FP128TyID),
43 PPC_FP128Ty(
C,
Type::PPC_FP128TyID), X86_AMXTy(
C,
Type::X86_AMXTyID),
44 Int1Ty(
C, 1), Int8Ty(
C, 8), Int16Ty(
C, 16), Int32Ty(
C, 32),
45 Int64Ty(
C, 64), Int128Ty(
C, 128) {}
72 I->dropAllReferences();
73#define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
74 for (auto *I : CLASS##s) \
75 I->dropAllReferences();
76#include "llvm/IR/Metadata.def"
80 Pair.second->dropUsers();
82 Pair.second->dropUse();
86 AL->dropAllReferences(
false);
93 I->deleteAsSubclass();
96 ConstantRangeListAttribute->~ConstantRangeListAttributeImpl();
97#define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
98 for (CLASS * I : CLASS##s) \
100#include "llvm/IR/Metadata.def"
104 I->dropAllReferences();
106 I->dropAllReferences();
108 I->dropAllReferences();
110 I->dropAllReferences();
164 while (!WorkList.
empty()) {
166 if (
C->use_empty()) {
167 for (
const Use &
Op :
C->operands()) {
168 if (
auto *COp = dyn_cast<ConstantArray>(
Op))
171 C->destroyConstant();
206 "Expected hash of MDOperand to equal hash of Metadata*");
224 Tags[
T.second] =
T.first();
234 auto NewSSID =
SSC.size();
235 assert(NewSSID < std::numeric_limits<SyncScope::ID>::max() &&
236 "Hit the maximum number of synchronization scopes allowed!");
237 return SSC.insert(std::make_pair(SSN,
SyncScope::ID(NewSSID))).first->second;
243 for (
const auto &
SSE :
SSC)
244 SSNs[
SSE.second] =
SSE.first();
This file defines the StringMapEntry class - it is intended to be a low dependency implementation det...
This file defines various helper methods and classes used by LLVMContextImpl for creating and managin...
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
This defines the Use class.
const Type::TypeID FloatTyID
const Type::TypeID DoubleTyID
Module.h This file contains the declarations for the Module class.
This file declares the interface for bisecting optimizations.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This file implements a set that has insertion order iteration characteristics.
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
ConstantArray - Constant Array Declarations.
List of ValueAsMetadata, to be used as an argument to a dbg.value intrinsic.
This class represents an Operation in the Expression.
DenseMap< unsigned, std::unique_ptr< ConstantInt > > IntOneConstants
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
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
DenseMap< Type *, std::unique_ptr< PoisonValue > > PVConstants
DenseMap< APInt, std::unique_ptr< ConstantInt > > IntConstants
std::vector< MDNode * > DistinctMDNodes
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
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< const Value *, MDAttachments > ValueMetadata
Collection of metadata used in this context.
StringMapEntry< uint32_t > * getOrInsertBundleTag(StringRef Tag)
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
StringMap< std::unique_ptr< ConstantDataSequential > > CDSConstants
StructConstantsTy StructConstants
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
FoldingSet< AttributeSetNode > AttrsSetNodes
DenseMap< TargetExtType *, std::unique_ptr< ConstantTargetNone > > CTNConstants
ConstantUniqueMap< ConstantExpr > ExprConstants
uint32_t getOperandBundleTagID(StringRef Tag) const
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
DenseMap< std::pair< ElementCount, APInt >, std::unique_ptr< ConstantInt > > IntSplatConstants
std::vector< ConstantRangeListAttributeImpl * > ConstantRangeListAttributes
DenseSet< DIArgList *, DIArgListInfo > DIArgLists
ArrayConstantsTy ArrayConstants
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
ConstantUniqueMap< InlineAsm > InlineAsms
LLVMContextImpl(LLVMContext &C)
SmallDenseMap< BasicBlock *, DbgMarker * > TrailingDbgRecords
Mapping of blocks to collections of "trailing" DbgVariableRecords.
DenseMap< std::pair< ElementCount, APFloat >, std::unique_ptr< ConstantFP > > FPSplatConstants
This is an important class for using LLVM in a threaded context.
LLVMContextImpl *const pImpl
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
Tracking metadata reference owned by Metadata.
void dropTriviallyDeadConstantArrays()
Destroy ConstantArrays in LLVMContext if they are not used.
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
bool empty() const
Determine if the SetVector is empty or not.
bool insert(const value_type &X)
Insert a new element into the SetVector.
value_type pop_back_val()
A SetVector that performs no allocations if smaller than a certain size.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
void reserve(size_type N)
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
iterator find(StringRef Key)
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
StringRef - Represent a constant reference to a string, i.e.
The instances of the Type class are immutable: once they are created, they are never changed.
A Use represents the edge between a Value definition and its users.
This provides a very simple, boring adaptor for a begin and end iterator into a range type.
@ C
The default llvm calling convention, compatible with C.
This is an optimization pass for GlobalISel generic memory operations.
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
static const Metadata * get_hashable_data(const MDOperand &X)
Make MDOperand transparent for hashing.
OptPassGate & getGlobalPassGate()
Singleton instance of the OptBisect class, so multiple pass managers don't need to coordinate their u...
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.
This is the base class for diagnostic handling in LLVM.