[m-rev.] diff: fix another bug in repeated indirect reuse

Peter Wang novalazy at gmail.com
Fri Jul 18 13:16:51 AEST 2008


Estimated hours taken: 6
Branches: main

compiler/structure_reuse.indirect.m:
	When we find that we can't call a reuse version of a procedure, we
	need to remove any reuse annotation on the call goal which may have
	been set in previous passes.  We weren't doing that in a spot,
	which could lead to invalid calls to reuse procedures.

diff --git a/compiler/structure_reuse.indirect.m b/compiler/structure_reuse.indirect.m
index b204a05..c033096 100644
--- a/compiler/structure_reuse.indirect.m
+++ b/compiler/structure_reuse.indirect.m
@@ -907,7 +907,8 @@ verify_indirect_reuse_conditional(BaseInfo, CalleePPId, NoClobbers, CalleeArgs,
             add_request(BaseInfo, CalleePPId, NotDeadArgNums, IntraModule,
                 !IrInfo),
             (
-                IntraModule = yes
+                IntraModule = yes,
+                goal_info_set_reuse(no_reuse_info, !GoalInfo)
             ;
                 IntraModule = no,
                 goal_info_set_reuse(no_possible_reuse, !GoalInfo)


--------------------------------------------------------------------------
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