[m-rev.] diff: enable dead proc elim if automatic intermod optimization

Peter Ross pro at missioncriticalit.com
Mon Oct 27 05:09:13 AEDT 2003


Hi,


===================================================================


Estimated hours taken: 3
Branches: main

If intermodule optimization is automatically enabled, automatically
enable dead proc elimination to remove the unecessary procs.

compiler/handle_options.m:
	When intermodule optimization is automatically enabled, set
	optimize_dead_procs.


Index: compiler/handle_options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/handle_options.m,v
retrieving revision 1.188
diff -u -r1.188 handle_options.m
--- compiler/handle_options.m	20 Oct 2003 07:29:05 -0000	1.188
+++ compiler/handle_options.m	26 Oct 2003 18:03:06 -0000
@@ -361,6 +361,9 @@
 	%	  so that abstract equivalence types can be expanded.  They
 	%	  need to be expanded because .NET requires that the structural
 	%	  representation of a type is known at all times.
+	%   - dead procedure optimization
+	%   	  intermodule optimization pulls in a lot of code which isn't
+	%   	  needed, so ensure that this dead code is removed.
 
 	( { Target = il } ->
 		globals__io_set_gc_method(none),
@@ -379,7 +382,8 @@
 
 		( { HighLevelData = yes, AutoIntermodOptimization = yes } ->
 			globals__io_set_option(intermodule_optimization,
-					bool(yes))
+					bool(yes)),
+			globals__io_set_option(optimize_dead_procs, bool(yes))
 		;
 			[]
 		)
@@ -433,6 +437,9 @@
 	%	  so that abstract equivalence types can be expanded.  They
 	%	  need to be expanded because Java requires that the structural
 	%	  representation of a type is known at all times.
+	%   - dead procedure optimization
+	%   	  intermodule optimization pulls in a lot of code which isn't
+	%   	  needed, so ensure that this dead code is removed.
 	( { Target = java } ->
 		globals__io_set_gc_method(none),
 		globals__io_set_option(reclaim_heap_on_nondet_failure,
@@ -451,7 +458,8 @@
 
 		( { AutoIntermodOptimization = yes } ->
 			globals__io_set_option(intermodule_optimization,
-					bool(yes))
+					bool(yes)),
+			globals__io_set_option(optimize_dead_procs, bool(yes))
 		;
 			[]
 		)

-- 
Peter Ross		
Software Engineer                                (Work)   +32 2 757 10 15
Mission Critical                                 (Mobile) +32 485 482 559
--------------------------------------------------------------------------
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