[Mlir-commits] [mlir] [mlir][spirv] Add support for SPV_ARM_graph extension - part 3 (PR #156845)
Jakub Kuderski
llvmlistbot at llvm.org
Thu Sep 11 07:39:30 PDT 2025
================
@@ -85,10 +86,36 @@ createGlobalVarForEntryPointArgument(OpBuilder &builder, spirv::FuncOp funcOp,
abiInfo.getBinding());
}
+/// Creates a global variable for an argument or result based on the ABI info.
+static spirv::GlobalVariableOp
+createGlobalVarForGraphEntryPoint(OpBuilder &builder, spirv::GraphARMOp graphOp,
+ unsigned index, bool isArg,
+ spirv::InterfaceVarABIAttr abiInfo) {
+ auto spirvModule = graphOp->getParentOfType<spirv::ModuleOp>();
+ if (!spirvModule)
+ return nullptr;
+
+ OpBuilder::InsertionGuard moduleInsertionGuard(builder);
+ builder.setInsertionPoint(graphOp.getOperation());
+ std::string varName = llvm::formatv("{0}_{1}_{2}", graphOp.getName(),
----------------
kuhar wrote:
```suggestion
std::string varName = llvm::formatv("{}_{}_{}", graphOp.getName(),
```
https://github.com/llvm/llvm-project/pull/156845
More information about the Mlir-commits
mailing list