Commit Graph

723 Commits

Author SHA1 Message Date
Julien Fischer
f8384a1b21 Build the 0.13.1 release.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Build the 0.13.1 release.
2006-12-01 03:32:37 +00:00
Julien Fischer
804a08a5d1 Use gcc 3.4.6 for the nightly builds on aral.
tools/test_mercury:
	Use gcc 3.4.6 for the nightly builds on aral.
2006-11-27 06:45:32 +00:00
Julien Fischer
733e530260 On x86 machines bison generated code and global registers cause
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	On x86 machines bison generated code and global registers cause
	internal errors in versions of gcc < 3.4.  Use gcc 3.4 on jupiter,
	earth and swordfish in order to avoid these problems.
2006-11-27 03:09:28 +00:00
Zoltan Somogyi
9ec86d6a6d The objective of this diff is to switch from a table of solver events built
Estimated hours taken: 32
Branches: main

The objective of this diff is to switch from a table of solver events built
into the compiler (and eventually the debugger) into a table of events
defined by a file provided by the user to the compiler, which the compiler
then records in the executable for use by the debugger.

The current design, for speed of implementation, uses temporary files parsed
by a bison-generated parser. Since the compiler needs to be able to invoke
the parser even if it is compiled in a non-debug grade, the parser is in
a new library, the eventspec library, that is always linked into the Mercury
compiler and is always linked into any Mercury program with debugging enabled
(but is of course linked only once into a Mercury compiler which has debugging
enabled).

Modify the debugger to give it the ability to print the attributes of
user-defined events (for now, only the non-synthesized attributes).
Implement a new debugger command, "user", which goes to the next user-defined
event.

configure.in:
	Require flex and and bison to be available.

doc/user_guide.texi:
	Document user defined events and the new debugger capabilities.

doc/mdb_categories:
	Include "user" in the list of forward movement commands.

	Fix some earlier omissions in that list.

runtime/mercury_stack_layout.h:
	Include an event number in the user-defined event structure.

	Include a string representing an event set specification in module
	layout structures.

runtime/mercury_stack_layout.h:
runtime/mercury_trace_base.[ch]:
runtime/mercury_types.h
	Switch from solver events to user events in names.

runtime/mercury_trace_term.[ch]:
	Provide a representation of flat terms, for use in representing
	the calls that generate synthesized attributes.

	Ensure that exported field names have an MR_ prefix.

browser/cterm.m:
	Conform to the change to runtime/mercury_trace_term.h.

scripts/c2init.in:
scripts/ml.in:
	Include the eventspec library in programs compiled with debugging
	enabled.

compiler/Mmakefile:
	Include the eventspec library in the compiler.

compiler/options.m:
	Add a new option, --event-spec-file-name, that allows the user to
	specify the set of user-defined events the program may use.

compiler/handle_options.m:
	Set this optimization from an environment variable (which may be
	set by the mmc script) if the new option is not explicitly given.

compiler/prog_data.m:
	Define the data structures for the compiler's representation of the
	event set specification.

	Move some definitions around to group them more logically.

compiler/hlds_module.m:
	Include the event set specification as a new field in the module_info.

compiler/prog_event.m:
	Add the code for invoking the parser in the eventspec library,
	and for converting the simple term output by the parser to the
	compiler own representation, which contains more information
	(to wit, the types of the function attributes) and which has had
	a whole bunch of semantic checks done on it (e.g. whether synthesized
	attributes depend on themselves or on nonexistent attributes).

	Provide a function to generate a canonicalized version of the event
	specification file.

compiler/module_qual.m:
compiler/equiv_type.m:
	Process event spec specifications as well as items, to module qualify
	the names of the types of event arguments, and expanding out
	equivalence types.

	In equiv_type.m, rename some variables to make clear what kind of info
	they represent.

compiler/mercury_compile.m:
	Process the event set specification file if one has been selected:
	read it in, module qualify it, expand its equivalence types, and add
	to the module_info.

compiler/compile_target_code.m:
	Include the event_spec library when linking debuggable executables.

compiler/call_gen.m:
compiler/continuation_info.m:
compiler/trace_gen.m:
compiler/trace_params.m:
mdbcomp/prim_data.m:
mdbcomp/trace_counts.m:
runtime/mercury_goto.h:
	Generate user-defined events instead of solver events.

