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>
Hi Seb,> 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=Argumentsfirst off, if you pass -O2 there is no need for -std-compile-opts and vice versa.> > 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...> > Why is there two lines stating with 'Pass Argument:' ?This is coming from -O2. When a front-end outputs a function, it immediately runs the per-function passes in the first line on it. This tends to shrink functions a lot, reducing memory usage. When all of the functions have been output all of the other passes are run.> > To reproduce opt-O2 behavior should I copy options from the two lines or only > second one ?Both of them. To be most accurate, you can do the following: opt bitcode.bc pass-list-from-first-line | opt pass-list-from-second line Ciao, Duncan.> Thanks for your answers > Best Regards > Seb > > > > > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Possibly Parallel Threads
- [LLVMdev] Proposal: Debug information improvement - keep the line number with optimizations
- [LLVMdev] How to disbale loop-rotate in opt -O3 ?
- [LLVMdev] Cross-module function inlining
- [LLVMdev] Cross-module function inlining
- [LLVMdev] How to use LLVM optimizations with clang