[llvm-branch-commits] [llvm] [SPIRV][Debug Info] Fix debug info placement logic for DebugFunctionDefinition (PR #183121)
Juan Manuel Martinez CaamaƱo via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Feb 25 08:56:12 PST 2026
================
@@ -657,13 +657,20 @@ void SPIRVModuleAnalysis::processOtherInstrs(const Module &M) {
NonSemantic_Shader_DebugInfo_100) {
MachineOperand Ins = MI.getOperand(3);
namespace NS = SPIRV::NonSemanticExtInst;
- static constexpr int64_t GlobalNonSemanticDITy[] = {
- NS::DebugSource, NS::DebugCompilationUnit, NS::DebugInfoNone,
- NS::DebugTypeBasic, NS::DebugTypePointer};
- bool IsGlobalDI = false;
- for (unsigned Idx = 0; Idx < std::size(GlobalNonSemanticDITy); ++Idx)
- IsGlobalDI |= Ins.getImm() == GlobalNonSemanticDITy[Idx];
- if (IsGlobalDI)
+ // Debug info extension instructions other than DebugScope,
----------------
jmmartinez wrote:
I guess this restriction is explicit in the SPIRV standard. Can we put a reference to it (section number and title) ?
https://github.com/llvm/llvm-project/pull/183121
More information about the llvm-branch-commits
mailing list