[llvm] [Bitcode] Add SkipDebugIntrinsicUpgrade hook to ParserCallbacks (PR #201456)

Jeremy Morse via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 5 04:10:28 PDT 2026


jmorse wrote:

Hmmm -- if I understand correctly, this is important for DXIL compatibility because there's extra metadata attached to the intrinsics (as shown in the patches tests), and throwing it away is a major problem. And thus you want to get at the intrinsics after loading but before anything else happens?

I'd like to live in a world that doesn't have debug intrinsics, including up to the point of deleting the `DbgInfoIntrinsic` class. There may be a happy path where this facility (not upgrading) is available, but with the caveat that as far as LLVM is concerned from that point on the intrinsics are opaque instructions/intrinsics that get no special treatment. That allows the intrinsics to escape the bitcode loader (and be handled/interpreted by DXIL), but also doesn't prevent LLVM from ripping out more of the historic intrinsic support, including eventually the `DbgInfoIntrinsic` class. I imagine this will slowly push more code into DXIL, but perhaps in such a way that minimises your downstream delta. Does this sound alright @hbystuff @nikic ?

For the avoidance of doubt, we definitely don't want to be in a position where (for example) debug records carry arbitrary extra metadata through the compiler -- a primary objective of the RemoveDIs project was avoiding that, so we can do things in the future like change the `#dbg_record` memory allocation strategy.

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


More information about the llvm-commits mailing list