[m-dev.] diff: fix bug with --deep-profiling option

Fergus Henderson fjh at cs.mu.OZ.AU
Wed Oct 20 23:46:33 AEST 1999


I noticed that the compiler had grown in size by 50% recently,
from 6.2M to 9.3M on Alphas, or from 4.7M to 6.5M on x86.
I eventually tracked it down to the following...

----------

Estimated hours taken: 1

compiler/handle_options.m:
	Fix a bug in conway's recent change: it was using
	`neg_options_implies(deep_profiling, procid_stack_layout)' instead
	of `options_implies(deep_profiling, procid_stack_layout)'.
	This caused procid_stack_layout to be set by default,
	which increased code size by about 50%.

Workspace: /d-drive/home/hg/fjh/mercury
Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.80
diff -u -d -r1.80 handle_options.m
--- compiler/handle_options.m	1999/10/17 18:23:37	1.80
+++ compiler/handle_options.m	1999/10/20 13:40:06
@@ -360,7 +360,7 @@
 	),
 
 	% Deep profiling requires `procid' stack layouts
-	option_neg_implies(profile_deep, procid_stack_layout, bool(yes)),
+	option_implies(profile_deep, procid_stack_layout, bool(yes)),
 
 	% --no-reorder-conj implies --no-deforestation.
 	option_neg_implies(reorder_conj, deforestation, bool(no)),

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list