[LLVMdev] [Loop Vectorize] Question on -O3

Duncan Sands baldrick at free.fr
Tue Jul 2 04:26:48 PDT 2013


Hi Renato,

On 02/07/13 13:12, Renato Golin wrote:
> On 2 July 2013 12:00, Duncan Sands <baldrick at free.fr <mailto:baldrick at free.fr>>
> wrote:
>
>     all of the advanced LLVM optimizations assume that the IR has already been
>     cleaned up already by the less advanced optimizers.  Try running something
>     like -sroa -instcombine -simplifycfg first.
>
>
> There could be a warning on more advanced optimizations if the pre-requisites
> haven't run (as per individual call). And maybe a way to force the dependencies
> to run regardless of the On level. Not sure how this dependency system would be
> constructed, though.

they aren't dependencies in the sense that they aren't needed for correct
functioning.  They are only needed to get decent results.  But then you get
into a minefield, since all kinds of optimizations can expose stuff that
causes other optimizers to do stuff that causes other optimizers to do stuff
that (... repeat many times) that  ends up allowing the loop vectorizer to do
more.  Anyway, since "opt" is a developer tool I think it is reasonable to
require people to understand stuff rather than trying to have it all happen
automagically (such an automagic system wouldn't be useful for clang and other
frontends anyway, so in a sense would just represent pointless complexity).

Ciao, Duncan.



More information about the llvm-dev mailing list