7.6.6.3 Options that Specify Machine-Independent Flags
Options of the form -fflag
specify machine-independent
flags. Most flags have both positive and negative forms; the negative form of
-ffoo
would be -fno-foo
. In the table below, only
one of the forms is listed (the one that is not the default.)
Option | Definition |
---|---|
-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 the function is normally not output as
assembler code in its own right. |
-finline-limit=n | By default, the compiler limits the
size of functions that can be inlined. This flag allows the control of
this limit for functions that are explicitly marked as inline (i.e.,
marked with the inline keyword). n is
the size of functions that can be inlined in number of pseudo
instructions (not counting parameter handling). The default value of
n is 10000. Increasing this value can result in
more inlined code at the cost of compilation time and memory
consumption.Decreasing usually makes the compilation faster and less code will be inlined (which presumably means slower programs). This option is particularly useful for programs that use inlining. Note: Pseudo instruction represents,
in this particular context, an abstract measurement of function’s
size. In no way does it represent a count of assembly instructions
and as such, its exact meaning might change from one release of the
compiler to an another. |
-fkeep-inline-functions | Even if all calls to a given function
are integrated, and the function is declared static ,
output a separate run time callable version of the function. This switch
does not affect extern inline functions. |
-fkeep-static-consts | Emit variables declared static const
when optimization isn’t turned on, even if the variables aren’t
referenced. The compiler enables this option by
default. If you want to force the compiler to check if the variable
was referenced, regardless of whether or not optimization is turned
on, use the |
-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-inline | Do not pay attention to the
inline keyword. Normally this option is used to
keep the compiler from expanding any functions inline. If optimization
is not enabled, no functions can be expanded inline. |
-fomit-frame-pointer | Do not 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. |
-foptimize-sibling-calls | Optimize sibling and tail recursive calls. |