[llvm-dev] Experimenting with opt -Os/-Oz

Fernando Magno Quintao Pereira via llvm-dev llvm-dev at lists.llvm.org
Wed Mar 17 07:12:58 PDT 2021


Dear Florian,

> I think a good place to start would be PassBuilder.cpp. Some passes are only added for certain optimization levels (e.g. see https://github.com/llvm/llvm-project/blob/main/llvm/lib/Passes/PassBuilder.cpp#L703) or take optimization level dependent options. You can also get the executed passes by using the `-debug-pass-manager` option (e.g. see https://github.com/llvm/llvm-project/blob/main/llvm/test/Other/new-pm-defaults.ll#L19)

Thank you! That was pretty much what I was looking for. Even the
comments in the header of PassBuilder are nice to learn more about
those default levels.

Regards,

Fernando


More information about the llvm-dev mailing list