Skip to content

Preserve inline source scopes in line-table debug info - #1582

Draft
tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-inline-lineinfo
Draft

tpn wants to merge 1 commit into
NVIDIA:mainfrom
tpn:codex/coop-interop-inline-lineinfo

Conversation

@tpn

@tpn tpn commented Oct 21, 2026 •

Copy link
Copy Markdown

Line-table builds currently lose inline call chains because the MIR importer retains source scopes only for full debug info. Keep those scopes whenever line tables are enabled, so the existing exporter can emit inline attribution. Off mode and variable-debug gates keep their behavior.

This is a standalone change on current main: one production-line change and its importer/lowering regression, with no collective-checker or storage-planner prerequisite.

Validation: the regression fails with the old gate and passes with the fix; all 1,180 importer tests, strict importer Clippy and formatting pass. The 26 existing exporter debug tests also pass. An unchanged native example shows restored LLVM inline chains and surviving nested CUBIN attribution; baseline and candidate both pass its 12-value GPU check.

The example's final SASS differs (184 → 200 instruction slots), with 19 registers and no stack/local storage in both builds. Some helper locations disappear during optimization. This does not establish performance equivalence or debugger stepping. All 55 published-head CI checks pass.

@copy-pr-bot

copy-pr-bot Bot commented Oct 21, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@nihalpasham nihalpasham added cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book codegen Device code-generation pipeline (Rust MIR to IR to PTX) llvm-export Textual LLVM/NVVM IR exporter (llvm-export crate) debug info Debug information in generated PTX/IR (line/source maps) bug Something isn't working Depends Blocked on another PR/issue or an upstream dependency labels Oct 21, 2026
Retain the source-scope map when line tables are enabled so native
debug metadata includes inline call chains without variable debug info.

Signed-off-by: Trent Nelson <[email protected]>
@tpn
tpn force-pushed the codex/coop-interop-inline-lineinfo branch from ffa3f2e to ac90d9e Compare October 22, 2026 04:39
@copy-pr-bot

copy-pr-bot Bot commented Oct 22, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working codegen Device code-generation pipeline (Rust MIR to IR to PTX) cuda-oxide SIMT programming model: rustc backend, cargo oxide, cuda-device, cuda-host, book debug info Debug information in generated PTX/IR (line/source maps) Depends Blocked on another PR/issue or an upstream dependency llvm-export Textual LLVM/NVVM IR exporter (llvm-export crate)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants