[Ada] Update gnatelim documentation wrt. compilation of main unit
authorSergey Rybin <rybin@adacore.com>
Thu, 31 May 2018 10:46:12 +0000 (10:46 +0000)
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>
Thu, 31 May 2018 10:46:12 +0000 (10:46 +0000)
2018-05-31  Sergey Rybin  <rybin@adacore.com>

gcc/ada/

* doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
that the main unit to be built before the call, now it computes the
closure of the main unit itself.
* gnat_ugn.texi: Regenerate.

From-SVN: r261001

gcc/ada/ChangeLog
gcc/ada/doc/gnat_ugn/gnat_and_program_execution.rst
gcc/ada/gnat_ugn.texi

index d360f21..45a4bfd 100644 (file)
@@ -1,3 +1,10 @@
+2018-05-31  Sergey Rybin  <rybin@adacore.com>
+
+       * doc/gnat_ugn/gnat_and_program_execution.rst: gnatelim does not need
+       that the main unit to be built before the call, now it computes the
+       closure of the main unit itself.
+       * gnat_ugn.texi: Regenerate.
+
 2018-05-31  Eric Botcazou  <ebotcazou@adacore.com>
 
        * repinfo.adb (List_Structural_Record_Layout): Set First to false
index 8f6d338..da8a080 100644 (file)
@@ -2734,9 +2734,12 @@ appropriate options.
   used, then in process all the files from the argument project but
   not just the closure of the main subprogram.
 
-  After a full successful build of the main subprogram ``gnatelim`` can be
-  called without  specifying sources to analyse, in this case it computes
-  the source closure of the main unit from the :file:`ALI` files.
+  In all the other cases (that are typical cases of ``gnatelim`` usage, when
+  the only ``gnatelim`` parameter is the name of the source file containing
+  the main subprogram) gnatelim needs the full closure of the main subprogram.
+  When called with a project file, gnatelim computes this closure itself.
+  Otherwise it assumes that it can reuse the results of the previous
+  build of the main subprogram.
 
   If the set of sources to be processed by ``gnatelim`` contains sources with
   preprocessing directives
@@ -2744,15 +2747,6 @@ appropriate options.
   the ``gnatelim`` call, and the generated set of pragmas ``Eliminate``
   will correspond to preprocessed sources.
 
-  The following command will create the set of :file:`ALI` files needed for
-  ``gnatelim``:
-
-    ::
-
-       $ gnatmake -c Main_Prog
-
-  Note that ``gnatelim`` does not need object files.
-
 
   .. _Running_gnatelim:
 
@@ -2871,6 +2865,8 @@ appropriate options.
     of the argument sources). On a multiprocessor machine this speeds up processing
     of big sets of argument sources. If ``n`` is 0, then the maximum number of
     parallel tree creations is the number of core processors on the platform.
+    This possibility is disabled if ``gnatelim`` has to compute the closure
+    of the main unit.
 
 
   .. index:: -q (gnatelim)
@@ -2944,62 +2940,6 @@ appropriate options.
   of executable.
 
 
-  .. _Making_Your_Executables_Smaller:
-
-  Making Your Executables Smaller
-  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-  In order to get a smaller executable for your program you now have to
-  recompile the program completely with the configuration file containing
-  pragmas Eliminate generated by gnatelim. If these pragmas are placed in
-  :file:`gnat.adc` file located in your current directory, just do:
-
-    ::
-
-       $ gnatmake -f main_prog
-
-  (Use the :switch:`-f` option for ``gnatmake`` to
-  recompile everything
-  with the set of pragmas ``Eliminate`` that you have obtained with
-  ``gnatelim``).
-
-  Be aware that the set of ``Eliminate`` pragmas is specific to each
-  program. It is not recommended to merge sets of ``Eliminate``
-  pragmas created for different programs in one configuration file.
-
-
-  .. _Summary_of_the_gnatelim_Usage_Cycle:
-
-  Summary of the ``gnatelim`` Usage Cycle
-  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-  Here is a quick summary of the steps to be taken in order to reduce
-  the size of your executables with ``gnatelim``. You may use
-  other GNAT options to control the optimization level,
-  to produce the debugging information, to set search path, etc.
-
-  * Create a complete set of :file:`ALI` files (if the program has not been
-    built already)
-
-    ::
-
-        $ gnatmake -c main_prog
-
-  * Generate a list of ``Eliminate`` pragmas in default configuration file
-    :file:`gnat.adc` in the current directory
-
-    ::
-
-        $ gnatelim main_prog >[>] gnat.adc
-
-  * Recompile the application
-
-    ::
-
-        $ gnatmake -f main_prog
-
-
-
 .. index:: Overflow checks
 .. index:: Checks (overflow)
 
