[SPIRV] Emit DebugLexicalScope for forloop controls (#8514) - #8515
[SPIRV] Emit DebugLexicalScope for forloop controls (#8514)#8515Steve Urquhart (SteveUrquhart) wants to merge 2 commits into
Conversation
|
/azp run |
|
Azure Pipelines successfully started running 1 pipeline(s). |
There was a problem hiding this comment.
Pull request overview
This PR updates the SPIR-V emitter’s rich debug info generation to introduce an additional lexical scope for for loop controls (the for (<init>; <cond>; <inc>) region), addressing missing scope nesting reported in #8514 and updating FileCheck expectations accordingly.
Changes:
- Emit an extra
DebugLexicalBlockforforloop controls and push/pop it duringForStmtemission. - Update rich debug scope expectations so
%for_check,%for_continue, and%for_mergeuse the new controls lexical scope. - Refresh DebugLexicalBlock expectations in related SPIR-V debug-info tests (line/column and parent-scope relationships).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| tools/clang/test/CodeGenSPIRV/shader.debug.debuglexicalblock.hlsl | Updates NS100 debug lexical block expectations to include a separate for controls lexical scope. |
| tools/clang/test/CodeGenSPIRV/rich.debug.debugscope.hlsl | Updates rich debug scope expectations for for blocks/labels to reference the new controls scope. |
| tools/clang/test/CodeGenSPIRV/rich.debug.debuglexicalblock.hlsl | Updates rich debug lexical block expectations to include the new for controls lexical scope. |
| tools/clang/lib/SPIRV/SpirvEmitter.cpp | Adds push/pop of a new debug lexical scope around for loop emission when rich debug info is enabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
2d38cb6 to
ae0dab8
Compare
|
I addressed the points raised by CoPilot. |
ae0dab8 to
900d18d
Compare
|
✅ With the latest revision this PR passed the C/C++ code formatter. |
900d18d to
ce1b650
Compare
Co-authored-by: Chris B <beanz@abolishcrlf.org>
|
I accepted the nit, requiring reapproval. Sorry about the noise. |
|
Hi Chris B (@llvm-beanz), can we please merge this? |
|
/azp run |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
|
Adds missing DebugLexicalScope to for-loops, fixes #8514