[m-rev.] for review: move analysis framework into compiler

Peter Wang novalazy at gmail.com
Fri Feb 15 15:36:18 AEDT 2008


Estimated hours taken: 1.5
Branches: main

Move the intermodule analysis framework into the `compiler' directory, in
preparation for making it specific to the Mercury compiler, rather than having
it generic in case some fictional being might want to use it with a .NET
compiler one day.  This will make it easier to use and modify.

analysis/analysis.file.m:
analysis/analysis.m:
	Move to the `compiler' directory.

analysis/README:
	Mention that the code has been moved.

analysis/.cvsignore:
analysis/.mgnuc_copts:
analysis/.mgnuc_opts:
analysis/.nocopyright:
analysis/ANALYSIS_FLAGS.in:
analysis/Mercury.options:
analysis/Mmakefile:
analysis/mer_analysis.m:
	Delete these files.

compiler/top_level.m:
	Include analysis.m as a new package.

compiler/Mercury.options:
	Add a bug workaround line from analysis/Mercury.options.

compiler/notes/compiler_design.html:
compiler/notes/overall_design.html:
	Update documentation.

Mmake.workspace:
Mmakefile:
configure.in:
compiler/.mgnuc_copts:
compiler/COMP_FLAGS.in:
compiler/Mmakefile:
deep_profiler/.mgnuc_copts:
scripts/Mmake.vars.in:
scripts/c2init.in:
scripts/mercury_config.in:
scripts/prepare_tmp_dir_fixed_part.in:
tools/binary:
tools/binary_step:
tools/bootcheck:
tools/lmc.in:
tools/make_arena:
compiler/notes/coding_standards.html:
	Remove references to analysis directory and libmer_analysis.


I would prefer the analysis*.m files to retain their history across the
move, but it's not critical.


Index: Mmake.workspace
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/Mmake.workspace,v
retrieving revision 1.29
diff -u -r1.29 Mmake.workspace
--- Mmake.workspace	23 Dec 2007 23:57:11 -0000	1.29
+++ Mmake.workspace	15 Feb 2008 02:53:30 -0000
@@ -57,7 +57,6 @@
 COMPILER_DIR = $(WORKSPACE)/compiler
 UTIL_DIR = $(WORKSPACE)/util
 ROBDD_DIR = $(WORKSPACE)/robdd
-ANALYSIS_DIR = $(WORKSPACE)/analysis
 
 # Specify the MPS "platform"
 # E.g. lii4gc means Linux, i486, gcc
@@ -85,7 +84,6 @@
 SSDB_LIB_NAME = mer_ssdb
 BROWSER_LIB_NAME = mer_browser
 MDBCOMP_LIB_NAME = mer_mdbcomp
-ANALYSIS_LIB_NAME = mer_analysis
 
 # This specifies the path to the so_locations file (or its equivalent),
 # which is used by the linker to help it to map different shared objects
Index: Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/Mmakefile,v
retrieving revision 1.131
diff -u -r1.131 Mmakefile
--- Mmakefile	4 Nov 2007 10:33:27 -0000	1.131
+++ Mmakefile	15 Feb 2008 02:55:31 -0000
@@ -40,7 +40,6 @@
 		ssdb \
 		mdbcomp \
 		browser \
-		analysis \
 		compiler \
 		doc \
 		slice \
@@ -71,7 +70,6 @@
 SSDB_LIB_NAME = mer_ssdb
 MDBCOMP_LIB_NAME = mer_mdbcomp
 BROWSER_LIB_NAME = mer_browser
-ANALYSIS_LIB_NAME = mer_analysis
 
 #-----------------------------------------------------------------------------#
 
@@ -79,7 +77,7 @@
 # `mmake depend' forces them to be remade to ensure that they are up-to-date.
 
 .PHONY: dep
-dep: dep_library dep_ssdb dep_mdbcomp dep_browser dep_analysis dep_compiler \
+dep: dep_library dep_ssdb dep_mdbcomp dep_browser dep_compiler \
 		dep_slice dep_profiler dep_deep_profiler
 
 .PHONY: dep_library
@@ -121,12 +119,6 @@
 ssdb/$(deps_subdir)$(SSDB_LIB_NAME).dep:
 	+cd ssdb && $(SUBDIR_MMAKE) $(SSDB_LIB_NAME).depend
 
-.PHONY: dep_analysis
-dep_analysis: analysis/$(deps_subdir)$(ANALYSIS_LIB_NAME).dep
-
-analysis/$(deps_subdir)$(ANALYSIS_LIB_NAME).dep:
-	+cd analysis && $(SUBDIR_MMAKE) depend
-
 .PHONY: dep_compiler
 dep_compiler: compiler/$(deps_subdir)top_level.dep
 
