[llvm] [DWARFLinkerParallel] Add support for -odr mode. (PR #68721)

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 16 08:04:14 PDT 2023


dwblaikie wrote:

DWARFLinker would still need to be deterministic, even on old/bad/different input - though maybe Apple & other folks would be open to it having an error on "bad" input rather than having to figure out a way to have a deterministic successful output.

That said - I'm always here for a conversation about type consistency in DWARF... so let's take a look:

`DominatorTreeBase<llvm::BasicBlock, false>` example - `Insert` is a `static constexpr SomeEnum` member with an in-class initializer.
Hmm, that might be tricky to do - because technically this isn't a definition (there may be no storage behind it) so I'm not sure we could move the const value out into a separate definition DIE. I guess a definition DIE without a DW_AT_location would be the nearest DWARF-ish way to express it. We /might/ be able to always instantiate the definition value, so put it on the declaration in all cases, but would need some language expertise to check if that's do-able.

`SmallVectorImpl<llvm::Instruction *>` example - I'm not sure why we'd sometimes put the parameter name in and sometimes not. That seems unlikely to be intentional/particularly deeply thought out, but of uncertain difficulty to fix.


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


More information about the llvm-commits mailing list