[PATCH] D60211: NFC: Refactor library-specific mappings of scalar maths functions to their vector counterparts

Jeeva P. via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 3 12:38:43 PDT 2019


pjeeva01 marked 2 inline comments as done.
pjeeva01 added inline comments.


================
Comment at: llvm/include/llvm/Analysis/VecFuncs.def:13
+
+#if defined(TLI_DEFINE_VECDESCS)
+#define TLI_DEFINE_VECFUNC(SCAL, VEC, VF) {SCAL, VEC, VF},
----------------
jsji wrote:
> Why we want to check `TLI_DEFINE_VECDESCS` to define `TLI_DEFINE_VECFUNC`?
> Can't we just check `#ifndef TLI_DEFINE_VECFUNC` here?
The plan is to define TLI_DEFINE_VECFUNC in a different way when a different identifier (eg: TLI_DEFINE_ARR) is defined. 

https://reviews.llvm.org/D59881 shows the intention behind this structure. 

If you prefer for me to restructure this ifdef only to suit this patch, I will go ahead and change it.




================
Comment at: llvm/include/llvm/Analysis/VecFuncs.def:174
+#undef TLI_DEFINE_VECFUNC
+#undef TLI_DEFINE_ACCELERATE_VECFUNCS
+#undef TLI_DEFINE_SVML_VECFUNCS
----------------
jsji wrote:
> This is not always defined, should we call `#undef` when we are sure they are defined?
The #undef is ignored if the specified identifier is not currently defined as a macro name. So, it should be alright to leave the #undef as it is.



Repository:
  rL LLVM

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

https://reviews.llvm.org/D60211





More information about the llvm-commits mailing list