[llvm] [SPIRV] Add support for pointers to functions with aggregate args/returns as global variables / constant initialisers (PR #169595)
Juan Manuel Martinez CaamaƱo via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 27 04:25:27 PST 2025
================
@@ -469,6 +472,23 @@ bool SPIRVPrepareFunctions::substituteIntrinsicCalls(Function *F) {
return Changed;
}
+static void
+addFunctionTypeMutation(NamedMDNode *NMD,
+ SmallVector<std::pair<int, Type *>> ChangedTys,
+ StringRef Name) {
+
+ LLVMContext &Ctx = NMD->getParent()->getContext();
+ Type *I32Ty = IntegerType::getInt32Ty(Ctx);
+
+ SmallVector<Metadata *> MDArgs;
+ MDArgs.push_back(MDString::get(Ctx, Name));
----------------
jmmartinez wrote:
Just an idea: Could we use `ValueAsMetadata` in here instead of the name?
https://github.com/llvm/llvm-project/pull/169595
More information about the llvm-commits
mailing list