[PATCH] D59881: Initial support for vectorization using MASSV (IBM MASS vector library)

Jeeva P. via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 29 06:32:17 PDT 2019


pjeeva01 added inline comments.


================
Comment at: llvm/lib/Analysis/TargetLibraryInfo.cpp:1467
     const VecDesc VecFuncs[] = {
-        // Floating-Point Arithmetic and Auxiliary Functions
-        {"ceilf", "vceilf", 4},
-        {"fabsf", "vfabsf", 4},
-        {"llvm.fabs.f32", "vfabsf", 4},
-        {"floorf", "vfloorf", 4},
-        {"sqrtf", "vsqrtf", 4},
-        {"llvm.sqrt.f32", "vsqrtf", 4},
-
-        // Exponential and Logarithmic Functions
-        {"expf", "vexpf", 4},
-        {"llvm.exp.f32", "vexpf", 4},
-        {"expm1f", "vexpm1f", 4},
-        {"logf", "vlogf", 4},
-        {"llvm.log.f32", "vlogf", 4},
-        {"log1pf", "vlog1pf", 4},
-        {"log10f", "vlog10f", 4},
-        {"llvm.log10.f32", "vlog10f", 4},
-        {"logbf", "vlogbf", 4},
-
-        // Trigonometric Functions
-        {"sinf", "vsinf", 4},
-        {"llvm.sin.f32", "vsinf", 4},
-        {"cosf", "vcosf", 4},
-        {"llvm.cos.f32", "vcosf", 4},
-        {"tanf", "vtanf", 4},
-        {"asinf", "vasinf", 4},
-        {"acosf", "vacosf", 4},
-        {"atanf", "vatanf", 4},
-
-        // Hyperbolic Functions
-        {"sinhf", "vsinhf", 4},
-        {"coshf", "vcoshf", 4},
-        {"tanhf", "vtanhf", 4},
-        {"asinhf", "vasinhf", 4},
-        {"acoshf", "vacoshf", 4},
-        {"atanhf", "vatanhf", 4},
+    #define TLI_DEFINE_VECDESCS
+    #define TLI_DEFINE_ACCELERATE_VECFUNCS
----------------
jsji wrote:
> Can we split the refactoring of these definitions into `llvm/Analysis/VecFuncs.def` into a NFC patch first? 
> And leave only the MASSV related change in this patch ?
@jsji Thank you for looking into this.

@mmasten @mzolotukhin If you agree with this refactoring suggestion, I will go ahead and create an NFC patch for the same.


Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59881/new/

https://reviews.llvm.org/D59881





More information about the llvm-commits mailing list