[LLVMdev] Does loop vectorizer inquire about target's SIMD capabilities?
nrotem at apple.com
Thu Jan 3 15:24:31 PST 2013
On Jan 3, 2013, at 3:04 PM, Renato Golin <renato.golin at linaro.org> wrote:
> On 3 January 2013 22:09, Nadav Rotem <nrotem at apple.com> wrote:
> The loop vectorizer is now enabled by default.
> I thought that was just a temporary arrangement to get the feel for it, not to actually have it on all the time (next release). Is it just for -O3 or lower too?
The plan it to enable it by default for the 3.3 release. Until that point we can enable and disable it depending on the situation. It is a good idea to enable it as soon as possible in order to catch performance regressions as soon as possible. The vectorizer is currently enabled by default on O2 and O3, and it runs with reduced functionality on Os.
> This can cause problems, for instance on ARMv7, the default is that NEON is present, but Tegra2 doesn't have NEON, only VFP. It means an optimizing compilation that used to work on it will fail, unless you specify no NEON or no vectorization explicitly, no?
At the moment ARM does not have a good cost model. It relies on the default implementation which uses the TargetLoweing information to collect information about the target. In theory things should just work, because TLI should know about the vector situation.
I plan to start working on the ARM cost model early next week, and I hope that the ARM folks will help me with this.
> I'd prefer if -vectorization had to be passed explicitly to get it done on production releases of LLVM or something else (-O4 or -OV, for example).
Clang has the '-fvectorize' and '-fno-vectorize'.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev