[m-dev.] diff: fix bug in RL liveness

Simon Taylor stayl at cs.mu.OZ.AU
Wed May 19 14:43:58 AEST 1999


Estimated hours taken: 1

compiler/rl_liveness.m:
	Do the right thing for relations which are produced by
	an instruction but which are not used anywhere.

Index: rl_liveness.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/compiler/rl_liveness.m,v
retrieving revision 1.1
diff -u -u -r1.1 rl_liveness.m
--- rl_liveness.m	1998/12/06 23:45:26	1.1
+++ rl_liveness.m	1999/05/19 04:42:10
@@ -1,5 +1,5 @@
 %-----------------------------------------------------------------------------%
-% Copyright (C) 1998 University of Melbourne.
+% Copyright (C) 1998-1999 University of Melbourne.
 % This file may only be copied under the terms of the GNU General
 % Public License - see the file COPYING in the Mercury distribution.
 %-----------------------------------------------------------------------------%
@@ -423,7 +423,9 @@
 		% Produce instructions to unset all the relation variables
 		% made dead by this instruction.
 		set__difference(LiveRels, LiveRels0, KilledRels0),
-		set__to_sorted_list(KilledRels0, KilledRels),
+		set__difference(OutputSet, LiveRels0, StillBornRels),
+		set__union(KilledRels0, StillBornRels, KilledRels1),
+		set__to_sorted_list(KilledRels1, KilledRels),
 		list__map(rl_liveness__drop_rel, KilledRels, PostInstrs),
 
 		(
--------------------------------------------------------------------------
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