9#ifndef LLVM_DWARFLINKER_PARALLEL_TYPEPOOL_H
10#define LLVM_DWARFLINKER_PARALLEL_TYPEPOOL_H
59 std::atomic<DIE *>
Die = {
nullptr};
110 llvm::parallel::PerThreadBumpPtrAllocator,
138 if (Entry->getValue().compare_exchange_strong(
DIE, NewDIE)) {
139 ParentEntry->
getValue().load()->Children.add(Entry);
148 std::function<void(
TypeEntry * Entry)> SortChildrenRec =
151 Entry->getValue().load()->Children.forEach(SortChildrenRec);
162 return Allocator.getThreadLocalAllocator();
168 return LHS->getKey() <
RHS->getKey();
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
This file defines the StringMap class.
This file defines the BumpPtrAllocator interface.
ConcurrentHashTableByPtr(llvm::parallel::PerThreadBumpPtrAllocator &Allocator, uint64_t EstimatedSize=100000, size_t ThreadsNum=parallel::strategy.compute_thread_count(), size_t InitialNumberOfBuckets=128)
A structured debug information entry.
const ValueTy & getValue() const
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
static StringMapEntry * create(StringRef key, AllocatorTy &allocator, InitTy &&...initVals)
StringRef - Represent a constant reference to a string, i.e.
This class is a simple list of T structures.
Stores all information related to a compile unit, be it in its original instance of the object file o...
Keeps cloned data for the type DIE.
ArrayList< TypeEntry *, 5 > Children
Children for current type.
DIE & getFinalDie() const
Returns copy of type DIE which should be emitted into resulting file.
TypeEntryBody(TypeEntryBody &&RHS)=delete
bool hasOnlyDeclaration() const
Returns true if type die entry has only declaration die.
TypeEntryBody(const TypeEntryBody &RHS)=delete
TypeEntryBody(llvm::parallel::PerThreadBumpPtrAllocator &Allocator)
TypeEntryBody & operator=(const TypeEntryBody &RHS)=delete
std::atomic< bool > ParentIsDeclaration
std::atomic< DIE * > DeclarationDie
std::atomic< DIE * > Die
TypeEntryBody keeps partially cloned DIEs corresponding to this type.
static TypeEntryBody * create(llvm::parallel::PerThreadBumpPtrAllocator &Allocator)
Creates type DIE for the specified name.
TypeEntryBody & operator=(const TypeEntryBody &&RHS)=delete
static bool isEqual(const StringRef &LHS, const StringRef &RHS)
static TypeEntry * create(const StringRef &Key, llvm::parallel::PerThreadBumpPtrAllocator &Allocator)
static uint64_t getHashValue(const StringRef &Key)
static StringRef getKey(const TypeEntry &KeyData)
TypePool keeps type descriptors which contain partially cloned DIE correspinding to each type.
BumpPtrAllocator & getThreadLocalAllocator()
Return thread local allocator used by pool.
TypeEntryBody * getOrCreateTypeEntryBody(TypeEntry *Entry, TypeEntry *ParentEntry)
Create or return existing type entry body for the specified Entry.
TypeEntry * insert(StringRef Name)
TypeEntry * getRoot() const
Return root for all type entries.
std::function< bool(const TypeEntry *LHS, const TypeEntry *RHS)> TypesComparator
void sortTypes()
Sort children for each kept type entry.
StringMapEntry< std::atomic< TypeEntryBody * > > TypeEntry
PerThreadAllocator< BumpPtrAllocator > PerThreadBumpPtrAllocator
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI uint64_t xxh3_64bits(ArrayRef< uint8_t > data)
BumpPtrAllocatorImpl BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
LLVM_ATTRIBUTE_VISIBILITY_DEFAULT AnalysisKey InnerAnalysisManagerProxy< AnalysisManagerT, IRUnitT, ExtraArgTs... >::Key