From: Eric Botcazou Date: Tue, 29 May 2018 09:42:50 +0000 (+0000) Subject: [Ada] Adjust documentation of -gnatn switch X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=86e74d5869813c22b946d76e7dbe960ef0a0c1f2;p=gcc.git [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 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 --- diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog index 42cc2eb29ca..80edef8b01e 100644 --- a/gcc/ada/ChangeLog +++ b/gcc/ada/ChangeLog @@ -1,3 +1,11 @@ +2018-05-29 Eric Botcazou + + * 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 * gcc-interface/Makefile.in: Fix typos. diff --git a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst index 4800138a635..97ae764e448 100644 --- a/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst +++ b/gcc/ada/doc/gnat_ugn/building_executable_programs_with_gnat.rst @@ -1255,7 +1255,7 @@ Alphabetical List of All Switches 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 @@ -1910,10 +1910,10 @@ Alphabetical List of All Switches .. 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. @@ -5512,17 +5512,17 @@ Subprogram Inlining Control 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`. diff --git a/gcc/ada/gnat_ugn.texi b/gcc/ada/gnat_ugn.texi index e6b5148ff2d..57a8febd943 100644 --- a/gcc/ada/gnat_ugn.texi +++ b/gcc/ada/gnat_ugn.texi @@ -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. 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 @@ -9716,10 +9716,10 @@ means that no limit applies. @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 @@ -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'. 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}. diff --git a/gcc/ada/usage.adb b/gcc/ada/usage.adb index a065244c110..cdf14cf8db8 100644 --- a/gcc/ada/usage.adb +++ b/gcc/ada/usage.adb @@ -352,7 +352,7 @@ begin -- 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