On 15 February 2014 22:49, Tim Prince <n...@aol.com> wrote:
> In my experience, the (somewhat complicated) gcc --param options work
> sufficiently well for specification of unrolling.

There is precedent for --param in LLVM, we could go this way, too.
Though, I can't see how it'd be applied to a specific function, loop
or lexical block.


> In the same vein, I haven't seen any cases where gcc 4.9 is excessively 
> aggressive in
> vectorization, so that a #pragma novector plus scalar unroll  is needed, as
> it is with Intel compilers.
> (...)
> If your idea is to obtain selective effective
> auto-vectorization in source code which is sufficiently broken that -O2
> -ftree-vectorize can't be considered or -fno-strict-aliasing has to be set,
> I'm not about to second such a motion.

Our main idea with this is to help people report missed vectorization
on their code, and a way to help them achieve performance while LLVM
doesn't catch up.

Another case for this (and other pragmas controlling the optimization
level on a per-function basis) is to help debugging of specific
functions while leaving others untouched.

I'd not condone the usage of such pragmas on a persistent manner, nor
for any code that goes in production, or to work around broken code at
higher optimization levels.

cheers,
--renato

Reply via email to