[llvm] [SPIR-V] Emit NoCapture function parameter decoration for captures(none) args (PR #223694)
Dmitry Sidorov via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 17 08:49:20 PDT 2026
================
@@ -309,6 +309,12 @@ bool SPIRVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
buildOpDecorate(VRegs[i][0], MIRBuilder,
SPIRV::Decoration::FuncParamAttr, {Attr});
}
+ if (Arg.hasNoCaptureAttr()) {
----------------
MrSidims wrote:
It should be restricted to kernel-only, see: https://registry.khronos.org/SPIR-V/specs/unified1/SPIRV.html#Function_Parameter_Attribute
https://github.com/llvm/llvm-project/pull/223694
More information about the llvm-commits
mailing list