[PATCH] D45552: [NFC][LV][LoopUtil] Move LoopVectorizationLegality to Analysis tree

Hideki Saito via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 28 18:25:10 PDT 2018


hsaito added a comment.

In https://reviews.llvm.org/D45552#1082047, @dcaballe wrote:

> Thanks, Hideki. LGTM!
>
> The only remaining question that I would have is if it would be better to keep LoopVectorizationLegality.h as a private header (i.e., in /lib/Transforms/Vectorize/) instead of as a public header (i.e., in /include/llvm/Transforms/Vectorize/) since currently `LoopVectorizationLegality` is not needed outside of LV. I think that public headers have some negative impact in the compile time of LLVM so we may want to avoid them when they are not strictly necessary.
>  However, I leave it up to you. I think this is more like a philosophical question so I would be OK with the current approach.
>
> Please, wait a few days before committing it to see if there are more comments.
>
> Thanks!
>  Diego.


A public header has zero impact in compile time for the files that are not including it, for obvious reasons. I really would like other optimizers start thinking about whether vectorization is even possible or not and act accordingly ---- and for that I'd want to lower the bar for people wanting to do it. Moving the code from one place to another has a psychological barrier for many people. Remember, originally, I wanted to move this to Analysis, to make it easy to create an Analysis pass out of it if somebody wants that.


https://reviews.llvm.org/D45552





More information about the llvm-commits mailing list