@@ -173,7 +165,7 @@
 
 .PHONY: depend
 depend: depend_library depend_mdbcomp depend_browser depend_ssdb \
-		depend_analysis depend_compiler \
+		depend_compiler \
 		depend_slice depend_profiler depend_deep_profiler
 
 .PHONY: depend_library
@@ -192,10 +184,6 @@
 depend_ssdb:
 	+cd ssdb && $(SUBDIR_MMAKE) depend
 
-.PHONY: depend_analysis
-depend_analysis:
-	+cd analysis && $(SUBDIR_MMAKE) depend
-
 .PHONY: depend_compiler
 depend_compiler:
 	+cd compiler && $(SUBDIR_MMAKE) depend
@@ -254,23 +242,18 @@
 ssdb: dep_ssdb scripts boehm_gc runtime library mdbcomp browser
 	+cd ssdb && $(SUBDIR_MMAKE)
 
-.PHONY: analysis
-analysis: dep_analysis scripts util boehm_gc runtime library mdbcomp browser \
-    		ssdb trace
-	+cd analysis && $(SUBDIR_MMAKE)
-
 .PHONY: runtime
 trace: scripts boehm_gc runtime library mdbcomp browser
 	+cd trace && $(SUBDIR_MMAKE)
 
 .PHONY: compiler
 compiler: dep_compiler scripts util boehm_gc runtime library \
-		mdbcomp browser ssdb trace analysis
+		mdbcomp browser ssdb trace
 	+cd compiler && $(SUBDIR_MMAKE)
 
 .PHONY: libmmc
 libmmc: dep_compiler scripts util boehm_gc runtime library \
-		mdbcomp browser ssdb trace analysis
+		mdbcomp browser ssdb trace
 	+cd compiler && $(SUBDIR_MMAKE) libmmc
 
 .PHONY: doc
@@ -296,7 +279,7 @@
 
 .PHONY: tags
 tags: tags_compiler tags_library tags_mdbcomp tags_browser tags_ssdb \
-    		tags_analysis tags_slice tags_profiler tags_deep_profiler
+    		tags_slice tags_profiler tags_deep_profiler
 
 .PHONY: tags_compiler
 tags_compiler:
@@ -318,10 +301,6 @@
 tags_ssdb:
 	+cd ssdb && $(SUBDIR_MMAKE) tags
 
-.PHONY: tags_analysis
-tags_analysis:
-	+cd analysis && $(SUBDIR_MMAKE) tags
-
 .PHONY: tags_slice
 tags_slice:
 	+cd slice && $(SUBDIR_MMAKE) tags
@@ -339,7 +318,7 @@
 # Remove from each of the listed directories mmc-generated files that don't
 # belong there.
 cleanint:
-	for dir in library mdbcomp browser ssdb analysis compiler \
+	for dir in library mdbcomp browser ssdb compiler \
 		slice profiler deep_profiler; \
 	do \
 		echo Looking for inappropriate files in the $$dir directory: ; \
@@ -418,8 +397,6 @@
 	+cd ssdb && $(SUBDIR_MMAKE) all-ints cs \
 		$(SSDB_LIB_NAME).init tags
 	+cd trace && $(SUBDIR_MMAKE) cs
-	+cd analysis && $(SUBDIR_MMAKE) depend
-	+cd analysis && $(SUBDIR_MMAKE) all-ints cs tags
 	+cd compiler && $(SUBDIR_MMAKE) depend
 	+cd compiler && $(SUBDIR_MMAKE) cs tags
 	+cd slice && $(SUBDIR_MMAKE) depend
