jankratochvil added a comment.

In D74637#1878655 <https://reviews.llvm.org/D74637#1878655>, @labath wrote:

> In fact, this field used to hold a DIERef until I changed that in D63322 
> <https://reviews.llvm.org/D63322>.


I did not expect that. OK, this D74637 <https://reviews.llvm.org/D74637> + my 
D74690 <https://reviews.llvm.org/D74690> try to just revert D63322 
<https://reviews.llvm.org/D63322>.

> I did it because it was
>  b) more memory-efficient.

Why? Both `DIERef` and `user_id_t` sizeof is 8.

> Maybe you could give a rough outline of where are you going with this.

I am trying to reduce `user_id_t` usage as much as possible.  And then to add 
MainCU to `user_id_t` (but no longer to `DIERef`). As construction of 
`user_id_t` with MainCU needs additional information no longer contained in 
`DIERef` it will need some additional parameter in the caller chain like I did 
in D73206 <https://reviews.llvm.org/D73206>. As the new parameter is used only 
for DWZ its addition is not much popular so it should be limited to as few 
cases as possible.

> For example, how will the user_id_t decoding process look like in the end?

In my dwz branch <https://github.com/jankratochvil/llvm-project/tree/dwz> the 
MainCU encoding is now combined for both `DIERef` and `user_id_t` but the plan 
is to encode it only into `user_id_t`. It still fits into 64-bits reusing the 
DWO field (which is never used together with DWZ). Current implementation:

- `DIERef`->`user_id_t` 
<https://github.com/jankratochvil/llvm-project/blob/fa83503513696b53c9cc2d20964ee27c375c2ef7/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L1226>
- `user_id_`->`DecodedUID` 
<https://github.com/jankratochvil/llvm-project/blob/fa83503513696b53c9cc2d20964ee27c375c2ef7/lldb/source/Plugins/SymbolFile/DWARF/SymbolFileDWARF.cpp#L1262>
- `DWARFDIE`->`DIERef` 
<https://github.com/jankratochvil/llvm-project/blob/fa83503513696b53c9cc2d20964ee27c375c2ef7/lldb/source/Plugins/SymbolFile/DWARF/DWARFBaseDIE.cpp#L26>
- `DIERef`->`DWARFUnit *` 
<https://github.com/jankratochvil/llvm-project/blob/fa83503513696b53c9cc2d20964ee27c375c2ef7/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp#L157>
 wrt DWZ common file
- `DIERef`->`DWARFUnit *` 
<https://github.com/jankratochvil/llvm-project/blob/fa83503513696b53c9cc2d20964ee27c375c2ef7/lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfo.cpp#L168>
 for MainCU


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74637/new/

https://reviews.llvm.org/D74637



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to