[llvm-branch-commits] [llvm] [SPIRV] Add support for NSDI DebugLocalVariable. (PR #221706)
via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Mon Sep 7 04:23:23 PDT 2026
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {clang-format}-->
:warning: C/C++ code formatter, clang-format found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
git-clang-format --diff origin/main HEAD --extensions h,cpp -- llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp b/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
index 42d40ef4f..6b10fe91b 100644
--- a/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
+++ b/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.cpp
@@ -947,7 +947,7 @@ std::optional<MCRegister> SPIRVNonSemanticDebugHandler::emitDebugLocalVariable(
MCRegister ColReg = emitOpConstantI32(0, I32TypeReg, MAI);
MCRegister FlagsReg = emitOpConstantI32(transDebugFlags(LV), I32TypeReg, MAI);
- SmallVector<MCRegister, 8> Ops = {NameReg, TyReg, SrcReg, LineReg,
+ SmallVector<MCRegister, 8> Ops = {NameReg, TyReg, SrcReg, LineReg,
ColReg, *ParentRegOpt, FlagsReg};
if (unsigned Arg = LV->getArg())
Ops.push_back(emitOpConstantI32(Arg, I32TypeReg, MAI));
diff --git a/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h b/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
index b709a37b4..e93fc713c 100644
--- a/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
+++ b/llvm/lib/Target/SPIRV/SPIRVNonSemanticDebugHandler.h
@@ -364,9 +364,10 @@ private:
/// emits nothing if \p LV's scope is not an emitted local scope,
/// if a non-null type was not emitted in \c DebugScopeRegs, or if
/// \c resolveScope returns no id for the Parent operand.
- std::optional<MCRegister> emitDebugLocalVariable(
- const DILocalVariable *LV, MCRegister VoidTypeReg, MCRegister I32TypeReg,
- MCRegister ExtInstSetReg, SPIRV::ModuleAnalysisInfo &MAI);
+ std::optional<MCRegister>
+ emitDebugLocalVariable(const DILocalVariable *LV, MCRegister VoidTypeReg,
+ MCRegister I32TypeReg, MCRegister ExtInstSetReg,
+ SPIRV::ModuleAnalysisInfo &MAI);
/// Emit \c DebugGlobalVariable for the source global variable \p GV.
///
``````````
</details>
https://github.com/llvm/llvm-project/pull/221706
More information about the llvm-branch-commits
mailing list