Answer the question
In order to leave comments, you need to log in
What optimizations are used in C and C++?
I would like to see a list of optimizations performed by the compiler. I don't need a full list of low-level optimizations, such as placing variables in registers, but rather things like evaluating constant expressions or expanding simple methods (get/set). What optimizations are different in C and C++? In particular, I'm considering gcc.
Answer the question
In order to leave comments, you need to log in
I don't need a full list of low-level optimizations, such as placing variables in registers, but rather things like evaluating constant expressions or expanding simple methods (get/set). What optimizations are different in C and C++? In particular, I'm considering gcc.
gcc -Q --help=optimizers
will list all currently enabled (other command line options) optimizations. What each of the -f* switches means can be found here: https://gcc.gnu.org/onlinedocs/gcc/Optimize-Option...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question