[PATCH] Add #pragma vectorize enable/disable to LLVM

Renato Golin renato.golin at linaro.org
Wed Dec 4 09:51:09 PST 2013


On 4 December 2013 17:20, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
> Ultimately, I think, we want to call the functionality that the vectorizer requires from those passes from the vectorizer only on the subset of BB’s modified by the vectorizer (instcombine as a library function ...).
> It matters for -O1 and -Oz which did not pay this penalty before. In the short term, I don’t have a good answer here.

Yes, that'd be ideal.

In the meantime, is the compile time penalty a worry? Or can we tackle
this later?


> +  if (!LateVectorize)
> +      MPM.add(createLoopVectorizePass(DisableUnrollLoops, LoopVectorize));
>
> Let’s fix this whitespace error while we are here.

Sure!


> I think that “vectorizer.enable” flag should enable “aggressive” vectorization at -Os, i.e disable the size heuristic we use.

That's a good point. I have no strong opinions here, if every one
agrees this is correct.

> > Yes, that's the list of the metadata applied to a node, with itself as the first node as being itself. I'm not sure why this is like that, Arnold might know why.
> “root” metadata does that.

Oh, ok, it's to keep the metadata intact when merging, makes sense.

cheers,
--renato

PS: I'll have to write up some basic rules about the semantics, so
that people know what to expect, as I'm already getting confused. ;)




More information about the llvm-commits mailing list