[llvm] [LiveDebugVariables] Fix a DBG_VALUE reordering issue (PR #111124)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 4 03:11:24 PDT 2024


https://github.com/jmorse commented:

This looks good with a question inline and nit, thanks for finding!

Technically this patch can have some quadratic behaviour, because if there are multiple DBG_VALUEs being inserted in the same place, we'll repeatedly skip over the ones we've already inserted. See the large comment above this hunk: I believe Facebook/Meta hit some serious compile-times because of that and installed a cache of insertion points at the start of blocks. I don't believe DBG_VALUEs cluster inside basic blocks to the same extent that they do at the start of blocks so this patch is /probably/ fine -- if you can see an obvious way to avoid skipping over previously-inserted DBG_VALUEs then that'd be great, but I don't think it should block the patch.

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


More information about the llvm-commits mailing list