1.1 Controlling Optimization from PWB

The Programmer's WorkBench (PWB) is an integrated development environment for editing, building, and debugging applications written in Microsoft C or C++. For more information on the PWB, see the Environment and Tools manual.

There are two ways to compile from inside the Programmer's WorkBench:

Debug compile. In a default debug compile, the compiler performs no optimizations at all.

Release compile. In a default release compile, the compiler performs most optimizations.

To select the optimizations the compiler performs in either a debug compile or a release compile, pull down the Options menu and choose the Language Options submenu. From that menu, open either the C or C++ Compiler Options dialog box. From that dialog box, you can specify either a debug or a release compile, and you can open the Optimizations dialog box to select individual optimizations.

The optimizations in each of the Compiler Options dialog boxes correspond to a command-line option to CL. (In fact, the PWB constructs a command line from your input and passes it to CL.)

Note:

In this chapter, optimization options are discussed in terms of the effect of the optimization, the command-line option to invoke the optimization, and pragmas that control the optimization. All of these optimizations can be controlled at the compilation-unit (file) level using the Compiler Options dialog boxes.