jmorse wrote: For SelectionDAG it's already had dbg.assign/"assignment-tracking" plumbed into it. However it looks like GlobalISel could do with this too -- I'll add that to this review. https://github.com/llvm/llvm-project/pull/80734