[llvm-branch-commits] [llvm] [SPIRV] Emit NonSemantic DebugDeclare, DebugExpression and DebugOperation (PR #222011)

Manuel Carrasco via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Fri Sep 11 04:04:54 PDT 2026


================
@@ -842,10 +846,82 @@ std::optional<MCRegister> SPIRVNonSemanticDebugHandler::mapDISignatureTypeToReg(
   return lookupOptReg(DebugScopeRegs, Ty);
 }
 
-// Unimplemented no-op; see emitDebugExpression declaration.
+// NonSemantic.Shader.DebugInfo.100 debug operation encodings
+// (section 4.5, "Debug Operations").
+namespace NonSemanticDebugOp {
+enum : uint32_t {
----------------
mgcarrasco wrote:

Thanks, which one were you suggesting?

```
enum NonSemanticDebugOp : uint32_t {
  Deref = 0,
  Plus = 1,
};
```

or 

```
enum class NonSemanticDebugOp : uint32_t {
  Deref = 0,
  Plus = 1,
};
```

The first allows plain `Deref` or `Plus` uses, the second one does not, if I got it right.

https://github.com/llvm/llvm-project/pull/222011


More information about the llvm-branch-commits mailing list