[llvm] [DebugInfo][RemoveDIs] Don't allocate one DPMarker per instruction (PR #79345)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 26 05:44:50 PST 2024


jmorse wrote:

On the simplification front, perhaps things could be refactored into some ideas of swapping-collections between locations (like the towers of Hanoi...), the difficulty then is that we concatenate collections of DPValues together at some points, and not at others, and not always in the same order. I don't think there's a really simple way of representing this: we've effectively pushed the numerous ways you can splice instruction ranges containing dbg.values into some state (the iterator bits), and this function then has to account for the different combinations of inputs.

To be clear, I don't like nastily complicated functions, but we've centralised the nastiness of debug intrinsic maintenence down into this one function, so it's not too much of a surprise that it's unpleasent.

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


More information about the llvm-commits mailing list