Commit Graph

15 Commits

Author SHA1 Message Date
Simon Taylor
319df48866 Remove the RM_C mmake variable, which controlled whether the intermediate
Estimated hours taken: 0.5
Branches: main

Remove the RM_C mmake variable, which controlled whether the intermediate
`.c' files were removed (now they never are).

The implementation was buggy (it didn't work with parallel makes), and
made it difficult to avoid always recompiling the `.c' file with smart
recompilation.

Mmake.common.in:
configure.in:
README.AIX:
bindist/bindist.build_vars.in:
bindist/bindist.configure.in:
scripts/Mmake.vars.in:
scripts/Mmake.rules:
compiler/modules.m:
tools/bootcheck:
tools/binary_step:
*/Mmakefile:
	Remove references to RM_C, DEFAULT_RM_C and LIBRARY_RM_C.

compiler/modules.m:
	The `.o' and `.pic_o' file now depends only on the `.c' file,
	not on everthing the `.c' file depends on. The extra dependencies
	were only needed because the intermediate `.c' file could
	be removed by RM_C. This change is needed to avoid recompiling
	unchanged `.c' files with smart recompilation.
2001-05-18 14:23:59 +00:00
Zoltan Somogyi
bdc7c0ce09 Improvements to the infrastructure for debugging code generator changes.
Estimated hours taken: 5

Improvements to the infrastructure for debugging code generator changes.

tools/binary:
	If either stage2.ok or stage2.bad is missing object files, then do not
	complain: instead, recreate the missing object files.

	Fix a bug: copy the library's .pic_o files together with its .o files.

	Fix a bug: make sure that we link *all* the possible relevant .init
	files from the runtime to the stage2 directory.

	If the search narrows down to one file, and the script is trying to
	find out which part of the file is in error, then consider all the
	parts that are identical between the stage2.ok and stage2.bad to be
	known good from the start. This can reduce the number of bootchecks
	needed by one or two.

tools/binary:
tools/binary_step:
	Allow the test to be the successful compilation of the stage 3 library
	directory. (In almost all cases, bad stage 2 compilers fail while
	compiling the stage 3 library. By not compiling the stage 3 compiler
	if the compilation of the stage 3 library succeeds, we can save a lot
	of time.)

	If the search narrows down to one file, and the script is trying to
	find out which part of the file is in error, watch out for errors that
	prevent the stage 2 executable from being built. If such an error
	occurs, then stop right then and there. In such cases, there is no
	point in further binary search, since each further invocation of
	binary_step will just indicate that the source files in stage2.bad and
	stage2.ok are not compatible (e.g. because they do not use the same
	mapping from static term numbers to static term contents.)

tools/binary_step:
	Reduce the time for declaring a program to be in an infinite loop,
	since the slowest machine we may want to use is faster now.

tools/makebatch:
	Fix some glaring bugs: e.g. test uses -lt, not < for comparisons.

	Add an option, --stop-at-failure, that stops makebatch if a bootcheck
	fails and thus preserves the stage[23] directories involved in the
	failure. This allows one to verify that a change works in many grades
	without sacrificing the ability to debug any problems.

	Add another option --c-files, that gathers the C files created
	in each bootcheck. This allows the C files to be compared, e.g.
	for efficiency problems.
2000-07-19 03:45:11 +00:00
Zoltan Somogyi
8c10d06c2d Update the binary script and its helper to accommodate the changes
Estimated hours taken: 0.5

tools/binary:
tools/binary_step:
	Update the binary script and its helper to accommodate the changes
	in the compilation environment in the last year or so.
2000-03-28 10:43:20 +00:00
David Overton
ed91b801be Fix some scripts in the tools directory to work with the new
Estimated hours taken: 0.5

Fix some scripts in the tools directory to work with the new
directories and library names.

tools/binary:
tools/binary_step:
tools/linear:
	Update these scripts to work properly with the new browser and
	trace directories and the renamed libraries.

Mmake.common.in:
scripts/c2init.in:
scripts/ml.in:
	Add tools/binary, tools/binary_step and tools/linear to the
	list of files that know about library names.
1998-10-09 05:41:58 +00:00
Zoltan Somogyi
d5c77800ad Add a new option, -d <dir> or --test-dir <dir>, which runs tests
Estimated hours taken: 0.2

tools/bootcheck:
	Add a new option, -d <dir> or --test-dir <dir>, which runs tests
	only in the named directory. This is most useful in conjunction
	with -T, when you want to know whether a change in the runtime
	or test setup is sufficient to cure a problem in a given test dir.

	Reorder option handling to be alphabetical.

	When -T is given, and the script does not do a bootstrap check,
	do not treat this as the failure of the bootstrap check.

tools/binary_step:
	Simplify the code a bit.
1998-05-12 06:05:49 +00:00
Zoltan Somogyi
d1e7095432 Fix a bug: don't use the stage3 libraries when running test cases
Estimated hours taken: 0.1

binary_step:
	Fix a bug: don't use the stage3 libraries when running test cases
	unless we have actually created the stage3 libraries.
1997-05-12 01:50:57 +00:00
Zoltan Somogyi
f8874facc1 Add a capability to compare stage3 to stage2.bad, not just to stage.ok,
Estimated hours taken: 1

binary_step:
	Add a capability to compare stage3 to stage2.bad, not just to stage.ok,
	for use when the stage3 compilation uses the Mmake parameters from
	stage2.bad.

	Fix a bug: when cleaning out the stage3 directories, remove not
	just the source and interface files but also the date stamp and
	optimization files.

binary:
	Add a capability to generate stage3 using the Mmake parameters from
	stage2.bad, with success being judged by comparing stage3 to
	stage2.bad.

	Use $RMSTAGECMD to remove the old stage2 if it is defined.
1997-04-08 06:10:47 +00:00
Zoltan Somogyi
b7f2bb587f Construct a stage3 before starting the search for the bug.
Estimated hours taken: 1

binary:
	Construct a stage3 before starting the search for the bug.
	We used to be able to rely on a stage3 being already present,
	but this reliance has been misplaced since Fergus's modification
	to bootcheck that deletes stage3 on success.

binary_step:
	Impose a limit of 10 CPU-minutes on every process, to catch
	malfunctioning compilers that don't crash but go into infinite loops.
1997-01-10 05:11:43 +00:00
Zoltan Somogyi
c762e51648 Add a option, -d. When used, the successful making of the stage3
Estimated hours taken: 0.5

binary, binary_step:
	Add a option, -d. When used, the successful making of the stage3
	dependencies is taken to indicate the absence of the bug being searched
	for.
1996-12-21 08:24:10 +00:00
Zoltan Somogyi
a9a3814123 Users of the "binary" script so far could choose between testing the
Estimated hours taken: 1

Users of the "binary" script so far could choose between testing the
correctness of the cobbled-together stage2 compiler by attempting to
create a stage3 compiler, or by running all the tests in some directories.

This change adds a third alternative: checking whether a command executes
successfully. This is useful if the symptom of failure of the stage2
compiler is that it aborts when compiling some file.
1996-11-06 06:00:47 +00:00
Zoltan Somogyi
7a3f8d3a1c Link to absolute, not relative path names, since relative path names
Estimated hours taken: 2

bootcheck, binary, linear:
	Link to absolute, not relative path names, since relative path names
	do not work back across symbolic links.

binary, linear:
	Allow the user to give an initial list of suspects.

assemble, binary, linear:
	Allow negative searches, i.e. searches in which the base version is
	the bad version and we want to see which module "fixes" the problem
	caused by the other modules, as opposed to normal searches in which
	we are looking for the module that introduces the problem.
1996-05-29 11:00:24 +00:00
Zoltan Somogyi
88927c049c Fix a stupid oversight.
Estimated hours taken: 0.1

binary_step:
	Fix a stupid oversight.
1996-05-14 07:01:45 +00:00
Zoltan Somogyi
b221d25b52 <overview or general description of changes>
Estimated hours taken: 1

<overview or general description of changes>

<directory>/<file>:
	<detailed description of changes>
1996-05-13 05:10:23 +00:00
Zoltan Somogyi
4f3bf86a00 I moved the scripts bootcheck, binary, binary_step, divide and assemble
Estimated hours taken: 0.5

I moved the scripts bootcheck, binary, binary_step, divide and assemble
into the tools subdirectory from the main mercury directory.
I also added the auxiliary scripts appears, cleanint and half.

I modified binary and binary_step to compare stage3 with stage2.ok,
and only pass a stage2 compiler if the comparison finds no differences.
This requires that the Mmake.params files be copied, not linked, from
the top level's Mmake.stage2.params. The old behavior (no comparison)
is still available; just specify -c (compile-only).
1996-05-12 04:39:01 +00:00
Zoltan Somogyi
ea788e0453 Rename BRANCH_DELAY_SLOT to HAVE_DELAY_SLOT.
Estimated hours taken: 6

configure.in:
	Rename BRANCH_DELAY_SLOT to HAVE_DELAY_SLOT.

bootcheck:
	Add a new option, -r. If given, this makes a copy of the runtime
	directory instead of linking to it in stage[23]. This allows the
	stage[23] versions to use a different grade than stage1.

	Another change is that we now remake only the library and compiler
	dependencies, but not the profiler dependencies.

binary:
	A shell script to find code generation and optimization bugs by
	performing binary search. It depends on the existence of two
	directories, stage2.ok and stage2.bad, containing correct and buggy
	versions of stage2, and tries different mixes of .c code from each
	until it locates the offending part of the offending .c file.

	Note that this script has so far been tested only in pieces.

binary_step:
	Check whether a particular mix of .c files from the ok and bad
	directories is able to build a stage3 compiler. It doesn't check
	for differences from stage2, since stage2 is a patchwork.

divide:
	Divide a .c file into its parts.

assemble:
	Assemble a .c file, with the specified parts coming from the .c file
	in stage2.bad and the others from stage2.ok.

NOTE: these scripts require some other auxiliary scripts. I will put these
into /usr/local/contrib when it is created on cyclone. In the meantime,
they are in ~zs/bin/script.
1996-04-24 00:58:09 +00:00