@@ -672,9 +649,6 @@
 	touch ssdb/*.optdate
 	chmod +w ssdb/*.dep
 	touch ssdb/*.dep
-	touch analysis/*.date*
-	chmod +w analysis/*.dep
-	touch analysis/*.dep
 	touch compiler/*.date*
 	chmod +w compiler/*.dep
 	touch compiler/*.dep
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.518
diff -u -r1.518 configure.in
--- configure.in	6 Feb 2008 01:45:47 -0000	1.518
+++ configure.in	15 Feb 2008 03:07:27 -0000
@@ -2926,7 +2926,7 @@
 "using grade \`$GRADE' to compile the compiler
 	compiler and library will be rebuilt with new grade
 	installation may take a long time")
-		find library compiler browser mdbcomp analysis \
+		find library compiler browser mdbcomp \
 			profiler deep_profiler ssdb slice \
 			-name \*.c -o -name \*.c_date | \
 			xargs rm > /dev/null 2>&1
@@ -4625,7 +4625,7 @@
 to_delete=""
 if test "$BOOTSTRAP_MC" != "" ; then
     MERCURY_MSG("checking whether any C files need to be rebuilt...")
-    for directory in library compiler profiler deep_profiler mdbcomp browser analysis slice
+    for directory in library compiler profiler deep_profiler mdbcomp browser slice
     do
         mercury_check_c_files $directory $directory
         mercury_check_c_files $directory/Mercury/cs $directory/Mercury/c_dates
@@ -4780,7 +4780,6 @@
 mdbcomp/MDBCOMP_FLAGS
 browser/MDB_FLAGS
 ssdb/SSDB_FLAGS
-analysis/ANALYSIS_FLAGS
 slice/SLICE_FLAGS
 profiler/PROF_FLAGS
 deep_profiler/DEEP_FLAGS
Index: analysis/README
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/analysis/README,v
retrieving revision 1.3
diff -u -r1.3 README
--- analysis/README	22 Feb 2006 05:10:41 -0000	1.3
+++ analysis/README	15 Feb 2008 03:11:37 -0000
@@ -1,10 +1,10 @@
 -----------------------------------------------------------------------------
-| Copyright (C) 2003, 2006 The University of Melbourne.
+| Copyright (C) 2003, 2006, 2008 The 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.
 -----------------------------------------------------------------------------
 
-This directory contains an implementation of the inter-module
+This directory formerly contains an implementation of the inter-module
 analysis framework described in 
 
 	Nicholas Nethercote. The Analysis Framework of HAL,
@@ -12,6 +12,9 @@
 	University of Melbourne, September 2001, revised April 2002.
 	<http://www.cl.cam.ac.uk/~njn25/pubs/masters2001.ps.gz>.
 
+The code has now been moved into the compiler directory, in the package
+`analysis'.
+
 This framework records call and answer patterns for arbitrary analyses,
 and performs dependency analysis to force recompilation where necessary
 when modules change.
Index: compiler/.mgnuc_copts
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/.mgnuc_copts,v
retrieving revision 1.2
diff -u -r1.2 .mgnuc_copts
--- compiler/.mgnuc_copts	3 Oct 2007 23:48:15 -0000	1.2
+++ compiler/.mgnuc_copts	15 Feb 2008 02:59:13 -0000
@@ -10,5 +10,3 @@
 -I../ssdb
 -I../ssdb/Mercury/mihs
 -I../trace
--I../analysis
--I../analysis/Mercury/mihs
Index: compiler/COMP_FLAGS.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/COMP_FLAGS.in,v
retrieving revision 1.5
diff -u -r1.5 COMP_FLAGS.in
--- compiler/COMP_FLAGS.in	3 Oct 2007 23:48:15 -0000	1.5
+++ compiler/COMP_FLAGS.in	15 Feb 2008 02:59:59 -0000
@@ -7,7 +7,6 @@
 -I../browser
 -I../ssdb
 -I../mdbcomp
--I../analysis
 --c-include-directory ../boehm_gc
 --c-include-directory ../boehm_gc/include
 --c-include-directory ../runtime
@@ -20,11 +19,8 @@
 --c-include-directory ../ssdb
 --c-include-directory ../ssdb/Mercury/mihs
 --c-include-directory ../trace
---c-include-directory ../analysis
---c-include-directory ../analysis/Mercury/mihs
 --erlang-include-directory ../library/Mercury/hrls
 --erlang-include-directory ../mdbcomp/Mercury/hrls
---erlang-include-directory ../analysis/Mercury/hrls
 --erlang-include-directory ../ssdb/Mercury/hrls
 --no-main
 --config-file ../scripts/Mercury.config.bootstrap
Index: compiler/Mercury.options
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/Mercury.options,v
retrieving revision 1.33
diff -u -r1.33 Mercury.options
--- compiler/Mercury.options	30 Dec 2007 08:23:30 -0000	1.33
+++ compiler/Mercury.options	15 Feb 2008 03:49:33 -0000
@@ -51,6 +51,10 @@
 
 # Bug workarounds
 
+# XXX work around a bug that sometimes appears at -O4 and above.
+# mmc -r analysis.file.c -s asm_fast.gc -O4 --intermodule-optimisation
+MCFLAGS-analysis.file = --no-optimise-higher-order
+
 # This works around bug 32 in Mantis.
 MCFLAGS-check_hlds.check_typeclass = --no-loop-invariants
 
Index: compiler/Mmakefile
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/Mmakefile,v
retrieving revision 1.97
diff -u -r1.97 Mmakefile
--- compiler/Mmakefile	23 Dec 2007 23:57:17 -0000	1.97
+++ compiler/Mmakefile	15 Feb 2008 02:55:52 -0000
@@ -39,8 +39,7 @@
 	$(LIBRARY_DIR) \
 	$(MDBCOMP_DIR) \
 	$(BROWSER_DIR) \
-	$(SSDB_DIR) \
-	$(ANALYSIS_DIR)
+	$(SSDB_DIR)
 
 #-----------------------------------------------------------------------------#
 
@@ -66,12 +65,11 @@
 	cd $(GCC_SRC_DIR)/gcc && $(MAKE) mercury_gcc_backend_libs
 
 MCFLAGS	     += --flags COMP_FLAGS $(CONFIG_OVERRIDE)
-MLOBJS       := ../main.$O ../analysis/lib$(ANALYSIS_LIB_NAME).$A \
+MLOBJS       := ../main.$O \
 		../trace/lib$(EVENTSPEC_LIB_NAME).$A \
 		$(MLOBJS)
 ALL_MLLIBS    = $(MLLIBS) $(EXTRA_MLLIBS) $(GCC_BACKEND_LIBS)
 MLFLAGS      += --no-main --shared
-C2INITARGS   += $(ANALYSIS_DIR)/$(ANALYSIS_LIB_NAME).init
 C2INITARGS   += $(MDBCOMP_DIR)/$(MDBCOMP_LIB_NAME).init
 
 #
@@ -196,7 +194,7 @@
 ifeq ($(findstring il,$(GRADE)),il)        
 	# set the stack size to 100M -- the default of 1M is too low
 	-editbin /nologo /stack:100000000 mercury_compile$(EXT_FOR_EXE)
-	cp ../analysis/*.dll ../browser/*.dll .
+	cp ../browser/*.dll .
 endif
 
 libmercury_compile.a: lib$(MC_PROG).a
@@ -240,7 +238,7 @@
 # compiler if one of the libraries changes.
 
 ifeq ($(findstring il,$(GRADE)),il)        
-MS_CSCFLAGS=/lib:`$(FIX_PATH_FOR_CSC) ../analysis`
+MS_CSCFLAGS=/lib
 
 # This line works around an Mmake bug: mmake doesn't record
 # dependencies properly with --transitive-intermodule-optimization
@@ -254,7 +252,6 @@
 $(MC_PROG): $(SSDB_DIR)/lib$(SSDB_LIB_NAME).$A
 $(MC_PROG): $(TRACE_DIR)/lib$(TRACE_LIB_NAME).$A
 $(MC_PROG): $(TRACE_DIR)/lib$(EVENTSPEC_LIB_NAME).$A
-$(MC_PROG): $(ANALYSIS_DIR)/lib$(ANALYSIS_LIB_NAME).$A
 # XXX should also depend on $(BOEHM_GC_DIR)/libgc(_prof).$A, but only
 # if in .gc(.prof) grade
 $(MC_PROG): $(GCC_MAIN_LIBS)
@@ -272,16 +269,13 @@
 
 #-----------------------------------------------------------------------------#
 
-tags:	$(PREPROCESSED_M_FILES) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m \
-		$(ANALYSIS_DIR)/*.m
-	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m \
-		$(ANALYSIS_DIR)/*.m
+tags:	$(PREPROCESSED_M_FILES) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m
+	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m
 
 .PHONY: tags_file_exists
 tags_file_exists:
 	@if test ! -f tags; then echo making tags ; \
-	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m \
-		$(ANALYSIS_DIR)/*.m ; fi
+	$(MTAGS) $(MTAGSFLAGS) *.m $(LIBRARY_DIR)/*.m $(MDBCOMP_DIR)/*.m
 
 $(MC_PROG).stats: source_stats.awk $($(MC_PROG).ms)
 	awk -f `vpath_find source_stats.awk` \
Index: compiler/top_level.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/top_level.m,v
retrieving revision 1.8
diff -u -r1.8 top_level.m
--- compiler/top_level.m	15 May 2007 02:38:22 -0000	1.8
+++ compiler/top_level.m	15 Feb 2008 03:27:10 -0000
@@ -14,6 +14,7 @@
 :- interface.
 
 % The front-end phases.
+:- import_module analysis.
 :- import_module check_hlds.
 :- import_module hlds.
 :- import_module mode_robdd.
Index: compiler/notes/coding_standards.html
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/notes/coding_standards.html,v
retrieving revision 1.21
diff -u -r1.21 coding_standards.html
--- compiler/notes/coding_standards.html	1 Feb 2006 07:39:12 -0000	1.21
+++ compiler/notes/coding_standards.html	15 Feb 2008 03:01:58 -0000
@@ -444,7 +444,7 @@
 there should be two groups of imports,
 the imports from the compiler first and then the ones from the library.
 For the purposes of this rule,
-consider the modules of mdbcomp and analysis to belong to the compiler.
+consider the modules of mdbcomp to belong to the compiler.
 
 <p>
 
Index: compiler/notes/compiler_design.html
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/notes/compiler_design.html,v
retrieving revision 1.131
diff -u -r1.131 compiler_design.html
--- compiler/notes/compiler_design.html	30 Dec 2007 08:24:22 -0000	1.131
+++ compiler/notes/compiler_design.html	15 Feb 2008 04:01:53 -0000
@@ -27,8 +27,8 @@
 
 The main job of the compiler is to translate Mercury into C, although it
 can also translate (subsets of) Mercury to some other languages:
-Mercury bytecode (for a planned bytecode interpreter) and MSIL (for the
-Microsoft .NET platform).
+Mercury bytecode (for a planned bytecode interpreter), MSIL (for the
+Microsoft .NET platform) and Erlang.
 
 <p>
 
@@ -96,7 +96,7 @@
                <br> Package: check_hlds.m
 	  <li> 3. high-level transformations
 	       (annotated HLDS -> annotated HLDS)
-               <br> Package: transform_hlds.m
+               <br> Packages: transform_hlds.m and analysis.m
           </ul>
      <li> back-ends
           <ul type=disc>
@@ -943,7 +943,7 @@
 
 	<p>
 
-	It's also needed by the MLDS->C back-end, for
+	It's also needed by the MLDS->C back-end, for
 	--high-level-data, and for cases involving abstract
 	equivalence types which are defined as "float".
 </ul>
@@ -1123,6 +1123,16 @@
 calls to procedures (some of which are impure)
 that record profiling information.
 
+<h4> 4. Intermodule analysis framework </h4>
+
+<p>
+This is the analysis.m package.
+
+<p>
+
+The framework can be used by a few analyses in the transform_hlds.m package.
+It is documented in the analysis/README file.
+
 <hr>
 <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 
Index: compiler/notes/overall_design.html
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/notes/overall_design.html,v
retrieving revision 1.8
diff -u -r1.8 overall_design.html
--- compiler/notes/overall_design.html	24 Oct 2007 09:21:16 -0000	1.8
+++ compiler/notes/overall_design.html	15 Feb 2008 03:02:32 -0000
@@ -56,7 +56,8 @@
 <li> slice: tools for manipulating slices and dices (written in Mercury)
 <li> profiler: the Mercury profiler (written in Mercury)
 <li> deep_profiler: the Mercury deep profiler (written in Mercury)
-<li> analysis: an inter-module analysis framework (written in Mercury)
+<li> analysis: an inter-module analysis framework (written in Mercury; code
+moved to compiler)
 <li> extras: additional Mercury libraries.
 These are distributed separately from the main Mercury distribution.
 </ul>
Index: deep_profiler/.mgnuc_copts
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/deep_profiler/.mgnuc_copts,v
retrieving revision 1.2
diff -u -r1.2 .mgnuc_copts
--- deep_profiler/.mgnuc_copts	5 Dec 2007 05:38:54 -0000	1.2
+++ deep_profiler/.mgnuc_copts	15 Feb 2008 02:58:45 -0000
@@ -10,5 +10,3 @@
 -I../ssdb
 -I../ssdb/Mercury/mihs
 -I../trace
--I../analysis
--I../analysis/Mercury/mihs
Index: scripts/Mmake.vars.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/Mmake.vars.in,v
retrieving revision 1.108
diff -u -r1.108 Mmake.vars.in
--- scripts/Mmake.vars.in	5 Sep 2007 01:33:27 -0000	1.108
+++ scripts/Mmake.vars.in	15 Feb 2008 02:56:14 -0000
@@ -573,7 +573,6 @@
 int3s_subdir=$(SUBDIR)int3s/
 opts_subdir=$(SUBDIR)opts/
 trans_opts_subdir=$(SUBDIR)trans_opts/
-analysiss_subdir=$(SUBDIR)analysiss/
 requests_subdir=$(SUBDIR)requests/
 imdgs_subdir=$(SUBDIR)imdgs/
 date0s_subdir=$(SUBDIR)date0s/
@@ -612,7 +611,6 @@
 int3s_subdir=
 opts_subdir=
 trans_opts_subdir=
-analysiss_subdir=
 requests_subdir=
 imdgs_subdir=
 date0s_subdir=
Index: scripts/c2init.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/c2init.in,v
retrieving revision 1.51
diff -u -r1.51 c2init.in
--- scripts/c2init.in	23 Dec 2007 23:57:19 -0000	1.51
+++ scripts/c2init.in	15 Feb 2008 02:52:04 -0000
@@ -55,7 +55,6 @@
 BROWSER_LIB_NAME=mer_browser
 MDBCOMP_LIB_NAME=mer_mdbcomp
 SSDB_LIB_NAME=mer_ssdb
-ANALYSIS_LIB_NAME=mer_analysis
 
 MKINIT=${MERCURY_MKINIT=mkinit}
 
Index: scripts/mercury_config.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/mercury_config.in,v
retrieving revision 1.6
diff -u -r1.6 mercury_config.in
--- scripts/mercury_config.in	27 Oct 2005 01:48:24 -0000	1.6
+++ scripts/mercury_config.in	15 Feb 2008 02:54:21 -0000
@@ -145,8 +145,6 @@
 touch $TMPDIR/mdbcomp/MDBCOMP_FLAGS.in || exit 1
 mkdir $TMPDIR/browser || exit 1
 touch $TMPDIR/browser/MDB_FLAGS.in || exit 1
-mkdir $TMPDIR/analysis || exit 1
-touch $TMPDIR/analysis/ANALYSIS_FLAGS.in || exit 1
 mkdir $TMPDIR/slice || exit 1
 touch $TMPDIR/slice/SLICE_FLAGS.in || exit 1
 mkdir $TMPDIR/profiler || exit 1
Index: scripts/prepare_tmp_dir_fixed_part.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/scripts/prepare_tmp_dir_fixed_part.in,v
retrieving revision 1.1
diff -u -r1.1 prepare_tmp_dir_fixed_part.in
--- scripts/prepare_tmp_dir_fixed_part.in	28 Jan 2005 07:11:59 -0000	1.1
+++ scripts/prepare_tmp_dir_fixed_part.in	15 Feb 2008 02:56:20 -0000
@@ -23,7 +23,6 @@
 mkdir tmp_dir/tools
 cp tools/* tmp_dir/tools
 $ln_s $wd/compiler tmp_dir
-$ln_s $wd/analysis tmp_dir
 $ln_s $wd/robdd tmp_dir
 $ln_s $wd/util tmp_dir
 exit 0
Index: tools/binary
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/binary,v
retrieving revision 1.29
diff -u -r1.29 binary
--- tools/binary	30 Dec 2007 08:24:23 -0000	1.29
+++ tools/binary	15 Feb 2008 02:57:20 -0000
@@ -35,7 +35,7 @@
     -d, --dependency-only
         Make dependencies for stage3 only. Do not compile stage3.
     -D <dirname>, --dir <dirname>
-        Confine the search to one directory, library, mdbcomp, analysis
+        Confine the search to one directory, library, mdbcomp
         or compiler. (Usually useful only after a previous search.)
     -f <modulename>, --file <modulename>
         Confine the search to the named file(s).
@@ -213,12 +213,11 @@
 
 for dir in $base $trial
 do
-    for subdir in library mdbcomp analysis compiler
+    for subdir in library mdbcomp compiler
     do
         case $subdir in
             library)    example_o=builtin.o ;;
             mdbcomp)    example_o=mdbcomp.prim_data.o ;;
-            analysis)   example_o=analysis.o ;;
             compiler)   example_o=check_hlds.cse_detection.o ;;
         esac
 
@@ -275,15 +274,6 @@
 cp $root/mdbcomp/*FLAGS* .
 cp $root/mdbcomp/.mgnuc* .
 cd $root/stage2
-mkdir analysis
-cd analysis
-ln -s $root/analysis/*.m .
-ln -s $root/analysis/*.init .
-cp $root/analysis/Mmake* .
-cp $root/analysis/Mercury* .
-cp $root/analysis/*FLAGS* .
-cp $root/analysis/.mgnuc* .
-cd $root/stage2
 if "$copy_runtime"
 then
     mkdir runtime
@@ -343,15 +333,6 @@
 cp stage2.ok/mdbcomp/*.int2 stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.date stage2/mdbcomp
 cp stage2.ok/mdbcomp/*.mh stage2/mdbcomp
-# cp stage2.ok/analysis/*.d stage2/analysis
-cp stage2.ok/analysis/*.dep stage2/analysis
-cp stage2.ok/analysis/*.dv stage2/analysis
-cp stage2.ok/analysis/*.int3 stage2/analysis
-cp stage2.ok/analysis/*.date3 stage2/analysis
-cp stage2.ok/analysis/*.int stage2/analysis
-cp stage2.ok/analysis/*.int2 stage2/analysis
-cp stage2.ok/analysis/*.date stage2/analysis
-cp stage2.ok/analysis/*.mh stage2/analysis
 # cp stage2.ok/compiler/*.d stage2/compiler
 cp stage2.ok/compiler/*.dep stage2/compiler
 cp stage2.ok/compiler/*.dv stage2/compiler
@@ -407,15 +388,6 @@
     cp $root/mdbcomp/.mgnuc* .
     cp $root/mdbcomp/Mmake* .
     cd $root/stage3
-    mkdir analysis
-    cd analysis
-    ln -s $root/analysis/*.m .
-    ln -s $root/analysis/*.init .
-    cp $root/analysis/Mercury* .
-    cp $root/analysis/*FLAGS* .
-    cp $root/analysis/.mgnuc* .
-    cp $root/analysis/Mmake* .
-    cd $root/stage3
     ln -s $root/boehm_gc .
     ln -s $root/browser .
     ln -s $root/ssdb .
@@ -460,13 +432,13 @@
 
     /bin/rm .stage2_problem
     found=false
-    for testsubdir in library mdbcomp analysis compiler
+    for testsubdir in library mdbcomp compiler
     do
         if $found
         then
             echo skipping test of $testsubdir
         else
-            for subdir in library mdbcomp analysis compiler
+            for subdir in library mdbcomp compiler
             do
                 if test "$subdir" = "$testsubdir"
                 then
@@ -516,7 +488,7 @@
         exit 1
     fi
 else
-    for subdir in library mdbcomp analysis compiler
+    for subdir in library mdbcomp compiler
     do
         echo linking stage2/$subdir from stage2.ok/$subdir 1>&2
         cp stage2.ok/$subdir/*.[co] stage2/$subdir
Index: tools/binary_step
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/binary_step,v
retrieving revision 1.22
diff -u -r1.22 binary_step
--- tools/binary_step	30 Mar 2006 02:46:08 -0000	1.22
+++ tools/binary_step	15 Feb 2008 02:57:39 -0000
@@ -164,29 +164,24 @@
 
 touch stage2/library/*.c
 touch stage2/mdbcomp/*.c
-touch stage2/analysis/*.c
 touch stage2/compiler/*.c
 
 sleep 2
 
 touch stage2/library/*.int3
 touch stage2/mdbcomp/*.int3
-touch stage2/analysis/*.int3
 touch stage2/compiler/*.int3
 
 sleep 2
 
 touch stage2/library/*.date3
 touch stage2/mdbcomp/*.date3
-touch stage2/analysis/*.date3
 touch stage2/compiler/*.date3
 
 touch stage2/library/*.int2
 touch stage2/library/*.int
 touch stage2/mdbcomp/*.int2
 touch stage2/mdbcomp/*.int
-touch stage2/analysis/*.int2
-touch stage2/analysis/*.int
 touch stage2/compiler/*.int2
 touch stage2/compiler/*.int
 
@@ -194,7 +189,6 @@
 
 touch stage2/library/*.date
 touch stage2/mdbcomp/*.date
-touch stage2/analysis/*.date
 touch stage2/compiler/*.date
 
 touch stage2/library/*.opt
@@ -210,7 +204,6 @@
 touch stage2/library/*.o
 touch stage2/library/*.pic_o
 touch stage2/mdbcomp/*.o
-touch stage2/analysis/*.o
 touch stage2/compiler/*.o
 
 # Rebuild the stage2 library and compiler from the components already there.
@@ -239,15 +232,6 @@
     exit 1
 fi
 
-if (cd stage2/analysis ; mmake $mmake_opts $jfactor library)
-then
-    echo "building of stage 2 analysis successful"
-else
-    echo "building of stage 2 analysis not successful"
-    touch .stage2_problem
-    exit 1
-fi
-
 if (cd stage2/compiler ; mmake $mmake_opts $jfactor mercury_compile)
 then
     echo "building of stage 2 compiler successful"
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.203
diff -u -r1.203 bootcheck
--- tools/bootcheck	23 Dec 2007 23:57:20 -0000	1.203
+++ tools/bootcheck	15 Feb 2008 02:51:51 -0000
@@ -247,7 +247,6 @@
 BROWSER_LIB_NAME=mer_browser
 SSDB_LIB_NAME=mer_ssdb
 MDBCOMP_LIB_NAME=mer_mdbcomp
-ANALYSIS_LIB_NAME=mer_analysis
 
 while test $# -gt 0; do
     case "$1" in
@@ -717,13 +716,6 @@
         $LN_S $root/ssdb/$SSDB_LIB_NAME.init .
         $LN_S $root/ssdb/RESERVED_MACRO_NAMES .
         cd $root/$stage2dir
-        mkdir analysis
-        cd analysis
-        $LN_S $root/analysis/*.m .
-        cp $root/analysis/Mmake* $root/analysis/Mercury.options .
-        cp $root/analysis/*_FLAGS.in .
-        cp $root/analysis/.mgnu* .
-        $LN_S $root/analysis/$ANALYSIS_LIB_NAME.init .
 
         cd $root/$stage2dir
         if $copy_runtime
@@ -932,7 +924,7 @@
                 # will not run if we are using `mmc --make' so run them now.
                 if (cd $stage2dir && \
                     $MMAKE compiler/COMP_FLAGS library/LIB_FLAGS \
-                    mdbcomp/MDBCOMP_FLAGS analysis/ANALYSIS_FLAGS \
+                    mdbcomp/MDBCOMP_FLAGS \
                     profiler/PROF_FLAGS deep_profiler/DEEP_FLAGS)
                 then
                     echo "building of stage 2 flags files successful"
@@ -945,7 +937,7 @@
 
         if (cd $stage2dir && \
             $MMAKE $mmake_opts dep_library dep_mdbcomp \
-            dep_browser dep_ssdb dep_analysis dep_compiler \
+            dep_browser dep_ssdb dep_compiler \
             dep_profiler dep_deep_profiler)
         then
             echo "building of stage 2 dependencies successful"
@@ -1009,15 +1001,6 @@
             ar cr $stage2dir/trace/lib$TRACE_LIB_NAME.a
         fi
 
-        if (cd $stage2dir/analysis \
-            && $MMAKE $mmake_opts $jfactor all)
-        then
-            echo "building of stage 2 analysis successful"
-        else
-            echo "building of stage 2 analysis not successful"
-            exit 1
-        fi
-
         if (cd $stage2dir/compiler && \
             $MMAKE $mmake_opts $jfactor mercury_compile)
         then
@@ -1229,13 +1212,6 @@
     cp $root/ssdb/.mgnu* .
     $LN_S $root/ssdb/$SSDB_LIB_NAME.init .
     cd $root/$stage3dir
-    mkdir analysis
-    cd analysis
-    $LN_S $root/analysis/*.m .
-    cp $root/analysis/Mmake* $root/analysis/Mercury.options .
-    cp $root/analysis/*_FLAGS.in .
-    cp $root/analysis/.mgnu* .
-    $LN_S $root/analysis/$ANALYSIS_LIB_NAME.init .
     cd $root/$stage3dir
     $LN_S $root/$stage2dir/boehm_gc .
     $LN_S $root/$stage2dir/java .
@@ -1287,7 +1263,7 @@
     fi
 
     if (cd $stage3dir && $MMAKE $mmake_opts dep_library dep_mdbcomp \
-        dep_browser_all dep_ssdb dep_analysis dep_compiler)
+        dep_browser_all dep_ssdb dep_compiler)
     then
         echo "building of stage 3 dependencies successful"
     else
@@ -1386,26 +1362,6 @@
         fi
     fi
 
-    if (cd $stage3dir/analysis &&
-        $MMAKE $mmake_opts $jfactor all-ints &&
-        $MMAKE $mmake_opts $jfactor ${target_ext}s)
-    then
-        echo "building of stage 3 analysis successful"
-    else
-        echo "building of stage 3 analysis initially not successful"
-        df .
-        # try again, in case the failure cause was transient
-        if (cd $stage3dir/analysis &&
-            $MMAKE $mmake_opts $jfactor all-ints &&
-            $MMAKE $mmake_opts $jfactor ${target_ext}s)
-        then
-            echo "building of stage 3 analysis successful"
-        else
-            echo "building of stage 3 analysis not successful"
-            exit 1
-        fi
-    fi
-
     if (cd $stage3dir/compiler && \
         $MMAKE $mmake_opts $jfactor ${target_ext}s)
     then
@@ -1439,7 +1395,7 @@
         exec > "$outfile"   # redirect stdout to $outfile
     fi
 
-    for dir in library mdbcomp browser ssdb analysis compiler; do
+    for dir in library mdbcomp browser ssdb compiler; do
         # `mmake cs' in the compiler directory doesn't build
         # `top_level_init.c', so we only compare the `.c'
         # files present in the stage 3 directory.
Index: tools/lmc.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/lmc.in,v
retrieving revision 1.13
diff -u -r1.13 lmc.in
--- tools/lmc.in	12 Nov 2007 02:16:50 -0000	1.13
+++ tools/lmc.in	15 Feb 2008 02:57:44 -0000
@@ -171,5 +171,4 @@
 	-I $WORKSPACE/library \
 	-I $WORKSPACE/mdbcomp \
 	-I $WORKSPACE/ssdb \
-	-I $WORKSPACE/analysis \
 	$CDEBUG_FLAGS $C_FLAGS $INIT_FLAGS $LIB_FLAGS $LINK_FLAGS "$@"
Index: tools/make_arena
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/tools/make_arena,v
retrieving revision 1.5
diff -u -r1.5 make_arena
--- tools/make_arena	2 Aug 2005 03:14:54 -0000	1.5
+++ tools/make_arena	15 Feb 2008 02:57:51 -0000
@@ -20,7 +20,7 @@
 cp compiler/*.m arena
 
 # copy the interface files and possibly optimization files they will need
-for dir in library mdbcomp analysis compiler
+for dir in library mdbcomp compiler
 do
 	cp $dir/*.int* arena
 	cp $dir/*.*opt arena > /dev/null 2>&1

--------------------------------------------------------------------------
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