[m-dev.] diff: rl_code.c

Zoltan Somogyi zs at cs.mu.OZ.AU
Fri Dec 8 17:44:23 AEDT 2000


compiler/Mmakefile:
	Compile rl_code.c with -O1, not -O2.

Zoltan.

Index: Mmakefile
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.33
diff -u -b -r1.33 Mmakefile
--- Mmakefile	2000/10/31 07:53:51	1.33
+++ Mmakefile	2000/12/08 06:39:18
@@ -72,6 +72,15 @@
 MLFLAGS += --static
 endif
 
+# Compilation of rl_code.c is really slow (about 26 minutes on traveller with
+# --trace deep) at the default level of -O2, due to the C optimizer's use of
+# quadratic algorithms on a couple of 20,000-line functions (the automatically
+# generated index and compare routines on the bytecode type). The code in this
+# module can't really benefit from those algorithms anyway. With -O1, the 26
+# minutes drops to less than 26 seconds.
+
+MGNUCFLAGS-rl_code=-O1
+
 #-----------------------------------------------------------------------------#
 
 # Rules for preprocessing `.pp' files.
--------------------------------------------------------------------------
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