[PATCH] D64095: SVFS implementation according to RFC: Interface user provided vector functions with the vectorizer.

Sumedh Arani via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 13:20:15 PDT 2019


aranisumedh marked 23 inline comments as done.
aranisumedh added inline comments.


================
Comment at: llvm/include/llvm/Analysis/SearchVectorFunctionSystem.h:91
+  LOOKUP_PARAMETER(LinearUValPos);
+  LOOKUP_PARAMETER(Uniform);
+
----------------
jdoerfert wrote:
> Why not `LOOKUP_PARAMETER(Vector)`?
> 
> I don't think you want `;` at the end.
> 
> Cleanup:
> `#undef LOOKUP_PARAMETER`
Vector is a generic case and not just restricted to OMP. Hence, for the macro to work, there is a prefix OMP_  attached to the rest of the scenarios and not Vector.


================
Comment at: llvm/include/llvm/Analysis/SearchVectorFunctionSystem.h:121
+struct SVFS {
+  Module *M;
+
----------------
jdoerfert wrote:
> I found a single use of this exposed member and that use can be replaced by something like:
> `Call->getModule()`
> If there is no reason to have this member, get rid of it and all the `init` stuff.
I did make this change but however, as I'm building the CallInst programmatically in the test case, this leads to a segmentation fault. 

However, in the patch that is to follow(hooking to the loopVectorizer), Call->getModule() works perfectly. 

Do you have any suggestions as so as to get the getVectorizedFunction test working as specified in SearchVectorFunctionTest.cpp

Also, do I use AssertionSuccess() and AssertionFailure() for testing bad inputs?


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

https://reviews.llvm.org/D64095





More information about the llvm-commits mailing list