Go to the documentation of this file.
42 VoidTy(
C,
Type::VoidTyID), LabelTy(
C,
Type::LabelTyID),
43 HalfTy(
C,
Type::HalfTyID), BFloatTy(
C,
Type::BFloatTyID),
45 MetadataTy(
C,
Type::MetadataTyID), TokenTy(
C,
Type::TokenTyID),
46 X86_FP80Ty(
C,
Type::X86_FP80TyID), FP128Ty(
C,
Type::FP128TyID),
47 PPC_FP128Ty(
C,
Type::PPC_FP128TyID), X86_MMXTy(
C,
Type::X86_MMXTyID),
48 X86_AMXTy(
C,
Type::X86_AMXTyID), Int1Ty(
C, 1), Int8Ty(
C, 8),
49 Int16Ty(
C, 16),
Int32Ty(
C, 32), Int64Ty(
C, 64), Int128Ty(
C, 128) {
74 if (
auto *
AL = dyn_cast<DIArgList>(
I)) {
75 AL->dropAllReferences();
78 I->dropAllReferences();
80 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
81 for (auto *I : CLASS##s) \
82 I->dropAllReferences();
83 #include "llvm/IR/Metadata.def"
87 Pair.second->dropUsers();
89 Pair.second->dropUse();
93 I->deleteAsSubclass();
94 #define HANDLE_MDNODE_LEAF_UNIQUABLE(CLASS) \
95 for (CLASS * I : CLASS##s) \
97 #include "llvm/IR/Metadata.def"
101 I->dropAllReferences();
103 I->dropAllReferences();
105 I->dropAllReferences();
107 I->dropAllReferences();
135 MDVs.push_back(Pair.second);
157 while (!WorkList.
empty()) {
159 if (
C->use_empty()) {
160 for (
const Use &
Op :
C->operands()) {
161 if (
auto *COp = dyn_cast<ConstantArray>(
Op))
164 C->destroyConstant();
199 "Expected hash of MDOperand to equal hash of Metadata*");
217 Tags[
T.second] =
T.first();
229 "Hit the maximum number of synchronization scopes allowed!");
236 for (
const auto &
SSE :
SSC)
237 SSNs[
SSE.second] =
SSE.first();
255 return *OpaquePointers;
259 assert((!OpaquePointers || *OpaquePointers ==
OP) &&
260 "Cannot change opaque pointers mode once set");
LLVMContextImpl *const pImpl
ConstantUniqueMap< InlineAsm > InlineAsms
This is an optimization pass for GlobalISel generic memory operations.
const Type::TypeID FloatTyID
auto drop_begin(T &&RangeOrContainer, size_t N=1)
Return a range covering RangeOrContainer with the first N elements excluded.
DenseMap< Type *, std::unique_ptr< UndefValue > > UVConstants
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
ConstantUniqueMap< ConstantExpr > ExprConstants
void setOptPassGate(OptPassGate &)
Set 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 the base class for diagnostic handling in LLVM.
Expected< ExpressionValue > max(const ExpressionValue &Lhs, const ExpressionValue &Rhs)
DenseMap< Value *, ValueAsMetadata * > ValuesAsMetadata
iterator find(StringRef Key)
void getSyncScopeNames(SmallVectorImpl< StringRef > &SSNs) const
getSyncScopeNames - Populates client supplied SmallVector with synchronization scope names registered...
ArrayConstantsTy ArrayConstants
void dropTriviallyDeadConstantArrays()
Destroy the ConstantArrays if they are not used.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
uint32_t getOperandBundleTagID(StringRef Tag) const
(vector float) vec_cmpeq(*A, *B) C
bool insert(MapEntryTy *KeyValue)
insert - Insert the specified key/value pair into the map.
DenseMap< Type *, std::unique_ptr< ConstantAggregateZero > > CAZConstants
Extensions to this class implement mechanisms to disable passes and individual optimizations at compi...
StringMapEntry< uint32_t > * getOrInsertBundleTag(StringRef Tag)
ConstantArray - Constant Array Declarations.
SmallPtrSet< Module *, 4 > OwnedModules
OwnedModules - The set of modules instantiated in this context, and which will be automatically delet...
OptPassGate & getGlobalPassGate()
Singleton instance of the OptBisect class, so multiple pass managers don't need to coordinate their u...
int getNumOccurrences() const
DenseMap< TargetExtType *, std::unique_ptr< ConstantTargetNone > > CTNConstants
StringMap< std::unique_ptr< ConstantDataSequential > > CDSConstants
bool empty() const
Determine if the SetVector is empty or not.
static GCMetadataPrinterRegistry::Add< ErlangGCPrinter > X("erlang", "erlang-compatible garbage collector")
static cl::opt< bool > OpaquePointersCL("opaque-pointers", cl::desc("Use opaque pointers"), cl::init(true))
const Type::TypeID DoubleTyID
StringMap< uint32_t > BundleTagCache
A set of interned tags for operand bundles.
DenseMap< const Value *, MDAttachments > ValueMetadata
Collection of metadata used in this context.
void setOpaquePointers(bool OP)
DenseMap< PointerType *, std::unique_ptr< ConstantPointerNull > > CPNConstants
This is an important class for using LLVM in a threaded context.
void getOperandBundleTags(SmallVectorImpl< StringRef > &Tags) const
initializer< Ty > init(const Ty &Val)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool insert(const value_type &X)
Insert a new element into the SetVector.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
static void DiagHandler(const SMDiagnostic &Diag, void *Context)
OptPassGate & getOptPassGate() const
Access the object which can disable optional passes and individual optimizations at compile time.
StringRef - Represent a constant reference to a string, i.e.
StructConstantsTy StructConstants
SyncScope::ID getOrInsertSyncScopeID(StringRef SSN)
getOrInsertSyncScopeID - Maps synchronization scope name to synchronization scope ID.
DenseMap< Type *, std::unique_ptr< PoisonValue > > PVConstants
FoldingSet< AttributeSetNode > AttrsSetNodes
DenseMap< Metadata *, MetadataAsValue * > MetadataAsValues
void dropTriviallyDeadConstantArrays()
Destroy ConstantArrays in LLVMContext if they are not used.
hash_code hash_combine_range(InputIteratorT first, InputIteratorT last)
Compute a hash_code for a sequence of values.
StringMap< SyncScope::ID > SSC
A set of interned synchronization scopes.
VectorConstantsTy VectorConstants
A SetVector that performs no allocations if smaller than a certain size.
static unsigned calculateHash(MDNode *N, unsigned Offset=0)
std::vector< MDNode * > DistinctMDNodes
#define LLVM_UNLIKELY(EXPR)
static const Metadata * get_hashable_data(const MDOperand &X)
Make MDOperand transparent for hashing.
void reserve(size_type N)
LLVMContextImpl(LLVMContext &C)
Tracking metadata reference owned by Metadata.
A Use represents the edge between a Value definition and its users.