Automatic Inline Expansion (
−
oi Option)
3-12
3.5 Automatic Inline Expansion (
−
oi Option)
The optimizer automatically inlines small functions when it is invoked with the
−
o3 option. A command-line option,
−
oi
size
, specifies the size of the functions
inlined. When you use
−
oi, specify the
size
limit for the largest function to be
inlined. You can use the
−
oi
size
option in the following ways:
-
If you set the
size
parameter to 0 (
−
oi0), all size-controlled inlining is dis-
abled.
-
If you set the
size
parameter to a nonzero integer, the compiler inlines
functions based on
size
. The optimizer multiplies the number of times the
function is inlined (plus 1 if the function is externally visible and its declara-
tion cannot be safely removed) by the size of the function. The optimizer
inlines the function only if the result is less than the size parameter. The
compiler measures the size of a function in arbitrary units; however, the
optimizer information file (created with the
−
on1 or
−
on2 option) reports
the size of each function in the same units that the
−
oi option uses.
The
−
oi
size
option controls only the inlining of functions that are not explicitly
declared as inline. If you do not use the
−
oi
size
option, the optimizer inlines
very small functions. The
−
x option controls the inlining of functions declared
Summary of Contents for TMS320C2x
Page 8: ...viii...
Page 69: ...2 47 C Compiler Description...
Page 159: ...6 36...
Page 226: ...8 6...