-->

Previous | Table of Contents | Next

Page 189

enables the same software cache, but when the compiler determines that the context of the last function compiled would yield the same access privileges of the next function to compile, it preserves the cache. This is most helpful when defining many member functions for the same class: with the exception of member functions which are friends of other classes, each member function has exactly the same access privileges as every other, and the cache need not be flushed.
_fno_default_inline Don't make member functions inline by default merely because they are defined inside the class scope (C++ only).
_fno_defer_pop Always pop the arguments to each function call as soon as that function returns. For machines which must pop arguments after a function call, the compiler normally lets arguments accumulate on the stack for several function calls and pops them all at once.
_fforce_mem Force memory operands to be copied into registers before doing arithmetic on them. This may produce better code by making all memory references potential common subexpressions. When they are not common subexpressions, instruction combination should eliminate the separate register-load. I am interested in hearing about the difference this makes.
_fforce_addr Force memory address constants to be copied into registers before doing arithmetic on them.
This may produce better code just as _fforce_mem may. I am interested in hearing about the difference this makes.
_fomit_frame_pointer Don't keep the frame pointer in a register for functions that don't need one. This avoids the instructions to save, set up and restore frame pointers; it also makes an extra register available in many functions. It also makes debugging impossible on most machines.
On some machines, such as the VAX, this flag has no effect because the standard calling sequence automatically handles the frame pointer and nothing is saved by pretending it doesn't exist. The machine-description macro FRAME_POINTER_REQUIRED controls whether a target machine supports this flag.
_finline_functions Integrate all simple functions into their callers. The compiler heuristically decides which functions are simple enough to be worth integrating in this way.
If all calls to a given function are integrated, and the function is declared static, then gcc normally does not output the function as assembler code in its own right.
_fcaller_saves Enable values to be allocated in registers that will be clobbered by function calls, by emitting extra instructions to save and restore the registers around such calls. Such allocation is done only when it seems to result in better code than would otherwise be produced.
This option is enabled by default on certain machines, usually those which have no call-preserved registers to use instead.
_fkeep_inline_functions Even if all calls to a given function are integrated, and the function is declared static, nevertheless output a separate runtime callable version of the function.
_fno_function_cse Do not put function addresses in registers; make each instruction that calls a constant function contain the function's address explicitly.
This option results in less efficient code, but some strange hacks that alter the assembler output may be confused by the optimizations performed when this option is not used.
_fno_peephole Disable any machine-specific peephole optimizations.
_ffast-math This option allows gcc to violate some ANSI or IEEE specifications in the interest of optimizing code for speed. For example, it allows the compiler to assume arguments to the sqrt function are nonnegative numbers.
This option should never be turned on by any _O option because it can result in incorrect output for programs which depend on an exact implementation of IEEE or ANSI rules/specifications for math functions.

The following options control specific optimizations. The _O2 option turns on all of these optimizations except _funroll_loops and _funroll_all_loops.

The _O option usually turns on the _fthread_jumps and _fdelayed_branch options, but specific machines may change the default optimizations.

Page 190

You can use the following flags in the rare cases when fine-tuning of optimizations to be performed is desired:

_fstrength_reduce Perform the optimizations of loop strength reduction and elimination of iteration variables.
_fthread_jumps Perform optimizations where we check to see if a jump branches to a location where another comparison subsumed by the first is found. If so, the first branch is redirected to either the destination of the second branch or a point immediately following it, depending on whether the condition is known to be true or false.
_funroll_loops Perform the optimization of loop unrolling. This is only done for loops whose number of iterations can be determined at compile time or runtime.
_funroll_all_loops Perform the optimization of loop unrolling. This is done for all loops. This usually makes programs run more slowly.
_fcse_follow_jumps In common subexpression elimination, scan through jump instructions when the target of the jump is not reached by any other path. For example, when CSE encounters an if statement with an else clause, CSE will follow the jump when the condition tested is false.
_fcse_skip_blocks This is similar to _fcse_follow_jumps, but causes CSE to follow jumps which conditionally skip over blocks. When CSE encounters a simple if statement with no else clause, _fcse_skip_blocks causes CSE to follow the jump around the body of the if.
_frerun_cse_after_loop Rerun common subexpression elimination after loop optimizations has been performed.
_felide_constructors Elide constructors when this seems plausible (C++ only). With this flag, GNU C++ initializes y directly from the call to foo without going through a temporary in the following code:
A foo (); A y = foo ();
Without this option, GNU C++ first initializes y by calling the appropriate constructor for type A; then assigns the result of foo to a temporary; and, finally, replaces the initial value of y with the temporary.
The default behavior (_fno_elide_constructors) is specified by the draft ANSI C++ standard. If your program's constructors have side effects, using _felide-constructors can make your program act differently, since some constructor calls may be omitted.
_fexpensive_optimizations Perform a number of minor optimizations that are relatively expensive.
_fdelayed_branch If supported for the target machine, attempt to reorder instructions to exploit instruction slots available after delayed branch instructions.
_fschedule_insns If supported for the target machine, attempt to reorder instructions to eliminate execution stalls due to required data being unavailable. This helps machines that have slow floating point or memory load instructions by allowing other instructions to be issued until the result of the load or floating point instruction is required.
_fschedule_insns2 Similar to _fschedule_insns, but requests an additional pass of instruction scheduling after register allocation has been done. This is especially useful on machines with a relatively small number of registers and where memory load instructions take more than one cycle.

TARGET OPTIONS

By default, GNU CC compiles code for the same type of machine that you are using.

However, it can also be installed as a cross-compiler, to compile for some other type of machine. In fact, several different configurations of GNU CC, for different target machines, can be installed side by side. Then you specify which one to use with the _b option.

In addition, older and newer versions of GNU CC can be installed side by side. One of them (probably the newest) will be the default, but you may sometimes want to use another.

_b machine The argument machine specifies the target machine for compilation. This is useful when you have installed GNU CC as a cross-compiler. The value to use for machine is the same as was specified as the machine type when configuring GNU CC as a cross-compiler. For example, if a cross-compiler was configured with configure

Previous | Table of Contents | Next