[m-rev.] trivial-diff: Flatten conjunctions in deep profiling pass.

Paul Bone pbone at csse.unimelb.edu.au
Wed Dec 19 14:02:35 AEDT 2007


Estimated hours taken: 0.1
Branches: main

    Ensure Deep Profiling transformation keeps conjunctions flat when inserting
    instrumentation. 

    compiler/deep_profiling.m
        Call flatten_conj after transforming a list of conjuncts, since the
        deep profilier transformation creates extra conjunctions.


Index: compiler/deep_profiling.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deep_profiling.m,v
retrieving revision 1.69
diff -u -r1.69 deep_profiling.m
--- compiler/deep_profiling.m	2 Dec 2007 06:40:22 -0000	1.69
+++ compiler/deep_profiling.m	19 Dec 2007 03:09:03 -0000
@@ -34,6 +34,7 @@
 :- import_module check_hlds.mode_util.
 :- import_module check_hlds.type_util.
 :- import_module hlds.code_model.
+:- import_module hlds.goal_util.
 :- import_module hlds.hlds_goal.
 :- import_module hlds.hlds_pred.
 :- import_module hlds.hlds_rtti.
@@ -883,9 +884,10 @@
         AddedImpurity = no
     ;
         GoalExpr0 = conj(ConjType, Goals0),
-        deep_prof_transform_conj(0, Path, Goals0, Goals, AddedImpurity,
+        deep_prof_transform_conj(0, Path, Goals0, Goals1, AddedImpurity,
             !DeepInfo),
         add_impurity_if_needed(AddedImpurity, GoalInfo0, GoalInfo),
+        flatten_conj(Goals1, Goals),
         GoalExpr = conj(ConjType, Goals),
         Goal = hlds_goal(GoalExpr, 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