[PATCH] D59832: [LoopRotation] Allow loop header duplication if vectorization is forced
Adam Nemet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 27 10:07:06 PDT 2019
anemet marked an inline comment as done.
anemet added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopRotation.cpp:60
+static bool isForcedVectorize(Loop *L) {
+ Optional<const MDOperand *> Value =
----------------
Meinersbur wrote:
> anemet wrote:
> > Meinersbur wrote:
> > > Consider using `hasVectorizeTransformation` in LoopUtils.h. I added it to make determining whether a pragma is added consistent between passes.
> > Nice, I didn't know about this. BTW, LoopDistribute was not updated to use hasDistributeTransformation.
> I only changed UnrollAndJam to use it for now. How these decisions are made is surprisingly subtle and e.g. in case of LoopVectorizeHints, integrated within other decisions. I was not brave enough to put up reviews for this and risking changing behavior without a need. But I would be happy if new code uses it.
@Meinersbur I am actually confused whether I should be checking for Enable or ForcedByUser. We only set Enable and not Forced if the vectorization width is requested via a pragma but I think that is an even stronger enforcement of vectorization. What is the logic here?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59832/new/
https://reviews.llvm.org/D59832
More information about the llvm-commits
mailing list