I want to get what are passes available in each optimization level and want to disable each pass in the different optimization level .
Want to do similarly in llvm :
Similar command in GCC - GCC -c -Q -O3 --help=optimizers
Then we can disable each optimization flags with -fno-(flagsname) .
I think -mllvm -print-after-all (Compiler Explorer) over a simple function should tell most of the passes. But as analysis passes are lazily evaluated, cached and recomputed upon invalidation during a real compilation, I think simple functions print doesn’t reflect the case for a real-world function being studied.
want to disable each pass in the different optimization level .