At different levels of GCC, the value of the same optimization option will be different.
How to determine the parameter values of relevant optimization options under different optimization levels?
As shown in the figure:
Parameter values include fast and standard,
At what level is 'fast' used?
At what level is 'standard' used?
Hi there, I have moved your question to the Compilers and Libraries forum. Many thanks.
Hi, you can use `gcc -Q --help=param -O<level>` which will print out the values of all parameters at optimization <level>.
Thanks！This method can not completely determine the specific parameter values of these optimization options at different levels.Is there any other way？
I don't understand what you mean. If you want the parameters at -O1, -O2, -O3 etc you just call it multiple times?
gcc -Q --help=param -O1 gives you the values at -O1, gcc -Q --help=param -O2 at -O2 etc.
There's no simple command that gives you a table of all the values, you have to make it yourself.