[LLVMdev] opt -O2 optimization passes

Seb babslachem at gmail.com
Tue Nov 15 06:56:44 PST 2011


Hi all,

I would like to know which optimization passes are performed at -O2 by opt.
So I used following command:

llvm-as < /dev/null | opt -O2 -std-compile-opts -disable-output
-debug-pass=Arguments

I've got following output for LLVM opt 2.9:

Pass Arguments:  -no-aa -tbaa -basicaa -simplifycfg -domtree -scalarrepl
-early-cse
Pass Arguments:  -targetlibinfo -no-aa -tbaa -basicaa -preverify -domtree
-verify -lowersetjmp -globalopt -ipsccp -deadargelim -instcombine
-simplifycfg -basiccg -prune-eh -inline -functionattrs -argpromotion
-scalarrepl-ssa -domtree -early-cse -simplify-libcalls -lazy-value-info
-jump-threading -correlated-propagation -simplifycfg -instcombine
-tailcallelim -simplifycfg -reassociate -domtree -loops -loop-simplify
-lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine
-scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-idiom
-loop-deletion -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt
-sccp -instcombine -lazy-value-info -jump-threading -correlated-propagation
-domtree -memdep -dse -adce -simplifycfg -strip-dead-prototypes
-print-used-types -deadtypeelim -globaldce -constmerge -globalopt -ipsccp
-deadargelim -instcombine -simplifycfg -basiccg -prune-eh -inline
-functionattrs -scalarrepl-ssa -domtree -early-cse -simplify-libcalls
-lazy-value-info -jump-threading -correlated-propagation -simplifycfg
-instcombine -tailcallelim -simplifycfg -reassociate -domtree -loops
-loop-simplify -lcssa -loop-rotate -licm -lcssa -loop-unswitch -instcombine
-scalar-evolution -loop-simplify -lcssa -iv-users -indvars -loop-idiom
-loop-deletion -loop-unroll -instcombine -memdep -gvn -memdep -memcpyopt
-sccp -instcombine -lazy-value-info -jump-threading -correlated-propagation
-domtree -memdep -dse -adce -simplifycfg -strip-dead-prototypes
-print-used-types -deadtypeelim -constmerge -preverify -domtree -verify

Why is there two lines stating with 'Pass Argument:' ?

To reproduce opt-O2 behavior should I copy options from the two lines or
only second one ?
Thanks for your answers
Best Regards
Seb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20111115/5d0ba34d/attachment.html>


More information about the llvm-dev mailing list