[m-rev.] for review: --trace shallow variable liveness problem (2)

Julien Fischer juliensf at csse.unimelb.edu.au
Sun Nov 1 20:39:27 AEDT 2009


On Wed, 28 Oct 2009, Peter Wang wrote:

> diff --git a/compiler/live_vars.m b/compiler/live_vars.m
> index 6e5edeb..fb8e2cb 100644
> --- a/compiler/live_vars.m
> +++ b/compiler/live_vars.m
> @@ -475,30 +475,36 @@ build_live_sets_in_call(OutVars, GoalInfo0, GoalInfo, ResumeVars0, AllocData,
>     set.difference(Liveness, OutVars, ForwardVars0),
>
>     % Might need to add more live variables with typeinfo liveness
> -    % calculation.
> +    % calculation. We only add the typeinfo variables for nonlocal outputs.
>
> +    NonLocals = goal_info_get_nonlocals(GoalInfo0),
> +    set.intersect(OutVars, NonLocals, NonLocalOutVars),
>     maybe_add_typeinfo_liveness(AllocData ^ ad_proc_info,
> -        AllocData ^ ad_typeinfo_liveness, OutVars, ForwardVars0, ForwardVars),
> +        AllocData ^ ad_typeinfo_liveness, NonLocalOutVars,
> +        ForwardVars0, ForwardVars),
> +
> +    % Sanity check.
> +    goal_info_get_post_deaths(GoalInfo0, PostDeaths0),
> +    set.intersect(PostDeaths0, ForwardVars, Intersect),
> +    ( set.empty(Intersect) ->
> +        true
> +    ;
> +        unexpected(this_file,
> +            "build_live_sets_in_call: ForwardVars intersects post-death set")
> +    ),

This sanity check is being tripped when compiling the tree234 module in
asm_fast.gc.decldebug (with --intermodule-optimisation -O5 --opt-space,
but most of that is probably incidental.)

If this is not something that is easily fixed, could you please back
this out -- it's breaking the nightly builds on a lot of our mcahines.

Julien.

...

% Generating code for predicate
% `tree234.IntroducedFrom__pred__do_from_sorted_assoc_list__3199__1'/2
% Generating code for predicate
% `tree234.IntroducedFrom__pred__do_from_sorted_assoc_list__3246__1'/2
% Generating code for predicate
% `tree234.IntroducedFrom__pred__do_from_rev_sorted_assoc_list__3307__1'/2
% Generating code for predicate
% `tree234.IntroducedFrom__pred__do_from_rev_sorted_assoc_list__3340__1'/2
% Generating code for predicate
% `tree234.IntroducedFrom__pred__do_from_rev_sorted_assoc_list__3387__1'/2
% Generating code for predicate `tree234.TypeSpecOf__pred__set3__[K =
% var(V_2)]_1_1'/4
% Generating code for predicate `tree234.TypeSpecOf__pred__set2__[K =
% var(V_2)]_1_1'/4
% Generating code for predicate `tree234.TypeSpecOf__pred__update__[K =
% int]_0_1'/4
% Generating code for predicate `tree234.TypeSpecOf__pred__update__[K =
% var(V_2)]_0_1'/4
% Generating code for predicate `tree234.TypeSpecOf__pred__set__[K =
% var(V_2)]_0_1'/4
% Generating code for predicate
% `tree234.TypeSpecOf__pred_or_func__lookup__[K = var(V_2)]_0_1'/3
Uncaught Mercury exception:
Software Error: live_vars.m: Unexpected: build_live_sets_in_call:
ForwardVars intersects post-death set
Stack dump not available in this grade.
--------------------------------------------------------------------------
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