Given a clang compile command like
clang --option1 --option2 ... <target>, is there a way (some clang options) to tweak the command (adding / removing some options) to list the passes that were executed in compiling this command?
--print-after-all also prints the compiled output (e.g., IR when
--emit-llvm is true), and for the particular use case, only pass names are needed.
Reading the pass manager code takes time and isn’t as reliable as clang prints (if possible at all), since the many options involved complexes reasoning about pass initialization.