index 57a8feb..949551f 100644 (file)
@@ -22155,7 +22155,7 @@ appropriate options.
 
 
 @node Overflow Check Handling in GNAT,Performing Dimensionality Analysis in GNAT,Improving Performance,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{16a}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{27}
+@anchor{gnat_ugn/gnat_and_program_execution id53}@anchor{16a}@anchor{gnat_ugn/gnat_and_program_execution overflow-check-handling-in-gnat}@anchor{27}
 @section Overflow Check Handling in GNAT
 
 
@@ -22171,7 +22171,7 @@ This section explains how to control the handling of overflow checks.
 @end menu
 
 @node Background,Management of Overflows in GNAT,,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{1c1}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1c2}
+@anchor{gnat_ugn/gnat_and_program_execution id54}@anchor{1c1}@anchor{gnat_ugn/gnat_and_program_execution background}@anchor{1c2}
 @subsection Background
 
 
@@ -22297,7 +22297,7 @@ exception raised because of the intermediate overflow (and we really
 would prefer this precondition to be considered True at run time).
 
 @node Management of Overflows in GNAT,Specifying the Desired Mode,Background,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c3}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1c4}
+@anchor{gnat_ugn/gnat_and_program_execution id55}@anchor{1c3}@anchor{gnat_ugn/gnat_and_program_execution management-of-overflows-in-gnat}@anchor{1c4}
 @subsection Management of Overflows in GNAT
 
 
@@ -22411,7 +22411,7 @@ out in the normal manner (with infinite values always failing all
 range checks).
 
 @node Specifying the Desired Mode,Default Settings,Management of Overflows in GNAT,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{f8}@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c5}
+@anchor{gnat_ugn/gnat_and_program_execution id56}@anchor{1c5}@anchor{gnat_ugn/gnat_and_program_execution specifying-the-desired-mode}@anchor{f8}
 @subsection Specifying the Desired Mode
 
 
@@ -22535,7 +22535,7 @@ causing all intermediate operations to be computed using the base
 type (@code{STRICT} mode).
 
 @node Default Settings,Implementation Notes,Specifying the Desired Mode,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution id59}@anchor{1c6}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1c7}
+@anchor{gnat_ugn/gnat_and_program_execution id57}@anchor{1c6}@anchor{gnat_ugn/gnat_and_program_execution default-settings}@anchor{1c7}
 @subsection Default Settings
 
 
@@ -22582,7 +22582,7 @@ checking, but it has no effect on the method used for computing
 intermediate results.
 
 @node Implementation Notes,,Default Settings,Overflow Check Handling in GNAT
-@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1c8}@anchor{gnat_ugn/gnat_and_program_execution id60}@anchor{1c9}
+@anchor{gnat_ugn/gnat_and_program_execution implementation-notes}@anchor{1c8}@anchor{gnat_ugn/gnat_and_program_execution id58}@anchor{1c9}
 @subsection Implementation Notes
 
 
@@ -22630,7 +22630,7 @@ platforms for which @code{Long_Long_Integer} is 64-bits (nearly all GNAT
 platforms).
 
 @node Performing Dimensionality Analysis in GNAT,Stack Related Facilities,Overflow Check Handling in GNAT,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id61}@anchor{16b}@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{28}
+@anchor{gnat_ugn/gnat_and_program_execution performing-dimensionality-analysis-in-gnat}@anchor{28}@anchor{gnat_ugn/gnat_and_program_execution id59}@anchor{16b}
 @section Performing Dimensionality Analysis in GNAT
 
 