compiler/layout.m:
compiler/layout_out.m:
compiler/stack_layout.m:
	Include a canonicalized version of the event specification file
	in the module layout if the module has any user-defined events.

compiler/code_info.m:
compiler/llds_out.m:
compiler/modes.m:
compiler/modules.m:
compiler/opt_debug.m:
compiler/typecheck.m:
	Conform to the changes above.

compiler/passes_aux.m:
	Rename a predicate to avoid an ambiguity.

trace/Mmakefile:
	Add the definition and rules required to build the eventspec library.

trace/mercury_event_scanner.l:
trace/mercury_event_parser.y:
	A scanner and a parser for reading in event spec specifications.

trace/mercury_event_spec_missing.h:
	Provide the declarations that should be (but aren't) provided by
	flex and bison.

trace/mercury_event_spec.[ch]:
	The main module of the eventspec library. Provides functions to read
	in event set specifications from a file, and to write them out as a
	Mercury term in the form needed by the compiler.

trace/mercury_trace_tables.c:
	If the module layouts being registered include event set
	specifications, then check their consistency. Make the specification
	and the consistency indication available to other modules.

trace/mercury_trace_internal.c:
	During initialization, if the modules contain a consistent set of event
	set specifications, then read that specification into the debugger.
	(We don't yet make use of this information.)

	Add an extra mdb command, "user", which goes forward to the next
	user-defined event.

trace/mercury_trace.[ch]:
trace/mercury_trace_cmd_forward.[ch]:
	Implement the new mdb command.

trace/mercury_trace_vars.[ch]:
	For user-defined events, include the attributes' values among the
	values that can be printed or browsed.

trace/mercury_trace_cmd_browsing.c:
trace/mercury_trace_declarative.c:
	Minor changes.

scripts/scripts/prepare_tmp_dir_grade_part:
	Copy the .y and .l files to the tmp dir we use for installs.

tools/bootcheck:
	Copy the .y and .l files of the trace directory to stage 2.

tools/lmc.in:
	Include the eventspec library when linking debuggable executables.

tests/debugger/user_event.{m,inp,exp}:
tests/debugger/user_event_spec:
	New test case to test the new functionality.

tests/debugger/Mercury.options:
tests/debugger/Mmakefile:
	Enable the new test case.

tests/debugger/completion.exp:
	Expect the new "user" mdb command in the completion output.
2006-11-24 03:48:30 +00:00
Zoltan Somogyi
82eab0e65e Add an optional pass that tries to avoid generating too many parallel goals.
Estimated hours taken: 12
Branches: main

Add an optional pass that tries to avoid generating too many parallel goals.
The first transformation implemented by this pass is to transform parallel
conjunctions into goals of the form

	( queues already contain lot of work ->
		sequential version of parallel conjunction
	;
		parallel conjunction as before
	)

if they contain recursive calls.

The effect of this transformation is to reduce the overhead of the new par_fib
test case from:

	fib(35): sequential 189 vs parallel 5770

to

	fib(35): sequential 189 vs parallel 1090

i.e. a speedup of more than a factor of five.

compiler/granularity.m:
	New module that implements this transformation. I intend to add other,
	more sophisticated transformations in the future.

compiler/transform_hlds.m:
	Add granularity.m as one of the submodules of transform_hlds.m.

compiler/mercury_compile.m:
	Invoke the new pass.

	Invoke dep_par_conj only if needed.

	Fix some stage numbers.

compiler/notes/compiler_design.html:
	Document the new module.

	Document some modules that should have been documented earlier.

	Fix a hurried deletion of a reference to the Aditi backend.

compiler/goal_util.m:
	Add some utility functions for use by the new module.

compiler/simplify.m:
	Record the information mercury_compile.m needs in order to check
	whether we have any parallelism for granularity.m and dep_par_conj.m
	to process.

compiler/hlds_module.m:
	Add a slot to the module_info to record the information from
	simplify.m. Clean up some interfaces.

compiler/add_type.m:
	Conform to the change to hlds_module.m.

compiler/dependency_graph.m:
	Delete unnecessary module qualifications, and rename some predicates
	to avoid potential ambiguities.

compiler/options.m:
	Add the options required for controlling the new transformation.

	Rename an option's internal name to avoid conflict with a language
	keyword (the user-visible name remains unchanged).

	Move some options around to put them in logical groups.

doc/user_guide.texi:
	Document the new options.

	Fix some omissions in some earlier options.

compiler/handle_options.m:
compiler/termination.m:
	Conform to the option rename.

compiler/quantification.m:
	Rename some predicates to avoid ambiguities.

library/par_builtin.m:
	Add a predicate for use by the new transformation.

tests/par_conj/par_fib.{m,exp}:
	A new test case: a version of fib for use in testing parallelism.

tests/par_conj/Mmakefile:
	Enable the new test case.
2006-11-03 08:31:22 +00:00
Ian MacLarty
abfb4ff8bd Copy the mdbcomp modules used by the slice tools to the slice
Estimated hours taken: 1
Branches: main

Copy the mdbcomp modules used by the slice tools to the slice
directory before building the slice tools.

Disable tracing for all modules in the slice directory so that mtc_union
doesn't blow its stack when called during coverage testing of the compiler.

slice/Mmakefile:
	Copy mdbcomp modules to the slice directory before building
	the slice tools.

slice/SLICE_FLAGS.in:
	Add --force-disable-tracing.

tools/bootcheck:
	Copy SLICE_FLAGS.in to the stage 2 slice directory.
2006-10-16 07:06:08 +00:00
Julien Fischer
47251378a4 Don't build asm_jump.gc on saturn. We were only building it
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Don't build asm_jump.gc on saturn.  We were only building it
	in case there were problems with asm_jump.par.gc.

	Don't build asm_jump.par.gc on earth - no one is using it
	and building/testing it just chews up cycles unecessarily.
2006-10-09 06:23:04 +00:00
Julien Fischer
c11ea5c584 Remove stuff related to the clp(r) interface.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Remove stuff related to the clp(r) interface.  This has been disabled
	for over a year now and in any case we no longer support the
	interface.
2006-10-09 06:18:34 +00:00
Peter Wang
c3cf6b4c84 Install asm_fast.par.gc on saturn instead of asm_jump.par.gc, as the
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Install asm_fast.par.gc on saturn instead of asm_jump.par.gc, as the
	reason for using the latter has gone away since shared libraries were
	enabled on x86_64.
2006-10-05 07:09:18 +00:00
Zoltan Somogyi
863874df85 Document my recent change implementing coverage testing.
Estimated hours taken: 6
Branches: main

Document my recent change implementing coverage testing. At the same time,
eliminate the old hack that allowed a file containing a list of file names to
be considered a trace count file. We haven't needed it since the addition of
mtc_union, and it can lead to incomprensible error messages. (The presence
of the old hack made documenting coverage testing harder.)

In the process, fix the tools code for rerunning failed test cases only.

doc/user_guide.texi:
	Document my recent change implementing coverage testing, and the
	elimination of the old hack.

mdbcomp/trace_counts.m:
	Modify the predicates for reading in trace count files along the lines
	above.

mdbcomp/slice_and_dice.m:
	Modify the predicates for reading in slices and dices along the lines
	above.

	Rename some function symbols to avoid ambiguities.

compiler/tupling.m:
slice/mcov.m:
slice/mtc_diff.m:
slice/mtc_union.m:
trace/mercury_trace_declarative.c:
	Conform to the changes above.

slice/mcov.m:
	Fix the usage message, which referred to this program by its old name
	mct.

	Allow the output to be restricted to a set of named modules only.
	This is to make testing easier.

slice/mtc_diff.m:
	Rename the long form of the -o option from --out to --output-file,
	to make it consistent with the other programs.

tests/run_one_test:
tools/bootcheck:
	Modify the algorithm we use to gather trace counts for the Mercury
	compiler from both passed and failed test cases to run mtc_union
	periodically instead of gathering all the trace counts file and keeping
	them to the end (which takes far too much disk space).

	Fix an old bug: gather trace counts from executions of the Mercury
	compiler only.

tests/debugger/Mmakefile:
tests/debugger/dice.passes:
	Modify the dice test case to compute the union of the trace counts for
	the passed versions of this test case to use mtc_union to create
	dice.passes, instead of having dice.passes statically contain the list
	of the names of the passed trace count files (since that capability
	is deleted by this diff).

tools/bootcheck:
tests/Mmake.common:
	Fix the code for rerunning failed tests only.

mdbcomp/prim_data.m:
	Eliminate some ambiguities in predicate names.

compiler/*.m:
	Conform to the change to prim_data.m.

compiler/error_util.m:
	Add reading files as a phase in error messages.

compiler/mercury_compile.m:
	Use the new facilities in error_util for printing an error message.
2006-10-02 05:21:44 +00:00
Julien Fischer
fdc65336ed Start building 0.13.1-beta.
Estimated hours taken: 0
Branches: main

tool/test_mercury:
	Start building 0.13.1-beta.
2006-10-02 03:48:05 +00:00
Julien Fischer
34c48f824b earth and ceres can go back to running nightly tests only
Estimated hours taken: 0
Branches: main

tools/run_all_tests_from_cron:
	earth and ceres can go back to running nightly tests only
	on the main branch.
2006-09-29 07:21:20 +00:00
Zoltan Somogyi
b82b599ec3 Implement coverage testing. The output format is a bit crude, but people
Estimated hours taken: 60
Branches: main

Implement coverage testing. The output format is a bit crude, but people
have been asking for this capability.

The main problem tackled in this diff is that coverage testing requires
gathering information from a lot of program executions, and the execution count
files for all these executions require a huge amount of disk space. We now
therefore put a limit on the number of files we keep; when this limit is
exceeded, the program execution that reaches the limit will automatically
summarize all these files back into a single file before it exits.

This diff also tackles the same problem along a different axis by changing
the format of execution count files to make them smaller. One way is to factor
out and represent just once some information that is common to many procedures:
the file name and the module name. Another is to abbreviate some keywords,
e.g. "fproc" instead of "proc function". The third is not to write out the
defining module's name unless it differs from the declaring module's name,
which it almost never does. (The two differ only when the compiler is invoked
with intermodule optimization, and creates a specialized version of a predicate
in a module other than its home module.)

Since we are changing the trace count file format anyway, make another change
useful for coverage testing: record the entire provenance of the trace counts
in the file, including the name of the program and what files went into unions
and diffs of trace count files.

When doing coverage testing of the compiler, the compiler *must* be in a debug
grade. However, the tools for summarizing trace files, invoked from the
compiler executable when the compiler is being coverage tested, *cannot* be
in debug grade, because debug grade disables tail recursion, and without tail
recursion the summarization program runs out of stack space. This diff
therefore arranges for the slice directory to not be affected by the parameters
applying to the rest of the workspace (including the top level Mmake.params).

Mmakefile:
	Don't apply the top level mmake's parameters to recursive mmakes in
	the slice directory.

	Factor out some common code.

configure.in:
	Require that the installed compiler contain the renamed standard
	library function names installed by my diff on Sep 20, since the
	slice directory needs them, and cannot get them from the workspace.

mdbcomp/trace_counts.m:
	Update the parsing code to parse the new format for trace count files,
	and update the code for writing out trace counts to generate the new
	format.

	Replace the proc_label_and_filename type with the proc_label_in_context
	type, which makes it easier to keep track of the current module as well
	as the current file (this is required by the new, more compact format
	for trace count files).

	When considering the union of multiple trace counts files, keep track
	of whether they contained all counts or just the nonzero counts. This
	requires keeping track of this info for single files as well.

	Provide ways to represent and to compute differences between trace
	count files, to support the new program in slice/mtc_diff.m.

mdbcomp/slice_and_dice.m:
	Reformat to conform to our Mercury style guide.

	Conform to the change to trace_counts.m.

compiler/tupling.m:
	Conform to the change to mdbcomp.

runtime/mercury_wrapper.c:
	Implement the new option values used to implement coverage testing.
	These allow control of the limit on the number of execution count
	files, and collecting execution counts only from a specified
	executable.

	Add MR_ prefixes.

runtime/mercury_trace_base.[ch]:
	Provide the mechanism for summarizing execution counts when we reach
	the limit on the number of execution counts files.

	Update the code that writes out trace counts files to generate
	the new format for trace counts files. Make this code take the boolean
	that says whether to include labels with zero counts in the output
	as an explicit parameter, not as a global variable.

	Break up an excessively large function.

scripts/mtc:
	Add the options needed to control the process of automatic
	summarization of trace counts files.

slice/.mgnuc_copts:
slice/.mgnuc_opts:
slice/SLICE_FLAGS.in:
	Make these files empty, since we don't want to refer to the rest of the
	workspace. (We could delete them as well, but CVS doesn't handle
	resurrection of deleted files very well, and we don't want to burn any
	bridges.)

slice/Mmakefile:
	Add the new executables, and make the code in this directory
	independent of the other directories in the workspace.

	Since we need the code of the modules in the mdbcomp directory
	but don't want to link to the object files in that directory (since
	the grades may differ), make copies of those modules in this directory.

slice/mcov.m:
	Add this module, the code for the Mercury coverage test tool.

slice/mtc_diff.m:
	Add this module, the code for computing the diff between two trace
	counts files. The intended use is to compare two trace counts files
	dumped at different stages of execution. (Since foreign_procs can be
	used to invoke the C functions in the runtime that write out the trace
	counts files in the middle of a program's execution, not just the end.)

slice/mdice.m:
slice/mslice.m:
slice/mtc_union.m:
	Convert to four space indentation.

tools/bootcheck:
	Since the slice directory's grade is independent of the grade of the
	other directories, don't copy it to the stage2 and stage3 by default.
	If it is copied, then still compile it (and otherwise handle it)
	separate from the other directories.

	Add an option for gathering coverage test data during bootchecking.
2006-09-22 03:50:48 +00:00
Mark Brown
2f42cff828 Use umask 022 instead of 002.
tools/test_mercury:
	Use umask 022 instead of 002.
2006-09-19 04:21:20 +00:00
Julien Fischer
9f7b859596 Set the CURRENT_RELEASE and BETA_RELEASE variables.
Estimated hours taken: 0
Branches: main

tools/generate_index_html:
	Set the CURRENT_RELEASE and BETA_RELEASE variables.
2006-09-14 05:03:18 +00:00
Julien Fischer
15b0cf519e Build the 0.13 release as opposed to the 0.13 beta release.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Build the 0.13 release as opposed to the 0.13 beta release.
2006-09-14 04:01:41 +00:00
Julien Fischer
3772449177 Enable the deep profiling grades on the nightly builds.
tools/test_mercury:
	Enable the deep profiling grades on the nightly builds.
2006-08-21 02:16:52 +00:00
Julien Fischer
ee98c1c2cd Disable the deep profiler on the ROTD host until the deep profiling
tools/test_mercury:
	Disable the deep profiler on the ROTD host until the deep profiling
	grade is fixed.
2006-08-19 16:13:47 +00:00
Julien Fischer
54ab609483 Disable installation of the .profdeep grades on swordfish.
tools/test_mercury:
	Disable installation of the .profdeep grades on swordfish.
2006-08-18 03:18:13 +00:00
Julien Fischer
595c87abf7 Disable installation of the .profdeep grades until compilation
tools/test_mercury:
	Disable installation of the .profdeep grades until compilation
	of the stdlib in those grades is fixed.
2006-08-17 07:19:44 +00:00
Peter Wang
c6a14c35b0 Upgrade to version 7.0 alpha 6 (CVS 2006-08-14) of the Boehm garbage
Estimated hours taken: 5
Branches: main

Upgrade to version 7.0 alpha 6 (CVS 2006-08-14) of the Boehm garbage
collector.  The main reason is that thread-local allocation is not
supported on Solaris in version 6.x of the collector.

boehm_gc/*:
	Merge in changes from the vendor branch.

.README.in:
	Update Boehm GC version number and copyright notice.

Mmake.common.in:
configure.in:
runtime/RESERVED_MACRO_NAMES:
scripts/mgnuc.in:
	Don't define `THREAD_LOCAL_ALLOC' nor `GC_REDIRECT_TO_LOCAL' as
	thread-local allocation is automatically enabled in gc 7.0.

	Consistently use `GC_WIN32_THREADS' and `GC_LINUX_THREADS' as the
	non-prefixed versions of those symbols are deprecated.

	Don't define `NO_SIGNALS' as it is no longer necessary.

	Add librt to the list of thread libraries on Solaris.  This is
	needed for the POSIX semaphore functions now used on Solaris.

runtime/mercury_prof_mem.c:
runtime/mercury_prof_mem.h:
	Update comments mentioning `NO_SIGNALS'.

compiler/compile_target_code.m:
	Make `--inline-alloc' do nothing as inline allocation is currently
	broken in gc 7.0.

runtime/mercury.h:
runtime/mercury_heap.h:
	Include `gc_inline.h' instead of `gc_inl.h' as the latter no longer
	exists.

extras/concurrency/semaphore.m:
library/par_builtin.m:
robdd/bryant.c:
	Replace instances of `GC_PTR' by `void *' as the former no longer
	exists.

runtime/mercury_wrapper.c:
	Remove references to `GC_quiet' which no longer exists.

	Replace uses of `GC_quiet' for the MPS collector by a new variable
	`MR_mps_quiet'.

tools/bootcheck:
	Copy libatomic_ops-related files and directories when copying
	boehm_gc.
2006-08-15 04:19:40 +00:00
Julien Fischer
eb00fcfdea Add `--linkage shared' to the list of flags used for x86 Unix.
tools/test_mercury:
	Add `--linkage shared' to the list of flags used for x86 Unix.
2006-08-11 08:24:12 +00:00
Zoltan Somogyi
3f8079a928 Add par_conj to the list of test directories.
Estimated hours taken: 0.1
Branches: main

tools/bootcheck:
	Add par_conj to the list of test directories.
2006-07-25 09:42:14 +00:00
Peter Wang
ebcb219631 Install asm_jump.par.gc on saturn and earth in place of
tools/test_mercury:
	Install asm_jump.par.gc on saturn and earth in place of
	asm_fast.par.gc.  Also install asm_jump.gc on saturn.
2006-06-30 14:13:34 +00:00
Zoltan Somogyi
c8ecf55983 Allow the -d option to be set once and for all.
Estimated hours taken: 0.1
Branches: main

tools/makebatch:
	Allow the -d option to be set once and for all.
2006-06-08 02:51:54 +00:00
Julien Fischer
bba37bf4ac Update for version 0.3.1 of Mercury for g12.
tools/test_mercury:
	Update for version 0.3.1 of Mercury for g12.
2006-05-12 05:08:41 +00:00
Julien Fischer
49f4994356 Update the version of libc on jupiter.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Update the version of libc on jupiter.
2006-04-27 08:14:43 +00:00
Zoltan Somogyi
0625a15744 Delete the option for testing the split library, since we don't support
Estimated hours taken: 0.1
Branches: main

tools/bootcheck:
	Delete the option for testing the split library, since we don't support
	--split-c-files anymore.
2006-04-24 04:20:39 +00:00
Julien Fischer
abe2cf5897 Quote the default grade for the g12 release correctly.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Quote the default grade for the g12 release correctly.
2006-04-07 06:14:10 +00:00
Julien Fischer
ba93d10247 Set up for building the next g12 Mercury relase.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Set up for building the next g12 Mercury relase.

tools/run_all_tests_from_cron:
	Test the release branch on earth and ceres.
2006-04-07 05:30:50 +00:00
Julien Fischer
acb0122d24 Test the release branch on saturn every other day.
Estimated hours taken: 0
Branches: main

tools/run_all_tests_from_cron:
	Test the release branch on saturn every other day.
2006-04-06 07:35:48 +00:00
Julien Fischer
dead1d6c03 Begin building 0.13-betas on jupiter. (I'll sort the other machines out later
Estimated hours taken: 0.1
Branches: main

tools/run_all_tests_from_cron:
	Begin building 0.13-betas on jupiter.  (I'll sort the other machines out later
	this week.)
2006-04-02 04:36:10 +00:00
Zoltan Somogyi
4fe703c7b9 Implement a more cache-friendly translation of lookup switches.
Estimated hours taken: 8
Branches: main

Implement a more cache-friendly translation of lookup switches. Previously,
for a switch such as the one in

	:- pred p(foo::in, string::out, bar::out, float::out) is semidet.

	p(d, "four", f1, 4.4).
	p(e, "five", f2, 5.5).
	p(f, "six", f4("hex"), 6.6).
	p(g, "seven", f5(77.7), 7.7).

we generated three static cells, one for each argument, and then indexed
into each one in turn to get the values of HeadVar__2, HeadVar__3 and
HeadVar__4. The different static cells each represent a column here.
Each of the loads accessing the columns will access a different cache block,
so with this technique we expect to get as many cache misses as there are
output variables.

This diff changes the code we generate to use a vector of static cells
where each cell represents a row. The assignments to the output variables
will now access the different fields of a row, which will be next to each
other. We thus expect only one cache miss irrespective of the number of output
variables, at least up to the number of variables that actually fit into one
cache block.

compiler/global_data.m:
	Provide a mechanism for creating not just single (scalar) static cells,
	but arrays (vectors) of them.

compiler/lookup_switch.m:
	Use the new mechanism to generate code along the lines described above.

	Put the information passed between the two halves of the lookup switch
	implementation (detection and code generation) into an opaque data
	structure.

compiler/switch_gen.m:
	Conform to the new interface of lookup_switch.m.

compiler/ll_pseudo_type_info.m:
compiler/stack_layout.m:
compiler/string_switch.m:
compiler/unify_gen.m:
compiler/var_locn.m:
	Conform to the change to global_data.m.

compiler/llds.m:
	Define the data structures for holding vectors of static cells. Rename
	the function symbols we used to use to refer to static cells to make
	clear that they apply to scalar cells only. Provide similar mechanisms
	for representing static cell vectors and references to them.

	Generalize heap_ref heap references to allow the index to be computed
	at runtime, not compile time. For symmetry's sake, do likewise
	for stack references.

compiler/llds_out.m:
	Add the code required to write out static cell vectors.

	Rename decl_ids to increase clarity and avoid ambiguity.

compiler/code_util.m:
compiler/exprn_aux.m:
	Modify code that traverses rvals to now also traverse the new rvals
	inside memory references.

compiler/name_mangle.m:
	Provide the prefix for static cell vectors.

compiler/layout_out.m:
compiler/rtti_out.m:
compiler/opt_debug.m:
	Conform to the change to data_addrs and decl_ids.

compiler/code_info.m:
	Provide access to the new functionality in global_data.m, and conform
	to the change to llds.m.

	Provide a utility predicate needed by lookup_switch.m.

compiler/hlds_llds.m:
	Fix the formatting of some comments.

tools/binary:
tools/binary_step:
	Fix the bit rot that has set in since they were last used (the rest
	of the system has changed quite a lot since then). I had to do so
	to debug one part of this change.

tests/hard_coded/dense_lookup_switch2.{m,exp}:
tests/hard_coded/dense_lookup_switch3.{m,exp}:
	New test cases to exercise the new algorithm.

tests/hard_coded/Mmakefile:
	Enable the new test cases, as well as an old one (from 1997!)
	that seems never to have been enabled.
2006-03-30 02:46:08 +00:00
Julien Fischer
f0a20b6a61 Prepare for building the 0.13 beta releases.
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	Prepare for building the 0.13 beta releases.
2006-03-29 05:41:29 +00:00
Julien Fischer
730e38745c s/asm_fast.gc.par/asm_fast.par.gc/ otherwise
tools/test_mercury:
	s/asm_fast.gc.par/asm_fast.par.gc/ otherwise
	the garabage collector gets built with the wrong name.
2006-03-09 23:52:21 +00:00
Julien Fischer
3300aa4196 Run the nightly tests in asm_fast.gc.par on saturn and earth.
Estimated hours taken: 0
Branches: main

Run the nightly tests in asm_fast.gc.par on saturn and earth.

tools/test_mercury:
	Remove stuff related to the machines we borrowed over summer.

	Install asm_fast.gc.par on saturn and earth.

tests/tabling/Mmakefile:
	Disable these tests in the lowlevel .par grades since tabling doesn't
	(currently) work properly in them.
2006-03-08 13:24:39 +00:00
Zoltan Somogyi
d36b33d525 Delete the option -M, which had no effect (it set the variable
Estimated hours taken: 0.1
Branches: main

tools/bootcheck:
	Delete the option -M, which had no effect (it set the variable
	make_opts that was never consulted). Instead of putting -k (the
	keep-going flag) in the ignored make_opts variable, put it in the
	mmake_opts variable (which is used). This used to be the default;
	I don't know when it was screwed up.
2006-02-24 03:56:28 +00:00
Mark Brown
f8003105ae Prepare for the 0.2.0 release of g12.
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	Prepare for the 0.2.0 release of g12.
2006-02-16 03:00:07 +00:00
Julien Fischer
c92c75522f Only test the main branch on mundroo and mundula.
tools/run_all_test_from_cron:
	Only test the main branch on mundroo and mundula.
2006-02-06 12:16:48 +00:00
Julien Fischer
2858f1f4a4 Make sure we don't try and install the il grade on the Linux machines
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Make sure we don't try and install the il grade on the Linux machines
	that have Portable.NET installed.  Eventually we would like to do this
	but it doesn't work at the moment :-(
2006-02-06 05:12:16 +00:00
Mark Brown
369f3cbb2a More changes to support a g12 release. The version should be a
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	More changes to support a g12 release.  The version should be a
	fixed string, and not include the date.
2006-01-30 04:30:49 +00:00
Julien Fischer
d13356c38e Add the trailing directory to the list of test dirs.
Estimated hours taken: 0
Branches: main

tools/bootcheck:
	Add the trailing directory to the list of test dirs.

tests/README:
	Add a note that the bootcheck script may need to be updated
	if a new (sub)directory is added to the test suite.

tests/Mmake.common:
	Fix an overlong line.
2006-01-25 07:03:44 +00:00
Julien Fischer
f525e30e90 Build the 0.12.2 release instead of 0.12.2-beta.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Build the 0.12.2 release instead of 0.12.2-beta.
2006-01-25 03:03:00 +00:00
Mark Brown
e973fc4570 Fix a syntax error in my last change.
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	Fix a syntax error in my last change.
2006-01-24 06:27:12 +00:00
Mark Brown
40b090dc13 Further updates for building a g12 release of Mercury.
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	Further updates for building a g12 release of Mercury.
2006-01-24 06:18:28 +00:00
Julien Fischer
ad955ce3f8 Install hlc.gc.tr.memprof on swordfish.
Estimated hours taken: 0.1
Branches: main

tools/test_mercury:
	Install hlc.gc.tr.memprof on swordfish.
2006-01-18 04:55:47 +00:00
Julien Fischer
63ceb2e287 Build the g12 branch at -O2.
Estimated hours taken: 0
Branches: main

tools/test_mercury:
	Build the g12 branch at -O2.
2006-01-17 05:26:33 +00:00
Julien Fischer
c7b6b8c843 Add support for building a "g12" rotd. This will be a specially
Estimated hours taken: 0.5
Branches: main

tools/test_mercury:
	Add support for building a "g12" rotd.  This will be a specially
	tagged version of the main branch that will be used for the upcoming
	g12 release.  swordfish will be the g12 rotd host.  The default grade
	for the g12 rotd will be a trailing grade (currently hlc.gc.tr).
2006-01-17 05:18:21 +00:00
Peter Wang
1084c5d940 Make the --use-mmc-make' and --use-subdirs' options to the bootcheck
Estimated hours taken: 1
Branches: main

tools/bootcheck:
	Make the `--use-mmc-make' and `--use-subdirs' options to the bootcheck
	script affect the stage 1 compiler.  Previously it affected stages 2
	and 3 only.

	This means if you built the stage 1 compiler with `mmake
	--use-mmc-make' then you can avoid rebuilding it when it comes time to
	bootcheck by running `bootcheck --use-mmc-make'.  On the other hand,
	you lose the ability to build the stage 1 compiler with plain `mmake'
	but stages 2 and 3 with `mmake --use-mmc-make'.
2006-01-11 06:07:07 +00:00
Peter Wang
964ffbb950 These changes allow the compiler to be built with `mmake --use-mmc-make'.
Estimated hours taken: 2
Branches: main

These changes allow the compiler to be built with `mmake --use-mmc-make'.

*/Mmakefile:
	Add dummy rules for optional `Mmake.*.params' files so that
	`mmc --make' is not asked to make them.

library/INTER_FLAGS_MMC_MAKE:
library/Mmakefile:
	Add a version of the `library/INTER_FLAGS' file to be used when
	`mmc --make' is being used.

library/LIB_FLAGS.in:
	Add `--c-include-directory ../robdd' so that `mmc --make' can find
	the included C files for `robdd.m'.

tools/bootcheck:
	Make `bootcheck --use-mmc-make' imply `bootcheck --use-subdirs'.

	Copy `INTER_FLAGS_MMC_MAKE' to stage 2 and stage 3 directories.

	Manually make `*_FLAGS' files in the stage 2 directory if
	`--use-mmc-make' is in effect.
2005-12-16 05:49:40 +00:00