[m-dev.] for review: make llds_common.m disable-able
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Oct 19 00:59:20 AEST 1999
Zoltan, could you please review this one?
----------
Estimated hours taken: 0.75
Make the llds_common.m optimization disable-able.
compiler/options.m:
Add a new option `--common-data' which enables that
optimization; this option is set at `-O2' and higher.
compiler/mercury_compile.m:
Only invoke llds_common if --common-data is set.
doc/user_guide.texi:
Document the new option.
Workspace: /d-drive/home/hg/fjh/mercury
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.139
diff -u -r1.139 mercury_compile.m
--- compiler/mercury_compile.m 1999/10/05 20:21:31 1.139
+++ compiler/mercury_compile.m 1999/10/18 12:53:00
@@ -2059,6 +2059,7 @@
ModuleName, CompileErrors) -->
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
+ globals__io_lookup_bool_option(common_data, CommonData),
{ base_type_info__generate_llds(HLDS0, TypeCtorInfos) },
{ base_type_layout__generate_llds(HLDS0, HLDS1, TypeCtorLayouts) },
{ stack_layout__generate_llds(HLDS1, HLDS, GlobalData,
@@ -2068,7 +2069,13 @@
{ global_data_get_all_non_common_static_data(GlobalData,
NonCommonStaticData) },
{ list__append(StaticLayouts, TypeCtorLayouts, StaticData0) },
- { llds_common(Procs0, StaticData0, ModuleName, Procs1, StaticData1) },
+ ( { CommonData = yes } ->
+ { llds_common(Procs0, StaticData0, ModuleName, Procs1,
+ StaticData1) }
+ ;
+ { StaticData1 = StaticData0 },
+ { Procs1 = Procs0 }
+ ),
{ list__append(StaticData1, NonCommonStaticData, StaticData) },
{ list__condense([TypeCtorInfos, PossiblyDynamicLayouts, StaticData],
AllData) },
Index: compiler/options.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/options.m,v
retrieving revision 1.269
diff -u -r1.269 options.m
--- compiler/options.m 1999/09/30 08:55:11 1.269
+++ compiler/options.m 1999/10/18 14:56:10
@@ -318,6 +318,7 @@
; follow_vars
; allow_hijacks
% - LLDS
+ ; common_data
; optimize
; optimize_peep
; optimize_jumps
@@ -660,6 +661,7 @@
allow_hijacks - bool(yes),
% LLDS
+ common_data - bool(no),
optimize - bool(no),
optimize_peep - bool(no),
optimize_jumps - bool(no),
@@ -1017,6 +1019,7 @@
long_option("allow-hijacks", allow_hijacks).
% LLDS optimizations
+long_option("common-data", common_data).
long_option("llds-optimize", optimize).
long_option("llds-optimise", optimize).
long_option("optimize-peep", optimize_peep).
@@ -1285,6 +1288,7 @@
inline_simple - bool(yes),
inline_single_use - bool(yes),
inline_compound_threshold - int(10),
+ common_data - bool(yes),
common_struct - bool(yes),
user_guided_type_specialization
- bool(yes),
@@ -2112,6 +2116,8 @@
options_help_llds_llds_optimization -->
io__write_string("\n Low-level (LLDS -> LLDS) optimizations:\n"),
write_tabbed_lines([
+ "--no-common-data",
+ "\tDisable optimization of common data structures.",
"--no-llds-optimize",
"\tDisable the low-level optimization passes.",
"--optimize-dead-procs",
Index: doc/user_guide.texi
===================================================================
RCS file: /home/mercury1/repository/mercury/doc/user_guide.texi,v
retrieving revision 1.186
diff -u -r1.186 user_guide.texi
--- doc/user_guide.texi 1999/10/07 09:31:05 1.186
+++ doc/user_guide.texi 1999/10/18 14:56:25
@@ -3567,6 +3567,9 @@
low-level intermediate code before emitting C code.
@table @code
+ at item --no-common-data
+Disable optimization of common data structures.
+
@item --no-llds-optimize
Disable the low-level optimization passes.
--
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