/Og   (Global Optimizations)

HomeOverviewHow Do ICompiler Options

Feature Only in Professional and Enterprise Editions   Code optimization is supported only in Visual C++ Professional and Enterprise Editions. For more information, see Visual C++ Editions.

This option provides local and global optimizations, automatic-register allocation, and loop optimization. (To find this option in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Optimizations in the Category box. Under Optimizations, click Global Optimizations.)

Note   You can enable or disable global optimization on a function-by-function basis using the optimize pragma with the g option.

For related information, see Generate Intrinsic Functions (/Oi), Improve Float Consistency (/Op), and Full Optimization (/Ox).