Commit 86e74d58 by Eric Botcazou Committed by Pierre-Marie de Rodat

[Ada] Adjust documentation of -gnatn switch

This changes the wording in the documentation of the -gnatn switch to make
it use "units" rather than "modules" and also adjusts the usage message.

No functional changes.

2018-05-29  Eric Botcazou  <ebotcazou@adacore.com>

gcc/ada/

	* 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.

From-SVN: r260889
parent 4f95a818
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> 2018-05-29 Arnaud Charlet <charlet@adacore.com>
* gcc-interface/Makefile.in: Fix typos. * gcc-interface/Makefile.in: Fix typos.
......
...@@ -1255,7 +1255,7 @@ Alphabetical List of All Switches ...@@ -1255,7 +1255,7 @@ Alphabetical List of All Switches
of the program, instead of a fragmentary view with the usual approach. 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 This can also speed up the compilation of big programs and reduce the
size of the executable, compared with a traditional per-unit compilation 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 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 debugging information generated by -g with it might be hardly usable.
The switch, as well as the accompanying :switch:`-Ox` switches, must be The switch, as well as the accompanying :switch:`-Ox` switches, must be
...@@ -1910,10 +1910,10 @@ Alphabetical List of All Switches ...@@ -1910,10 +1910,10 @@ Alphabetical List of All Switches
.. index:: -gnatn (gcc) .. index:: -gnatn (gcc)
:switch:`-gnatn[12]` :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 is specified. This inlining is performed by the GCC back-end. An optional
digit sets the inlining level: 1 for moderate inlining across modules digit sets the inlining level: 1 for moderate inlining across units
or 2 for full inlining across modules. If no inlining level is specified, or 2 for full inlining across units. If no inlining level is specified,
the compiler will pick it based on the optimization level. the compiler will pick it based on the optimization level.
...@@ -5512,17 +5512,17 @@ Subprogram Inlining Control ...@@ -5512,17 +5512,17 @@ Subprogram Inlining Control
The ``n`` here is intended to suggest the first syllable of the word 'inline'. The ``n`` here is intended to suggest the first syllable of the word 'inline'.
GNAT recognizes and processes ``Inline`` pragmas. However, for inlining to GNAT recognizes and processes ``Inline`` pragmas. However, for inlining to
actually occur, optimization must be enabled and, by default, inlining of actually occur, optimization must be enabled and, by default, inlining of
subprograms across modules is not performed. If you want to additionally subprograms across units is not performed. If you want to additionally
enable inlining of subprograms specified by pragma ``Inline`` across modules, enable inlining of subprograms specified by pragma ``Inline`` across units,
you must also specify this switch. 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 and does not access the bodies of subprograms for which ``pragma Inline`` is
specified if they are not in the current unit. specified if they are not in the current unit.
You can optionally specify the inlining level: 1 for moderate inlining across You can optionally specify the inlining level: 1 for moderate inlining across
modules, which is a good compromise between compilation times and performances units, which is a good compromise between compilation times and performances
at run time, or 2 for full inlining across modules, which may bring about 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 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 pick it based on the optimization level: 1 for :switch:`-O1`, :switch:`-O2` or
:switch:`-Os` and 2 for :switch:`-O3`. :switch:`-Os` and 2 for :switch:`-O3`.
......
...@@ -8831,7 +8831,7 @@ the best interprocedural optimization strategy based on a complete view ...@@ -8831,7 +8831,7 @@ the best interprocedural optimization strategy based on a complete view
of the program, instead of a fragmentary view with the usual approach. 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 This can also speed up the compilation of big programs and reduce the
size of the executable, compared with a traditional per-unit compilation 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 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 debugging information generated by -g with it might be hardly usable.
The switch, as well as the accompanying @code{-Ox} switches, must be The switch, as well as the accompanying @code{-Ox} switches, must be
...@@ -9716,10 +9716,10 @@ means that no limit applies. ...@@ -9716,10 +9716,10 @@ means that no limit applies.
@item @code{-gnatn[12]} @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 is specified. This inlining is performed by the GCC back-end. An optional
digit sets the inlining level: 1 for moderate inlining across modules digit sets the inlining level: 1 for moderate inlining across units
or 2 for full inlining across modules. If no inlining level is specified, or 2 for full inlining across units. If no inlining level is specified,
the compiler will pick it based on the optimization level. the compiler will pick it based on the optimization level.
@end table @end table
...@@ -14657,17 +14657,17 @@ For the source file naming rules, @ref{52,,File Naming Rules}. ...@@ -14657,17 +14657,17 @@ For the source file naming rules, @ref{52,,File Naming Rules}.
The @code{n} here is intended to suggest the first syllable of the word 'inline'. 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 GNAT recognizes and processes @code{Inline} pragmas. However, for inlining to
actually occur, optimization must be enabled and, by default, inlining of actually occur, optimization must be enabled and, by default, inlining of
subprograms across modules is not performed. If you want to additionally subprograms across units is not performed. If you want to additionally
enable inlining of subprograms specified by pragma @code{Inline} across modules, enable inlining of subprograms specified by pragma @code{Inline} across units,
you must also specify this switch. 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 and does not access the bodies of subprograms for which @code{pragma Inline} is
specified if they are not in the current unit. specified if they are not in the current unit.
You can optionally specify the inlining level: 1 for moderate inlining across You can optionally specify the inlining level: 1 for moderate inlining across
modules, which is a good compromise between compilation times and performances units, which is a good compromise between compilation times and performances
at run time, or 2 for full inlining across modules, which may bring about 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 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 pick it based on the optimization level: 1 for @code{-O1}, @code{-O2} or
@code{-Os} and 2 for @code{-O3}. @code{-Os} and 2 for @code{-O3}.
......
...@@ -352,7 +352,7 @@ begin ...@@ -352,7 +352,7 @@ begin
-- Line for -gnatn switch -- Line for -gnatn switch
Write_Switch_Char ("n[?]"); 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 -- Line for -gnato switch
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment