[PATCH] Implement pragma llvm.vectorizer.enable in LoopVectorizer
Renato Golin
renato.golin at linaro.org
Fri Nov 29 12:43:48 PST 2013
On 29 November 2013 20:26, Arnold <aschwaighofer at apple.com> wrote:
> But at which width/factor? If the cost model "fails" how should the vectorizer select "the right" one? (This case is covered by pragma width/unroll)
As you said below, whatever the vectorizer thinks it's best. But
that's arguable, and I agree it's not a good alternative.
> I think #pragma vectorizer enable should just turn on vectorization with automatic selection of the VF/UF.
> You also would not need new meta data for this llvm.vectorizer.unroll (0) and llvm.vectorizer.width(0) already have this semantics.
Ok, I didn't know that.
> To implement Oz and O1 vectorization we would pass a flag to the loop vectorizer to only vectorize loops marked with the right metadata.
Yes, and then we'd enable the Loop/SLP vectorizers by default, but at
lower levels, only run with metadata.
> At Os we take these flags to mean vectorize with O3 heuristics.
I see. We'll need to document all of that, because it's getting
complicated for the user. But I agree with this change, too.
I'll discard this code review and start the global one.
Thaks!
--renato
More information about the llvm-commits
mailing list