Compilers are the “compiler driver” (ie gcc ) and the compiler itself, which also doubles as a preprocessor ( cc1 or cc1plus ). It also calls assembler ( as ) and linker ( ld ). In addition, there is a tool called collect2 that helps in the communication process in some cases.
If you want to see which intermediate states and calls will do this:
gcc -save-temps -v .....
If you want to view compiler optimization omissions, use the following options:
gcc -fdump-tree-all -fdump-rtl-all ....
This creates (indefinitely) human-readable dumps of the internal state for debugging purposes. It was not possible to save anything and reload into the compiler later, it is accurate, but useful if you plan to change the source of the compiler or write a GCC plugin.
source share