[llvm] Make DWARFUnitVector threadsafe. (PR #71487)

Greg Clayton via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 7 14:24:41 PST 2023


clayborg wrote:

> Would be interesting to figure out what that history is. On bolt side it will simplify some things. Also that vector ends up being populated one at a time if whatever tool uses DWARFContext invokes getNonSkeltonUnitDIE through parseDWO-->getDWOCompileUnitForHash.

It seems clear someone added the ability to get a single .dwo file using a `DWARFUnitIndex::Entry` in the following API:
```
DWARFCompileUnit *DWARFContext::getDWOCompileUnitForHash(uint64_t Hash);
```
But this ruiined the ability to actually use the DWOUnits for anytthing else. So I would prefer something that works correctly for all clients over a patch got some performance at the expense of the API working correctly.

https://github.com/llvm/llvm-project/pull/71487


More information about the llvm-commits mailing list