[m-dev.] diff: don't invoke arg_info for RL or MLDS back-ends
Fergus Henderson
fjh at cs.mu.OZ.AU
Sat May 13 19:43:07 AEST 2000
Estimated hours taken: 0.5
compiler/mercury_compile.m:
Move the arg_info pass from the end of the middle_pass
to the start of the backend_pass, since it is only
needed for the LLDS back-end, not for the MLDS
or Aditi-RL back-ends.
Workspace: /home/pgrad/fjh/ws/hg
Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.160
diff -u -d -r1.160 mercury_compile.m
--- compiler/mercury_compile.m 2000/05/10 18:06:40 1.160
+++ compiler/mercury_compile.m 2000/05/13 09:36:55
@@ -1051,14 +1051,8 @@
mercury_compile__maybe_dead_procs(HLDS46, Verbose, Stats, HLDS48),
mercury_compile__maybe_dump_hlds(HLDS48, "48", "dead_procs"),
- % map_args_to_regs affects the interface to a predicate,
- % so it must be done in one phase immediately before code generation
-
- mercury_compile__map_args_to_regs(HLDS48, Verbose, Stats, HLDS49),
- mercury_compile__maybe_dump_hlds(HLDS49, "49", "args_to_regs"),
-
- { HLDS50 = HLDS49 },
- mercury_compile__maybe_dump_hlds(HLDS49, "50", "middle_pass").
+ { HLDS50 = HLDS48 },
+ mercury_compile__maybe_dump_hlds(HLDS50, "50", "middle_pass").
%-----------------------------------------------------------------------------%
@@ -1082,15 +1076,24 @@
% :- mode mercury_compile__backend_pass(di, uo, out, out, di, uo) is det.
:- mode mercury_compile__backend_pass(in, out, out, out, di, uo) is det.
-mercury_compile__backend_pass(HLDS0, HLDS, GlobalData, LLDS) -->
+mercury_compile__backend_pass(HLDS50, HLDS, GlobalData, LLDS) -->
+ globals__io_lookup_bool_option(verbose, Verbose),
+ globals__io_lookup_bool_option(statistics, Stats),
+
+ % map_args_to_regs affects the interface to a predicate,
+ % so it must be done in one phase immediately before code generation
+
+ mercury_compile__map_args_to_regs(HLDS50, Verbose, Stats, HLDS51),
+ mercury_compile__maybe_dump_hlds(HLDS51, "51", "args_to_regs"),
+
globals__io_lookup_bool_option(trad_passes, TradPasses),
(
{ TradPasses = no },
- mercury_compile__backend_pass_by_phases(HLDS0, HLDS,
+ mercury_compile__backend_pass_by_phases(HLDS51, HLDS,
GlobalData, LLDS)
;
{ TradPasses = yes },
- mercury_compile__backend_pass_by_preds(HLDS0, HLDS,
+ mercury_compile__backend_pass_by_preds(HLDS51, HLDS,
GlobalData, LLDS)
).
@@ -1101,11 +1104,11 @@
:- mode mercury_compile__backend_pass_by_phases(in, out, out, out, di, uo)
is det.
-mercury_compile__backend_pass_by_phases(HLDS50, HLDS99, GlobalData, LLDS) -->
+mercury_compile__backend_pass_by_phases(HLDS51, HLDS99, GlobalData, LLDS) -->
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
- mercury_compile__maybe_followcode(HLDS50, Verbose, Stats, HLDS52),
+ mercury_compile__maybe_followcode(HLDS51, Verbose, Stats, HLDS52),
mercury_compile__maybe_dump_hlds(HLDS52, "52", "followcode"),
mercury_compile__simplify(HLDS52, no, yes, Verbose, Stats,
@@ -2232,11 +2235,11 @@
:- pred mercury_compile__mlds_backend(module_info, mlds, io__state, io__state).
:- mode mercury_compile__mlds_backend(in, out, di, uo) is det.
-mercury_compile__mlds_backend(HLDS50, MLDS) -->
+mercury_compile__mlds_backend(HLDS51, MLDS) -->
globals__io_lookup_bool_option(verbose, Verbose),
globals__io_lookup_bool_option(statistics, Stats),
- mercury_compile__simplify(HLDS50, no, yes, Verbose, Stats,
+ mercury_compile__simplify(HLDS51, no, yes, Verbose, Stats,
process_all_nonimported_nonaditi_procs, HLDS53),
mercury_compile__maybe_dump_hlds(HLDS53, "53", "simplify2"),
--
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