[llvm-branch-commits] [llvm] [WIP][SPIRV][Debug Info] Add support for emitting DebugFunction debug info instructions (PR #183122)
Manuel Carrasco via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Mar 6 06:46:07 PST 2026
================
@@ -0,0 +1,40 @@
+; RUN: llc --verify-machineinstrs --spv-emit-nonsemantic-debug-info --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc --verify-machineinstrs --spv-emit-nonsemantic-debug-info --spirv-ext=+SPV_KHR_non_semantic_info -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}
----------------
mgcarrasco wrote:
> Should we check vulkan too?
Thanks for the feedback!
The pass is applied under the following conditions (existing code in main):
```
void SPIRVPassConfig::addPreEmitPass() {
if (SPVEnableNonSemanticDI ||
getSPIRVTargetMachine().getTargetTriple().getVendor() == Triple::AMD) {
addPass(createSPIRVEmitNonSemanticDIPass(&getTM<SPIRVTargetMachine>()));
}
}
```
The tests includes `--spv-emit-nonsemantic-debug-info` so it is independent of the triple (e.g., vulkan). That is why there is no specific test for it.
https://github.com/llvm/llvm-project/pull/183122
More information about the llvm-branch-commits
mailing list