[m-rev.] diff: region analysis progress message

Julien Fischer juliensf at csse.unimelb.edu.au
Thu May 24 14:00:05 AEST 2007


Estimated hours taken: 0.1
Branches: main

compiler/mercury_compile.m:
 	Add a progress message for the region analysis pass.

Julien.

Index: compiler/mercury_compile.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/mercury_compile.m,v
retrieving revision 1.435
diff -u -r1.435 mercury_compile.m
--- compiler/mercury_compile.m	23 May 2007 00:17:17 -0000	1.435
+++ compiler/mercury_compile.m	24 May 2007 03:58:31 -0000
@@ -2665,7 +2665,7 @@
      maybe_dump_hlds(!.HLDS, 230, "complexity", !DumpInfo, !IO),

      % XXX This may be moved to later.
-    maybe_region_analysis(!HLDS, !IO),
+    maybe_region_analysis(Verbose, Stats, !HLDS, !IO),
      maybe_dump_hlds(!.HLDS, 240, "region_analysis", !DumpInfo, !IO),

      maybe_dump_hlds(!.HLDS, 299, "middle_pass", !DumpInfo, !IO).
@@ -4236,15 +4236,19 @@
          maybe_report_stats(Stats, !IO)
      ).

-:- pred maybe_region_analysis(module_info::in, module_info::out, io::di, 
-    io::uo) is det.
+:- pred maybe_region_analysis(bool::in, bool::in,
+    module_info::in, module_info::out, io::di, io::uo) is det.

-maybe_region_analysis(!HLDS, !IO) :-
+maybe_region_analysis(Verbose, Stats, !HLDS, !IO) :-
      module_info_get_globals(!.HLDS, Globals),
      globals.lookup_bool_option(Globals, region_analysis, Analysis),
      (
          Analysis = yes,
-        do_region_analysis(!HLDS)
+        maybe_write_string(Verbose, "% Analysing regions ...\n", !IO),
+        maybe_flush_output(Verbose, !IO),
+        do_region_analysis(!HLDS),
+        maybe_write_string(Verbose, "% done.\n", !IO),
+        maybe_report_stats(Stats, !IO)
      ;
          Analysis = no
      ).

--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list