[Mlir-commits] [mlir] [mlir][spirv] Support function argument decorations for ptr in the PhysicalStorageBuffer (PR #76353)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Dec 28 14:11:43 PST 2023
================
@@ -177,6 +177,35 @@ LogicalResult Serializer::processUndefOp(spirv::UndefOp op) {
return success();
}
+LogicalResult Serializer::processFuncParameter(spirv::FuncOp op) {
+ unsigned numArgs = op.getNumArguments();
+ if (numArgs != 0) {
+ for (unsigned i = 0; i < numArgs; ++i) {
+ auto arg = op.getArgument(i);
----------------
kuhar wrote:
We don't need a special case for no arguments -- the for loop won't be entered anyway.
```suggestion
for (auto [idx, arg] : llvm::enumerate(op.getArguments())) {
```
https://github.com/llvm/llvm-project/pull/76353
More information about the Mlir-commits
mailing list