[llvm] [VFABI] Create FunctionType for vector functions (PR #75058)

Paschalis Mpeis via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 15 09:56:10 PST 2023


================
@@ -1477,6 +1480,32 @@ void VFABI::getVectorVariantNames(
   }
 }
 
+FunctionType *VFABI::createFunctionType(const VFInfo &Info,
+                                        const FunctionType *ScalarFTy) {
+  ElementCount VF = Info.Shape.VF;
+  // Create vector parameter types
+  SmallVector<Type *, 8> VecTypes;
+  for (auto [STy, VFParam] : zip(ScalarFTy->params(), Info.Shape.Parameters)) {
----------------
paschalis-mpeis wrote:

> This only works because we know any mask parameter will be last?

True, because specs guarantees that.
Thanks for the gist, looks better and it'll handle things nicely.

https://github.com/llvm/llvm-project/pull/75058


More information about the llvm-commits mailing list