[llvm] [mlir] [DebugInfo] Add symbolic branches to DIExpression (PR #210850)

Eric Christopher via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 21 12:51:03 PDT 2026


echristo wrote:

> I too would like to see the rationale / use-case for this -- a new form of optimisation (or opportunity for one) that can only be recovered with conditional branching perhaps?
> 

GPU debugging, and Tile DSLs in particular, are coming up with more and more complicated expressions and so we're needing to use more of the dwarf standard - heck, these are from dwarf2. :) I also have a procedures (dwarf3) patch and a change for calls in expressions coming (in order to call those procedures) and newer extensions (e.g. dwarf6) are going to be used in order to describe what's going on. There's a little bit of chicken and egg here with producer(s)/consumers so starting here seemed like a good place so that we had something for folks to target as well as emission to work from.

> As it stands, `DIExpression`s have to be decompiled by various parts of LLVM to edit them, and taking this direction is only going to make that process more complicated. If we're going to support these opcodes we should probably have a plan for making the whole situation managable (although that might be a lot of future work).

Agreed. I tried to keep the changes fairly minimal here so that the support existed, but didn't require a lot of changes to expression rewriters, etc. About the only other patch split I could come up with was boilerplate and emission, but the emission seemed to be straightforward enough with some small initial limitations in use.

Thoughts? and thanks. I'll add you to the review, I'd meant to do it before :)


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


More information about the llvm-commits mailing list