[llvm] [RemoveDIs] Read/write DbgRecords directly from/to bitcode (PR #83251)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 4 10:10:27 PST 2024


https://github.com/jmorse commented:

I've done some review of the structure and implementation here -- higher level thoughts such as "should we be using this number-space" and so forth are beyond me.

IMO: this patch should be landed in a default-off state for the write-out-removedis-bitcode flag, with the test tweaked to enable it on the command line. You can then turn the whole thing on-by-default in a follow up patch. The benefit of doing this is that it's very clear to downstream projects (which could even include us) how to turn it off if there's some difficulty in their own code. Given the bug reports we've had, a couple of projects are working through issues with the rest of RemoveDIs, and making it easy to turn off will have helped them.

The space savings here are great -- the metadata reference sizes in the abbrev seem small though, is metadata packed in around each function? (I'd always imagined it was one massive block with an average node-count of several thousands).

The test coverage seems good. I don't know what else we'd do to test, as examining the exact record layout seems like overkill.

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


More information about the llvm-commits mailing list