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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 26 09:37:53 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:

I think perhaps you've misunderstood the intent of this work and thus my request.  I'm not expecting there to be any changes to the value of the `vector-function-abi-variant` attribute.  I'm only expecting the way the text is generated to be changed so that for follow on patches we can stop `tryDemangleForVFABI` from incorrectly looking through the module in order to figure out the element count for scalable vector functions.

If you look at how `mangleTLIVectorName` is used you'll see that it's given data that has been extracted from TargetLibraryInfo (via its database of VecDesc objects).  The only missing piece of information is the Vector ABI mangling prefix that it instead computes.  The request is for this prefix to be store within TargetLibraryInfo as well.

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


More information about the llvm-commits mailing list