@@ -23003,7 +23003,7 @@ passing (the dimension vector for the actual parameter must be equal to the
 dimension vector for the formal parameter).
 
 @node Stack Related Facilities,Memory Management Issues,Performing Dimensionality Analysis in GNAT,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{29}@anchor{gnat_ugn/gnat_and_program_execution id62}@anchor{16c}
+@anchor{gnat_ugn/gnat_and_program_execution stack-related-facilities}@anchor{29}@anchor{gnat_ugn/gnat_and_program_execution id60}@anchor{16c}
 @section Stack Related Facilities
 
 
@@ -23019,7 +23019,7 @@ particular, it deals with dynamic and static stack usage measurements.
 @end menu
 
 @node Stack Overflow Checking,Static Stack Usage Analysis,,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id63}@anchor{1ca}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{f4}
+@anchor{gnat_ugn/gnat_and_program_execution id61}@anchor{1ca}@anchor{gnat_ugn/gnat_and_program_execution stack-overflow-checking}@anchor{f4}
 @subsection Stack Overflow Checking
 
 
@@ -23064,7 +23064,7 @@ Consequently, to modify the size of the environment task please refer to your
 operating system documentation.
 
 @node Static Stack Usage Analysis,Dynamic Stack Usage Analysis,Stack Overflow Checking,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id64}@anchor{1cb}@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{f5}
+@anchor{gnat_ugn/gnat_and_program_execution static-stack-usage-analysis}@anchor{f5}@anchor{gnat_ugn/gnat_and_program_execution id62}@anchor{1cb}
 @subsection Static Stack Usage Analysis
 
 
@@ -23113,7 +23113,7 @@ subprogram whose stack usage might be larger than the specified amount of
 bytes.  The wording is in keeping with the qualifier documented above.
 
 @node Dynamic Stack Usage Analysis,,Static Stack Usage Analysis,Stack Related Facilities
-@anchor{gnat_ugn/gnat_and_program_execution id65}@anchor{1cc}@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{121}
+@anchor{gnat_ugn/gnat_and_program_execution dynamic-stack-usage-analysis}@anchor{121}@anchor{gnat_ugn/gnat_and_program_execution id63}@anchor{1cc}
 @subsection Dynamic Stack Usage Analysis
 
 
@@ -23192,7 +23192,7 @@ The package @code{GNAT.Task_Stack_Usage} provides facilities to get
 stack-usage reports at run time. See its body for the details.
 
 @node Memory Management Issues,,Stack Related Facilities,GNAT and Program Execution
-@anchor{gnat_ugn/gnat_and_program_execution id66}@anchor{16d}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{2a}
+@anchor{gnat_ugn/gnat_and_program_execution id64}@anchor{16d}@anchor{gnat_ugn/gnat_and_program_execution memory-management-issues}@anchor{2a}
 @section Memory Management Issues
 
 
@@ -23208,7 +23208,7 @@ incorrect uses of access values (including 'dangling references').
 @end menu
 
 @node Some Useful Memory Pools,The GNAT Debug Pool Facility,,Memory Management Issues
-@anchor{gnat_ugn/gnat_and_program_execution id67}@anchor{1cd}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1ce}
+@anchor{gnat_ugn/gnat_and_program_execution id65}@anchor{1cd}@anchor{gnat_ugn/gnat_and_program_execution some-useful-memory-pools}@anchor{1ce}
 @subsection Some Useful Memory Pools
 
 
@@ -23289,7 +23289,7 @@ for T1'Storage_Size use 10_000;
 @end quotation
 
 @node The GNAT Debug Pool Facility,,Some Useful Memory Pools,Memory Management Issues
-@anchor{gnat_ugn/gnat_and_program_execution id68}@anchor{1cf}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1d0}
+@anchor{gnat_ugn/gnat_and_program_execution id66}@anchor{1cf}@anchor{gnat_ugn/gnat_and_program_execution the-gnat-debug-pool-facility}@anchor{1d0}
 @subsection The GNAT Debug Pool Facility