[LLVMdev] Optimization pass reference/guide?

Duncan Sands baldrick at free.fr
Sun Jan 6 08:09:24 PST 2013


Hi,

On 06/01/13 16:48, edA-qa mort-ora-y wrote:
> Is there some kind of guide to the various optimization passes? I see
> their names in the class list, and the various "createXXX" functions,
> but I'm not sure if there are ordering requirements or perhaps unsafe
> optimizations.

there are no ordering requirements, in the sense that all passes are
supposed to work correctly regardless of the order they are run in.
Note that "work correctly" doesn't mean "work well", I mean that they
should never do any incorrect transformations no matter what order they
are run in.  However several passes only do something useful if some
other pass has been run first, for example most passes need to be run
after mem2reg or sroa in order to be effective.

See also http://llvm.org/docs/Passes.html

Ciao, Duncan.




More information about the llvm-dev mailing list