[llvm] Fix mechanism propagating mangled names for TLI function mappings (PR #66656)

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 18 09:15:28 PDT 2023


================
@@ -23,860 +23,860 @@
 #define MASKED true
 
 #if !(defined(TLI_DEFINE_VECFUNC))
-#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF) {SCAL, VEC, VF, NOMASK},
+#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF, MANGLN) {SCAL, VEC, VF, NOMASK, MANGLN},
 #endif
 
 #if defined(TLI_DEFINE_ACCELERATE_VECFUNCS)
 // Accelerate framework's Vector Functions
 
 // Floating-Point Arithmetic and Auxiliary Functions
-TLI_DEFINE_VECFUNC("ceilf", "vceilf", FIXED(4))
-TLI_DEFINE_VECFUNC("fabsf", "vfabsf", FIXED(4))
-TLI_DEFINE_VECFUNC("llvm.fabs.f32", "vfabsf", FIXED(4))
-TLI_DEFINE_VECFUNC("floorf", "vfloorf", FIXED(4))
-TLI_DEFINE_VECFUNC("sqrtf", "vsqrtf", FIXED(4))
-TLI_DEFINE_VECFUNC("llvm.sqrt.f32", "vsqrtf", FIXED(4))
+TLI_DEFINE_VECFUNC("ceilf", "vceilf", FIXED(4), "_ZGV_LLVM_N4v_ceilf(vceilf)")
----------------
paulwalker-arm wrote:

MANGLN shouldn't need to be a full `vector-function-abi-variant` string because that string has a specific use and is built up based on the fields within this table.  We should try to keep things minimal and that means certainly dropping the `(vector-name)` part of the string.

I cannot quite decide whether the scalar name is useful to include or not but that likely comes down to the interface used to extract the data.  You're current returning the mangling and the vector name so that's likely where the need comes from.   However if you instead have queries that return a reference to the whole record then you might be able to restrict the new field to just mangling prefix because the scalar name will be accessible.

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


More information about the llvm-commits mailing list