9#ifndef LLVM_DWARFLINKER_PARALLEL_DWARFLINKERTYPEUNIT_H
10#define LLVM_DWARFLINKER_PARALLEL_DWARFLINKERTYPEUNIT_H
18namespace dwarf_linker {
61 if (&
Info.TypeEntryBodyPtr->getFinalDie() !=
Info.OutDIE)
64 Info.OutOffset =
Info.OutDIE->getOffset();
71 std::unique_lock<std::mutex> LockGuard(DebugStringIndexMapMutex);
77 AcceleratorRecords.add(
Info);
88 void prepareDataForTreeCreation();
94 std::pair<dwarf::Form, uint8_t> getScalarFormForValue(
uint64_t Value)
const;
98 struct CmpStringEntryRef {
100 return LHS->first() <
RHS->first();
103 struct CmpDirIDStringEntryRef {
104 bool operator()(
const std::pair<StringEntry *, uint64_t> &
LHS,
105 const std::pair<StringEntry *, uint64_t> &
RHS)
const {
106 return LHS.second <
RHS.second ||
107 (!(
RHS.second <
LHS.second) &&
108 LHS.first->first() <
RHS.first->first());
116 DWARFDebugLine::LineTable LineTable;
119 using DirectoriesMapTy = std::map<StringEntry *, size_t, CmpStringEntryRef>;
120 using FilenamesMapTy = std::map<std::pair<StringEntry *, uint64_t>, size_t,
121 CmpDirIDStringEntryRef>;
123 DirectoriesMapTy DirectoriesMap;
124 FilenamesMapTy FileNamesMap;
130 ArrayList<TypeUnitAccelInfo> AcceleratorRecords;
133 std::mutex DebugStringIndexMapMutex;
Analysis containing CSE Info
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Allocate memory in an ever growing pool, as if by bump-pointer.
A structured debug information entry.
Lightweight error class with error context and mandatory checking.
StringMapEntry - This is used to represent one value that is inserted into a StringMap.
Triple - Helper class for working with autoconf configuration names.
LLVM Value Representation.
Base class for all Dwarf units(Compile unit/Type table unit).
IndexedValuesMap< const StringEntry * > DebugStringIndexMap
Maps a string into the index inside .debug_str_offsets section.
This class keeps data and services common for the whole linking process.
LinkingGlobalData & GlobalData
dwarf::FormParams Format
Format for sections.
Keeps cloned data for the type DIE.
TypePool keeps type descriptors which contain partially cloned DIE correspinding to each type.
Type Unit is used to represent an artificial compilation unit which keeps all type information.
void saveAcceleratorInfo(const TypeUnitAccelInfo &Info)
Adds Info to the unit's accelerator records.
TypePool & getTypePool()
Returns global type pool.
Error finishCloningAndEmit(const Triple &TargetTriple)
Emits resulting dwarf based on information from DIE tree.
uint64_t getDebugStrIndex(const StringEntry *String) override
Returns index for the specified String inside .debug_str_offsets.
void createDIETree(BumpPtrAllocator &Allocator)
Generates DIE tree based on information from TypesMap.
void forEachAcceleratorRecord(function_ref< void(AccelInfo &)> Handler) override
Enumerates all accelerator records and call Handler for each.
An efficient, type-erasing, non-owning reference to a callable.
constexpr char Language[]
Key for Kernel::Metadata::mLanguage.
This is an optimization pass for GlobalISel generic memory operations.
This structure keeps fields which would be used for creating accelerator table.
TypeUnitAccelInfo extends AccelInfo structure with type specific fileds.
DIE * OutDIE
Pointer to the output DIE which owns this accelerator record.
TypeEntryBody * TypeEntryBodyPtr
Pointer to the type entry body.