[llvm] [BOLT][DWARF][NFC] Refactor address writers (PR #98094)
Alexander Yermolovich via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 8 17:40:22 PDT 2024
================
@@ -408,14 +430,16 @@ class DebugAddrWriter {
}
BinaryContext *BC;
- /// Maps DWOID to AddressForDWOCU.
- std::unordered_map<uint64_t, AddressForDWOCU> AddressMaps;
+ /// Address for the DWO CU associated with the address writer.
+ AddressForDWOCU Map;
+ uint8_t AddressByteSize;
+ std::optional<uint64_t> AddrOffsetSectionBase;
/// Mutex used for parallel processing of debug info.
std::mutex WriterMutex;
std::unique_ptr<AddressSectionBuffer> Buffer;
std::unique_ptr<raw_svector_ostream> AddressStream;
/// Used to track sections that were not modified so that they can be re-used.
- DenseMap<uint64_t, uint64_t> UnmodifiedAddressOffsets;
+ static DenseMap<uint64_t, uint64_t> UnmodifiedAddressOffsets;
----------------
ayermolo wrote:
For now it's fine, but for multi threaded step you will need to think of locks since this is shared between instances.
https://github.com/llvm/llvm-project/pull/98094
More information about the llvm-commits
mailing list