[m-dev.] switch LCO off ?

Fergus Henderson fjh at cs.mu.OZ.AU
Sat Oct 3 00:54:32 AEST 1998


On 02-Oct-1998, Erwan Jahier <Erwan.Jahier at irisa.fr> wrote:
> Is there a way to switch LCO off ?

Well, you can use the `--no-optimize-jumps' option.
But that disables more than just LCO.
If you want to disable just LCO, then you need to
modify the relevant part of the source code in compiler/jumpopt.m.
I think the patch below will do that, but I haven't tested it.

--- jumpopt.m	Sat Jul 25 21:57:11 1998
+++ jumpopt.m.new	Sat Oct  3 00:53:13 1998
@@ -198,6 +198,7 @@
 		Uinstr0 = call(Proc, label(RetLabel), GC, CallModel)
 	->
 		(
+/**********
 			% Look for det style tailcalls. We look for this
 			% even if the call is semidet because one of the
 			% optimizations below turns a pair of semidet epilogs
@@ -238,6 +239,7 @@
 			],
 			RemainInstrs = Instrs0
 		;
+**********/
 			% Short circuit the return label if possible.
 			map__search(Instrmap, RetLabel, RetInstr)
 		->

-- 
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.



More information about the developers mailing list