[Mlir-commits] [mlir] [mlir][SPIRV] Support Alignment and FuncParamAttr on parameters (PR #231069)
Igor Wodiany
llvmlistbot at llvm.org
Tue Oct 20 02:32:41 PDT 2026
IgWod wrote:
Something doesn't sit right with me here but I may be missing something. Does this patch work around function parameters only supporting one decoration by adding a special handling for `Alignment` and `FuncParamAttr`? I'm not sure that's a right approach. Instead we should think how to rework the code to handle arbitrary number of decorations without creating special cases. This creates a bit weird situation where we have two different ways to represent decorations:
```mlir
spirv.alignment = 16 : i32,
spirv.decoration = #spirv.decoration<Restrict>,
spirv.func_param_attr = [#spirv.function_parameter_attribute<ByVal>,
#spirv.function_parameter_attribute<NoAlias>,
#spirv.function_parameter_attribute<NoCapture>,
#spirv.function_parameter_attribute<NoWrite>]
```
Why is alignment a stand-alone construct but Restrict goes via generic decoration? It feels like a hack not a solution.
https://github.com/llvm/llvm-project/pull/231069
More information about the Mlir-commits
mailing list