[PATCH] D19512: [LoopVectorize] Don't consider conditional-load dereferenceability when vectorization is forced

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 17:18:11 PDT 2016


anemet added a comment.

In http://reviews.llvm.org/D19512#411520, @hfinkel wrote:

> Actually, checking:
>
>   Hints->getForce() == LoopVectorizeHints::FK_Enabled
>   
>
> will catch both vectorize(assume_safety) and vectorize(enable). I'd need to also check:


I was about point this out and then ask you this :-) :

> 

> 

>   TheLoop->isAnnotatedParallel()

>    

> 

> to only get assume_safety. It occurs to me that I don't entirely like this setup: The parallel loop annotation is documented to refer to loop dependencies, not if-conversion safety. While I don't think users will be bothered by this (or see it), do you think that taking llvm.mem.parallel_loop_access to imply if-conversion safety is okay, or do we need to enhance it to differentiate between these concepts (loop-carried dependencies vs. if-conversion safety)? I don't have a use case for differentiating them. Opinions?


Looks like we only use llvm.mem.parallel_loop_access to convey assume_safety so I guess we can just extend it to imply if-convertable loads as well, no?


http://reviews.llvm.org/D19512





More information about the llvm-commits mailing list