Where can I find the sequence of optimizations used by clang according to -OX?
Where to find the optimization sequence for clang -OX?
clang executes the precisely same sequence of passes as opt -ON. So, you can do something like
llvm-as < /dev/null | opt -O3 -disable-output -debug-pass=Arguments
to derive the "full" set of passes which are run at O3.
But I only see up to O3 in opt. Why clang has O4? –
Laodicea
-O4 usually means link-time optimization, thus it cannot be performed via opt alone. The set of passes suitable for LTO can be found via opt -std-link-opts. –
Nutter
Thanks! I parsed and posted the output for all optimization levels here for llvm 3.2 –
Matlock
© 2022 - 2024 — McMap. All rights reserved.