I want to find some debugging options for Clang/LLVM which work like GCC's -fdump-tree-all-all, -fdump-rtl-all, and -fdump-ipa-all-all.
Basically, I want to have an LLVM IR dump before and after each optimization pass. Also, it can be useful to have all dumps of the AST from Clang and all phases of code generation (backend phases, Selection DAG, ISEL-SDNode, register allocation, and MCInsts).
I was able to find only the Clang's -ccc-print-phases
, but it will only print high-level phases names, e.g., preprocess-compile-assemble-link; but no any dump of IR.
Also there is Life of an instruction in LLVM paper with -cc1-ast-dump
option to dump Clang ASTs, but I want more, especially for code generation.