+2018-05-29 Eric Botcazou <ebotcazou@adacore.com>
+
+ * doc/gnat_ugn/building_executable_programs_with_gnat.rst (Alphabetical
+ List of All Switches): Replace "modules" with "units".
+ (Subprogram Inlining Control): Likewise.
+ * gnat_ugn.texi: Regenerate.
+ * usage.adb (Usage): Fix description of -gnatn switch.
+
2018-05-29 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Fix typos.
of the program, instead of a fragmentary view with the usual approach.
This can also speed up the compilation of big programs and reduce the
size of the executable, compared with a traditional per-unit compilation
- with inlining across modules enabled by the :switch:`-gnatn` switch.
+ with inlining across units enabled by the :switch:`-gnatn` switch.
The drawback of this approach is that it may require more memory and that
the debugging information generated by -g with it might be hardly usable.
The switch, as well as the accompanying :switch:`-Ox` switches, must be
.. index:: -gnatn (gcc)
:switch:`-gnatn[12]`
- Activate inlining across modules for subprograms for which pragma ``Inline``
+ Activate inlining across units for subprograms for which pragma ``Inline``
is specified. This inlining is performed by the GCC back-end. An optional
- digit sets the inlining level: 1 for moderate inlining across modules
- or 2 for full inlining across modules. If no inlining level is specified,
+ digit sets the inlining level: 1 for moderate inlining across units
+ or 2 for full inlining across units. If no inlining level is specified,
the compiler will pick it based on the optimization level.
The ``n`` here is intended to suggest the first syllable of the word 'inline'.
GNAT recognizes and processes ``Inline`` pragmas. However, for inlining to
actually occur, optimization must be enabled and, by default, inlining of
- subprograms across modules is not performed. If you want to additionally
- enable inlining of subprograms specified by pragma ``Inline`` across modules,
+ subprograms across units is not performed. If you want to additionally
+ enable inlining of subprograms specified by pragma ``Inline`` across units,
you must also specify this switch.
- In the absence of this switch, GNAT does not attempt inlining across modules
+ In the absence of this switch, GNAT does not attempt inlining across units
and does not access the bodies of subprograms for which ``pragma Inline`` is
specified if they are not in the current unit.
You can optionally specify the inlining level: 1 for moderate inlining across
- modules, which is a good compromise between compilation times and performances
- at run time, or 2 for full inlining across modules, which may bring about
+ units, which is a good compromise between compilation times and performances
+ at run time, or 2 for full inlining across units, which may bring about
longer compilation times. If no inlining level is specified, the compiler will
pick it based on the optimization level: 1 for :switch:`-O1`, :switch:`-O2` or
:switch:`-Os` and 2 for :switch:`-O3`.
of the program, instead of a fragmentary view with the usual approach.
This can also speed up the compilation of big programs and reduce the
size of the executable, compared with a traditional per-unit compilation
-with inlining across modules enabled by the @code{-gnatn} switch.
+with inlining across units enabled by the @code{-gnatn} switch.
The drawback of this approach is that it may require more memory and that
the debugging information generated by -g with it might be hardly usable.
The switch, as well as the accompanying @code{-Ox} switches, must be
@item @code{-gnatn[12]}
-Activate inlining across modules for subprograms for which pragma @code{Inline}
+Activate inlining across units for subprograms for which pragma @code{Inline}
is specified. This inlining is performed by the GCC back-end. An optional
-digit sets the inlining level: 1 for moderate inlining across modules
-or 2 for full inlining across modules. If no inlining level is specified,
+digit sets the inlining level: 1 for moderate inlining across units
+or 2 for full inlining across units. If no inlining level is specified,
the compiler will pick it based on the optimization level.
@end table
The @code{n} here is intended to suggest the first syllable of the word 'inline'.
GNAT recognizes and processes @code{Inline} pragmas. However, for inlining to
actually occur, optimization must be enabled and, by default, inlining of
-subprograms across modules is not performed. If you want to additionally
-enable inlining of subprograms specified by pragma @code{Inline} across modules,
+subprograms across units is not performed. If you want to additionally
+enable inlining of subprograms specified by pragma @code{Inline} across units,
you must also specify this switch.
-In the absence of this switch, GNAT does not attempt inlining across modules
+In the absence of this switch, GNAT does not attempt inlining across units
and does not access the bodies of subprograms for which @code{pragma Inline} is
specified if they are not in the current unit.
You can optionally specify the inlining level: 1 for moderate inlining across
-modules, which is a good compromise between compilation times and performances
-at run time, or 2 for full inlining across modules, which may bring about
+units, which is a good compromise between compilation times and performances
+at run time, or 2 for full inlining across units, which may bring about
longer compilation times. If no inlining level is specified, the compiler will
pick it based on the optimization level: 1 for @code{-O1}, @code{-O2} or
@code{-Os} and 2 for @code{-O3}.
-- Line for -gnatn switch
Write_Switch_Char ("n[?]");
- Write_Line ("Enable pragma Inline (both within and across units, ?=1/2)");
+ Write_Line ("Enable pragma Inline across units (?=1/2 for moderate/full)");
-- Line for -gnato switch