[m-rev.] diff: move --use-local-vars from -O4 to -O1

Samrith UONG samuong at gmail.com
Thu Dec 22 11:53:49 AEDT 2005


Estimated hours taken: 0.01

compiler/options.m:
        Turn on --use-local-vars at -O1.  Benchmarking has shown that,
        at -O2, --use-local-vars results in a 3.5% increase in speed
        and a 7% decrease in size.  This is at a cost of an extra 1.5%
        in compilation time.

Index: compiler/options.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.484
diff -u -r1.484 options.m
--- compiler/options.m  19 Dec 2005 02:13:53 -0000      1.484
+++ compiler/options.m  22 Dec 2005 00:38:18 -0000
@@ -2501,6 +2501,7 @@
 % have a good payoff while still keeping compilation time small.

 opt_level(1, OptionTable, [
+    use_local_vars              -   bool(yes),
     c_optimize                  -   bool(yes),  % XXX we want `gcc -O1'
     optimize_frames             -   bool(yes),
     optimize_delay_slot         -   bool(DelaySlot),
@@ -2560,7 +2561,6 @@
 % and increases the inlining thresholds.

 opt_level(4, _, [
-    use_local_vars              -   bool(yes),
     inline_simple_threshold     -   int(8),
     inline_compound_threshold   -   int(20),
     higher_order_size_limit     -   int(30)

--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list