Open bogner opened 1 year ago
@llvm/issue-subscribers-debuginfo
On further reflection I suspect a lot of this will just kind of work out. A lot of the constructs we struggle with are things that we aren't lowering to the DXIL representations yet (like globals associated with buffers), so once all of that's in place it's likely that we just won't have that many things to deal with here.
As evidenced by #85884 we will need to do something about debug intrinsics, which are being eliminated:
Presumably we'll need to reintroduce these when emitting DXIL
Hola -- this is a fly-by comment, but we've designed the DPValue / DbgRecord / whatever-it-is-now information to have a one-to-one correspondence with debug intrinsics, so converting things back to intrinsic form should be straight forwards (there's a createDebugIntrinsic
method that does most of it). Perhaps things will change more in the future, but for now it's pretty trivial, there's a convertFromNewDbgValues method hanging around on Module / Function / BasicBlock that does it for you.
We currently fall apart in DXILBitcodeWriter when trying to emit DXIL with DebugInfo. Some of this is relatively easy to deal with, but a lot of problems stem from the fact that the DI representation in metadata has changed a lot since DXIL was codified, and the naive "downgrade" approach kind of falls apart. We need to decide how we're going to handle this.
Presumably, the way forward is based on one of the following approaches:
AC: