[m-rev.] for review: fix delay death and parallel conjunctions
Julien Fischer
juliensf at cs.mu.OZ.AU
Mon Jul 3 15:51:38 AEST 2006
On Fri, 30 Jun 2006, Peter Wang wrote:
> Estimated hours taken: 6
> Branches: main
>
> compiler/liveness.m:
> Fix the deadness pass's handling of parallel conjunctions.
The log message should mention what was wrong with it.
> This was causing problems with later passes (delay death and resume
> point detection) because variables were appearing in the pre-death
> and post-death sets that they shouldn't have.
>
> Also make detect_deadness_in_par_conj look more similar to
> detect_deadness_in_disj and detect_deadness_in_cases.
Is this just a cosmetic change?
> Revert the previous change to delay_death_par_conj which was
> unnecessary and caused problems with nested parallel conjunctions and
> --delay-death.
>
> tests/par_conj/Mercury.options:
> tests/par_conj/Mmakefile:
> tests/par_conj/par_ddeath.exp:
> tests/par_conj/par_ddeath.m:
> tests/par_conj/par_ddeath_2.exp:
> tests/par_conj/par_ddeath_2.m:
> Add test cases.
>
>
...
> retrieving revision 1.1
> diff -u -r1.1 Mercury.options
> --- tests/par_conj/Mercury.options 28 Jun 2006 06:13:12 -0000 1.1
> +++ tests/par_conj/Mercury.options 30 Jun 2006 04:38:04 -0000
> @@ -0,0 +1,2 @@
> +MCFLAGS-par_ddeath = --trace deep
> +MCFLAGS-par_ddeath_2 = --trace deep
I would put a short comment there explaining why those test cases need to
be compiled with deep tracing, e.g
# These test cases are compiled with --trace deep because they
# are regression tests for a bug that only shows up with deep
# tracing.
...
> Index: tests/par_conj/par_ddeath.m
> ===================================================================
> RCS file: tests/par_conj/par_ddeath.m
> diff -N tests/par_conj/par_ddeath.m
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ tests/par_conj/par_ddeath.m 30 Jun 2006 11:42:42 -0000
> @@ -0,0 +1,30 @@
> +% There was a problem with this file when --trace deep was used,
> +% due to a bug in the --delay-death pass.
> +%
> +% Uncaught Mercury exception:
> +% Software Error: map.lookup: key not found
> +% Key Type: term.var(parse_tree.prog_data.prog_var_type)
> +% Key Value: var(6)
> +% Value Type: ll_backend.var_locn.var_state
> +
I find it helpful if the comments at the head of regression tests explain
what the cause of the bug was.
The rest of that looks okay.
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list