opt optimization

Is there any way to find if a optimization pass has passed in opt?
In clang -fsave-optimzization-record would tell if particular optimization pass has applied or failed.
Is there similar functionality in opt?


Hi Nethish,

I recently learned about -print-after-all. This will print the IR after each pass. This is not exactly what you want but in the meantime it may help.


Στις Πέμ, 9 Απρ 2020 στις 4:22 π.μ., ο/η nethish via llvm-dev <llvm-dev@lists.llvm.org> έγραψε:

The following might be also helpful:




For opt and llc you can use:

–pass-remarks-filter= - Only record optimization remarks from passes whose names match the given regular expression
–pass-remarks-format= - The format used for serializing remarks (default: YAML)
–pass-remarks-output= - Output filename for pass remarks


— Francis