[llvm] [llvm-debuginfo-analyzer] Remove `LVScope::Children` container (PR #144750)

Carlos Alberto Enciso via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 19 04:09:17 PDT 2025


CarlosAlbertoEnciso wrote:

> This PR should yield further memory footprint improvements after #144399 is merged.
> 
> As suggested in #69160, removing `LVScope::Children`. Note, however, that children iteration order is now _(1)_ Types, _(2)_ Symbols, and finally _(3)_ Scopes. This may be (or not) considered important - I think it's not. ` llvm-debuginfo-analyzer` tests should be fixed though due to iteration order and `CHECK-NEXT:` FileCheck directives used in those tests.

>From https://github.com/llvm/llvm-project/issues/69160#issuecomment-2987673689

The idea behind the `Children` container is to generate a logical view where its logical elements order is very close to their programming elements from the input file. That is the default printing mode.
By using the chaining iterator, we hope to have a considerable memory reduction, which is very important.
May be we can use the `LVObject::ID` to recreate the original printing order via the `LVSortFunction llvm::logicalview::getSortFunction()`.

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


More information about the llvm-commits mailing list