14 #ifndef LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H 15 #define LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H 24 class SymbolStringPtr;
42 using RefCountType = std::atomic<size_t>;
45 mutable std::mutex PoolMutex;
104 return LHS.S == RHS.S;
108 return !(LHS == RHS);
112 return LHS.S < RHS.S;
118 assert(Pool.empty() &&
"Dangling references at pool destruction time");
123 std::lock_guard<std::mutex>
Lock(PoolMutex);
126 std::tie(I, Added) = Pool.try_emplace(S, 0);
131 std::lock_guard<std::mutex>
Lock(PoolMutex);
132 for (
auto I = Pool.begin(),
E = Pool.end();
I !=
E;) {
134 if (Tmp->second == 0)
140 std::lock_guard<std::mutex>
Lock(PoolMutex);
147 #endif // LLVM_EXECUTIONENGINE_ORC_SYMBOLSTRINGPOOL_H void clearDeadEntries()
Remove from the pool any entries that are no longer referenced.
Compute iterated dominance frontiers using a linear time algorithm.
String pool for symbol names used by the JIT.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
const ValueTy & getValue() const
bool operator!=(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS)
~SymbolStringPool()
Destroy a SymbolStringPool.
bool operator==(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS)
Pointer to a pooled string representing a symbol name.
SymbolStringPtr intern(StringRef S)
Create a symbol string pointer from the given string.
static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")
SymbolStringPtr(SymbolStringPtr &&Other)
friend class SymbolStringPtr
SymbolStringPtr & operator=(SymbolStringPtr &&Other)
StringRef operator*() const
void swap(llvm::BitVector &LHS, llvm::BitVector &RHS)
Implement std::swap in terms of BitVector swap.
SymbolStringPtr & operator=(const SymbolStringPtr &Other)
bool operator<(const SymbolStringPtr &LHS, const SymbolStringPtr &RHS)
SymbolStringPtr(const SymbolStringPtr &Other)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
bool empty() const
Returns true if the pool is empty.
StringRef - Represent a constant reference to a string, i.e.