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

Peter Wang novalazy at gmail.com
Mon Nov 2 16:45:48 AEDT 2009


On 2009-11-01, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
> >+    % 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.

I've backed out the changes to this file.

Branches: main

compiler/live_vars.m:
        Revert check that variables needed across a call do not appear in the
        post-death set of that call.  This was breaking at least
        asm_fast.gc.decldebug.

        Revert a related change that was needed to pass the livevars_shallow2.m
        test case when the previous sanity check was enabled.

diff --git a/compiler/live_vars.m b/compiler/live_vars.m
index fb8e2cb..8dd3c4a 100644
--- a/compiler/live_vars.m
+++ b/compiler/live_vars.m
@@ -475,23 +475,10 @@ 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. We only add the typeinfo variables for nonlocal outputs.
+    % calculation.
 
-    NonLocals = goal_info_get_nonlocals(GoalInfo0),
-    set.intersect(OutVars, NonLocals, NonLocalOutVars),
     maybe_add_typeinfo_liveness(AllocData ^ ad_proc_info,
-        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")
-    ),
+        AllocData ^ ad_typeinfo_liveness, OutVars, ForwardVars0, ForwardVars),
 
     Detism = goal_info_get_determinism(GoalInfo0),
     (
--------------------------------------------------------------------------
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