How can I see which compiler options are enabled with optimization?
To see which compiler options are enabled with a particular optimization level, you need to:
-
Create an (empty) test.c file.
-
Call the compiler driver with the verbose flag, which will output the calls of the individual toolchain components with all the options including the default ones:
clang -v -O<optimization level> -march=tc162 -c test.c
. -
If you require further information, use the following command to get a list of individual optimization passes and compiler options associated with them.
clang -mllvm -debug-pass=Structure -O<optimization level> -march=tc162 -c test.c
.