[m-rev.] diff: misc cleanups in simplify and hlds_pred

Zoltan Somogyi zs at csse.unimelb.edu.au
Mon Mar 3 08:59:32 AEDT 2008


More misc cleanups prompted by mantis #48. There are no algorithmic changes.

compiler/hlds_pred.m:
compiler/simplify.m:
	Replace some bools with purpose-specific types.

	In simplify.m, turn structure field getters from predicates to
	functions. (Doing the same in hlds_pred.m would be a much bigger job.)

	Record in proc_infos whether a predicate has any trace goals, just as
	we record whether it has user events. This is not used yet, but could
	be used in the future.

compiler/common.m:
	Give a type a more specific name.

	Update some old comments.

	Conform to the changes above.

compiler/deforest.m:
compiler/dep_par_conj.m:
compiler/distance_granularity.m:
compiler/granularity.m:
compiler/hlds_out.m:
compiler/implicit_parallelism.m:
compiler/inlining.m:
compiler/lambda.m:
compiler/pd_util.m:
compiler/proc_gen.m:
compiler/trace_gen.m:
compiler/trace_params.m:
	Conform to the changes above.

Zoltan.

cvs diff: Diffing .
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/libatomic_ops-1.2
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/doc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/gcc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/hpc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/ibmc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/icc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/msftc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/src/atomic_ops/sysdeps/sunc
cvs diff: Diffing boehm_gc/libatomic_ops-1.2/tests
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing boehm_gc/windows-untested
cvs diff: Diffing boehm_gc/windows-untested/vc60
cvs diff: Diffing boehm_gc/windows-untested/vc70
cvs diff: Diffing boehm_gc/windows-untested/vc71
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
Index: compiler/common.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/common.m,v
retrieving revision 1.105
diff -u -b -r1.105 common.m
--- compiler/common.m	28 Feb 2008 06:08:29 -0000	1.105
+++ compiler/common.m	29 Feb 2008 03:35:31 -0000
@@ -173,13 +173,14 @@
                 seen_calls              :: seen_calls
             ).
 
-    % A struct_map maps a principal type constructor and a cons_id of that
-    % type to information about cells involving that cons_id.
+    % A struct_map is a two stage map that maps first a principal type
+    % constructor and then a cons_id of that type to information about
+    % cells involving that cons_id.
     %
     % The reason why we need the principal type constructors is that two
-    % syntactically identical structures have compatible representations if and
-    % only if their principal type constructors are the same.  For example, if
-    % we have:
+    % syntactically identical structures have compatible representations
+    % if and only if their principal type constructors are the same.
+    % For example, if we have:
     %
     %   :- type maybe_err(T) ---> ok(T) ; err(string).
     %
@@ -191,22 +192,17 @@
     % The two occurrences of `err(X)' have types `maybe_err(int)'
     % and `maybe(float)', but we know that they have the same
     % representation.
-    %
-    % We put the cons_id first in the pair because there are more cons_ids
-    % than type constructors, and hence comparisons involving cons_ids are
-    % more likely to fail. This should ensure that failed comparisons in map
-    % searches fail as soon as possible.
 
-:- type cons_id_map  ==  map(cons_id, structures).
 :- type struct_map  ==  map(type_ctor, cons_id_map).
+:- type cons_id_map  ==  map(cons_id, list(common_struct)).
 
     % Given a unification X = f(Y1, ... Yn), we record its availability for
-    % reuse by creating structure(X, [Y1, ... Yn]), and putting it at the
-    % front of the list of structures for the entry for f and X's type_ctor.
+    % reuse by creating common_struct(X, [Y1, ... Yn]), and putting it at the
+    % front of the list of common_structs for the entry for f and X's type
+    % constructor.
 
-:- type structures == list(structure).
-:- type structure
-    --->    structure(prog_var, list(prog_var)).
+:- type common_struct
+    --->    common_struct(prog_var, list(prog_var)).
 
 :- type seen_calls  ==  map(seen_call_id, list(call_args)).
 
@@ -280,7 +276,7 @@
 common_optimise_construct(Var, ConsId, ArgVars, Mode, GoalExpr0, GoalExpr,
         GoalInfo0, GoalInfo, !Info) :-
     Mode = LVarMode - _,
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     mode_get_insts(ModuleInfo, LVarMode, _, Inst),
     (
         % Don't optimise partially instantiated construction unifications,
@@ -293,7 +289,7 @@
         GoalInfo = GoalInfo0
     ;
         TypeCtor = lookup_var_type_ctor(!.Info, Var),
-        simplify_info_get_common_info(!.Info, CommonInfo0),
+        CommonInfo0 = simplify_info_get_common_info(!.Info),
         VarEqv0 = CommonInfo0 ^ var_eqv,
         list.map_foldl(eqvclass.ensure_element_partition_id,
             ArgVars, ArgVarIds, VarEqv0, VarEqv1),
@@ -311,7 +307,7 @@
             find_matching_cell_construct(Structs, VarEqv1, ArgVarIds,
                 OldStruct)
         ->
-            OldStruct = structure(OldVar, _),
+            OldStruct = common_struct(OldVar, _),
             sveqvclass.ensure_equivalence(Var, OldVar, VarEqv1, VarEqv),
             CommonInfo = CommonInfo0 ^ var_eqv := VarEqv,
             simplify_info_set_common_info(CommonInfo, !Info),
@@ -334,7 +330,7 @@
         ;
             GoalExpr = GoalExpr0,
             GoalInfo = GoalInfo0,
-            Struct = structure(Var, ArgVars),
+            Struct = common_struct(Var, ArgVars),
             record_cell_in_maps(TypeCtor, ConsId, Struct, VarEqv1, !Info)
         )
     ).
@@ -347,7 +343,7 @@
 
 common_optimise_deconstruct(Var, ConsId, ArgVars, UniModes, CanFail, Mode,
         GoalExpr0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     (
         % Don't optimise partially instantiated deconstruction unifications,
         % because it would be tricky to work out how to mode the replacement
@@ -360,7 +356,7 @@
         GoalExpr = GoalExpr0
     ;
         TypeCtor = lookup_var_type_ctor(!.Info, Var),
-        simplify_info_get_common_info(!.Info, CommonInfo0),
+        CommonInfo0 = simplify_info_get_common_info(!.Info),
         VarEqv0 = CommonInfo0 ^ var_eqv,
         eqvclass.ensure_element_partition_id(Var, VarId, VarEqv0, VarEqv1),
         SinceCallStructMap0 = CommonInfo0 ^ since_call_structs,
@@ -375,7 +371,7 @@
             map.search(ConsIdMap0, ConsId, Structs),
             find_matching_cell_deconstruct(Structs, VarEqv1, VarId, OldStruct)
         ->
-            OldStruct = structure(_, OldArgVars),
+            OldStruct = common_struct(_, OldArgVars),
             eqvclass.ensure_corresponding_equivalences(ArgVars,
                 OldArgVars, VarEqv1, VarEqv),
             CommonInfo = CommonInfo0 ^ var_eqv := VarEqv,
@@ -394,7 +390,7 @@
             )
         ;
             GoalExpr = GoalExpr0,
-            Struct = structure(Var, ArgVars),
+            Struct = common_struct(Var, ArgVars),
             record_cell_in_maps(TypeCtor, ConsId, Struct, VarEqv1, !Info)
         )
     ),
@@ -403,7 +399,7 @@
 :- func lookup_var_type_ctor(simplify_info, prog_var) = type_ctor.
 
 lookup_var_type_ctor(Info, Var) = TypeCtor :-
-    simplify_info_get_var_types(Info, VarTypes),
+    VarTypes = simplify_info_get_var_types(Info),
     map.lookup(VarTypes, Var, Type),
     % If we unify a variable with a function symbol, we *must* know
     % what the principal type constructor of its type is.
@@ -411,22 +407,23 @@
 
 %---------------------------------------------------------------------------%
 
-:- pred find_matching_cell_construct(structures::in, eqvclass(prog_var)::in,
-    list(partition_id)::in, structure::out) is semidet.
+:- pred find_matching_cell_construct(list(common_struct)::in,
+    eqvclass(prog_var)::in, list(partition_id)::in, common_struct::out)
+    is semidet.
 
 find_matching_cell_construct([Struct | Structs], VarEqv, ArgVarIds, Match) :-
-    Struct = structure(_Var, Vars),
+    Struct = common_struct(_Var, Vars),
     ( ids_vars_match(ArgVarIds, Vars, VarEqv) ->
         Match = Struct
     ;
         find_matching_cell_construct(Structs, VarEqv, ArgVarIds, Match)
     ).
 
-:- pred find_matching_cell_deconstruct(structures::in, eqvclass(prog_var)::in,
-    partition_id::in, structure::out) is semidet.
+:- pred find_matching_cell_deconstruct(list(common_struct)::in,
+    eqvclass(prog_var)::in, partition_id::in, common_struct::out) is semidet.
 
 find_matching_cell_deconstruct([Struct | Structs], VarEqv, VarId, Match) :-
-    Struct = structure(Var, _Vars),
+    Struct = common_struct(Var, _Vars),
     ( id_var_match(VarId, Var, VarEqv) ->
         Match = Struct
     ;
@@ -451,12 +448,12 @@
 
 %---------------------------------------------------------------------------%
 
-:- pred record_cell_in_maps(type_ctor::in, cons_id::in, structure::in,
+:- pred record_cell_in_maps(type_ctor::in, cons_id::in, common_struct::in,
     eqvclass(prog_var)::in, simplify_info::in, simplify_info::out) is det.
 
 record_cell_in_maps(TypeCtor, ConsId, Struct, VarEqv, !Info) :-
     some [!CommonInfo] (
-        simplify_info_get_common_info(!.Info, !:CommonInfo),
+        !:CommonInfo = simplify_info_get_common_info(!.Info),
         AllStructMap0 = !.CommonInfo ^ all_structs,
         SinceCallStructMap0 = !.CommonInfo ^ since_call_structs,
         do_record_cell_in_struct_map(TypeCtor, ConsId, Struct,
@@ -470,7 +467,7 @@
     ).
 
 :- pred do_record_cell_in_struct_map(type_ctor::in, cons_id::in,
-    structure::in, struct_map::in, struct_map::out) is det.
+    common_struct::in, struct_map::in, struct_map::out) is det.
 
 do_record_cell_in_struct_map(TypeCtor, ConsId, Struct, !StructMap) :-
     ( map.search(!.StructMap, TypeCtor, ConsIdMap0) ->
@@ -492,7 +489,7 @@
     simplify_info::in, simplify_info::out) is det.
 
 record_equivalence(Var1, Var2, !Info) :-
-    simplify_info_get_common_info(!.Info, CommonInfo0),
+    CommonInfo0 = simplify_info_get_common_info(!.Info),
     VarEqv0 = CommonInfo0 ^ var_eqv,
     eqvclass.ensure_equivalence(VarEqv0, Var1, Var2, VarEqv),
     CommonInfo = CommonInfo0 ^ var_eqv := VarEqv,
@@ -505,8 +502,8 @@
     (
         Det = goal_info_get_determinism(GoalInfo),
         check_call_detism(Det),
-        simplify_info_get_var_types(!.Info, VarTypes),
-        simplify_info_get_module_info(!.Info, ModuleInfo),
+        VarTypes = simplify_info_get_var_types(!.Info),
+        ModuleInfo = simplify_info_get_module_info(!.Info),
         module_info_pred_proc_info(ModuleInfo, PredId, ProcId, _, ProcInfo),
         proc_info_get_argmodes(ProcInfo, ArgModes),
         partition_call_args(VarTypes, ModuleInfo, ArgModes, Args,
@@ -522,8 +519,8 @@
         Goal0, Goal, !Info) :-
     (
         check_call_detism(Det),
-        simplify_info_get_var_types(!.Info, VarTypes),
-        simplify_info_get_module_info(!.Info, ModuleInfo),
+        VarTypes = simplify_info_get_var_types(!.Info),
+        ModuleInfo = simplify_info_get_module_info(!.Info),
         partition_call_args(VarTypes, ModuleInfo, Modes, Args,
             InputArgs, OutputArgs, OutputModes)
     ->
@@ -549,7 +546,7 @@
 
 common_optimise_call_2(SeenCall, InputArgs, OutputArgs, Modes, GoalInfo,
         GoalExpr0, GoalExpr, !Info) :-
-    simplify_info_get_common_info(!.Info, CommonInfo0),
+    CommonInfo0 = simplify_info_get_common_info(!.Info),
     Eqv0 = CommonInfo0 ^ var_eqv,
     SeenCalls0 = CommonInfo0 ^ seen_calls,
     ( map.search(SeenCalls0, SeenCall, SeenCallsList0) ->
@@ -557,12 +554,12 @@
             find_previous_call(SeenCallsList0, InputArgs, Eqv0,
                 OutputArgs2, PrevContext)
         ->
-            simplify_info_get_module_info(!.Info, ModuleInfo),
+            ModuleInfo = simplify_info_get_module_info(!.Info),
             modes_to_uni_modes(ModuleInfo, Modes, Modes, UniModes),
             create_output_unifications(GoalInfo, OutputArgs, OutputArgs2,
                 UniModes, Goals, !Info),
             GoalExpr = conj(plain_conj, Goals),
-            simplify_info_get_var_types(!.Info, VarTypes),
+            VarTypes = simplify_info_get_var_types(!.Info),
             (
                 simplify_do_warn_duplicate_calls(!.Info),
                 % Don't warn for cases such as:
@@ -771,7 +768,7 @@
 
 generate_assign(ToVar, FromVar, UniMode, _, Goal, !Info) :-
     apply_induced_tsubst(ToVar, FromVar, !Info),
-    simplify_info_get_var_types(!.Info, VarTypes),
+    VarTypes = simplify_info_get_var_types(!.Info),
     map.lookup(VarTypes, ToVar, ToVarType),
     map.lookup(VarTypes, FromVar, FromVarType),
 
@@ -851,7 +848,7 @@
     simplify_info::out) is det.
 
 apply_induced_tsubst(ToVar, FromVar, !Info) :-
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
+    RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
     rtti_varmaps_var_info(RttiVarMaps0, FromVar, FromVarRttiInfo),
     rtti_varmaps_var_info(RttiVarMaps0, ToVar, ToVarRttiInfo),
     ( calculate_induced_tsubst(ToVarRttiInfo, FromVarRttiInfo, TSubst) ->
Index: compiler/deforest.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/deforest.m,v
retrieving revision 1.85
diff -u -b -r1.85 deforest.m
--- compiler/deforest.m	27 Feb 2008 07:23:04 -0000	1.85
+++ compiler/deforest.m	29 Feb 2008 03:38:50 -0000
@@ -1876,10 +1876,11 @@
         proc_info_set_vartypes(VarTypes, ProcInfo1, ProcInfo2),
         proc_info_set_rtti_varmaps(RttiVarMaps, ProcInfo2, ProcInfo3),
         (
-            CalledHasParallelConj = yes,
-            proc_info_set_has_parallel_conj(yes, ProcInfo3, ProcInfo)
+            CalledHasParallelConj = has_parallel_conj,
+            proc_info_set_has_parallel_conj(has_parallel_conj,
+                ProcInfo3, ProcInfo)
         ;
-            CalledHasParallelConj = no,
+            CalledHasParallelConj = does_not_have_parallel_conj,
             % Leave the has_parallel_conj field of the proc_info as it is.
             ProcInfo = ProcInfo3
         ),
Index: compiler/dep_par_conj.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/dep_par_conj.m,v
retrieving revision 1.25
diff -u -b -r1.25 dep_par_conj.m
--- compiler/dep_par_conj.m	27 Feb 2008 07:23:04 -0000	1.25
+++ compiler/dep_par_conj.m	29 Feb 2008 03:39:08 -0000
@@ -220,9 +220,9 @@
     module_info_proc_info(!.ModuleInfo, PredId, ProcId, ProcInfo),
     proc_info_get_has_parallel_conj(ProcInfo, HasParallelConj),
     (
-        HasParallelConj = no
+        HasParallelConj = does_not_have_parallel_conj
     ;
-        HasParallelConj = yes,
+        HasParallelConj = has_parallel_conj,
         process_proc_for_dep_par_conj_with_ignores(PredId, ProcId, set.init,
             !ModuleInfo, !ParProcs, !IO)
     ).
Index: compiler/distance_granularity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/distance_granularity.m,v
retrieving revision 1.7
diff -u -b -r1.7 distance_granularity.m
--- compiler/distance_granularity.m	27 Feb 2008 07:23:05 -0000	1.7
+++ compiler/distance_granularity.m	29 Feb 2008 03:39:24 -0000
@@ -266,7 +266,7 @@
     module_info_proc_info(!.ModuleInfo, proc(PredId, ProcId), ProcInfo0),
     proc_info_get_has_parallel_conj(ProcInfo0, HasParallelConj),
     (
-        HasParallelConj = yes,
+        HasParallelConj = has_parallel_conj,
         % The procedure contains parallel conjunction(s).
 
         proc_info_get_goal(ProcInfo0, Body),
@@ -288,7 +288,7 @@
             MaybeGranularityVar = no
         )
     ;
-        HasParallelConj = no
+        HasParallelConj = does_not_have_parallel_conj
         % No need to apply the distance granularity transformation to this
         % procedure as it does not contain any parallel conjunctions.
     ),
Index: compiler/granularity.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/granularity.m,v
retrieving revision 1.10
diff -u -b -r1.10 granularity.m
--- compiler/granularity.m	30 Dec 2007 08:23:40 -0000	1.10
+++ compiler/granularity.m	29 Feb 2008 03:42:33 -0000
@@ -68,7 +68,7 @@
     map.lookup(ProcTable0, ProcId, ProcInfo0),
     proc_info_get_has_parallel_conj(ProcInfo0, HasParallelConj),
     (
-        HasParallelConj = yes,
+        HasParallelConj = has_parallel_conj,
         proc_info_get_goal(ProcInfo0, Goal0),
         runtime_granularity_test_in_goal(Goal0, Goal, no, Changed,
             SCC, !.ModuleInfo),
@@ -84,7 +84,7 @@
             module_info_set_preds(PredTable, !ModuleInfo)
         )
     ;
-        HasParallelConj = no
+        HasParallelConj = does_not_have_parallel_conj
         % There is no parallelism in this procedure, so there is no granularity
         % to control.
     ).
Index: compiler/hlds_out.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_out.m,v
retrieving revision 1.445
diff -u -b -r1.445 hlds_out.m
--- compiler/hlds_out.m	27 Feb 2008 08:35:16 -0000	1.445
+++ compiler/hlds_out.m	29 Feb 2008 03:36:28 -0000
@@ -3987,18 +3987,18 @@
     ),
 
     (
-        HasParallelConj = yes,
+        HasParallelConj = has_parallel_conj,
         io.write_string("% contains parallel conjunction\n", !IO)
     ;
-        HasParallelConj = no,
+        HasParallelConj = does_not_have_parallel_conj,
         io.write_string("% does not contain parallel conjunction\n", !IO)
     ),
 
     (
-        HasUserEvent = yes,
+        HasUserEvent = has_user_event,
         io.write_string("% contains user event\n", !IO)
     ;
-        HasUserEvent = no,
+        HasUserEvent = does_not_have_user_event,
         io.write_string("% does not contain user event\n", !IO)
     ),
 
Index: compiler/hlds_pred.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/hlds_pred.m,v
retrieving revision 1.239
diff -u -b -r1.239 hlds_pred.m
--- compiler/hlds_pred.m	27 Feb 2008 08:35:16 -0000	1.239
+++ compiler/hlds_pred.m	29 Feb 2008 03:04:20 -0000
@@ -1867,6 +1867,22 @@
     list(prog_var)::in, hlds_goal::in, rtti_varmaps::in,
     proc_info::in, proc_info::out) is det.
 
+:- type need_maxfr_slot
+    --->    need_maxfr_slot
+    ;       does_not_need_maxfr_slot.
+
+:- type contains_trace
+    --->    contains_trace
+    ;       does_not_contain_trace.
+
+:- type has_user_event
+    --->    has_user_event
+    ;       does_not_have_user_event.
+
+:- type has_parallel_conj
+    --->    has_parallel_conj
+    ;       does_not_have_parallel_conj.
+
     % Predicates to get fields of proc_infos.
 
 :- pred proc_info_get_context(proc_info::in, prog_context::out) is det.
@@ -1897,9 +1913,13 @@
 :- pred proc_info_maybe_arg_info(proc_info::in,
     maybe(list(arg_info))::out) is det.
 :- pred proc_info_get_liveness_info(proc_info::in, liveness_info::out) is det.
-:- pred proc_info_get_need_maxfr_slot(proc_info::in, bool::out) is det.
-:- pred proc_info_get_has_user_event(proc_info::in, bool::out) is det.
-:- pred proc_info_get_has_parallel_conj(proc_info::in, bool::out) is det.
+:- pred proc_info_get_need_maxfr_slot(proc_info::in, need_maxfr_slot::out)
+    is det.
+:- pred proc_info_get_contains_trace(proc_info::in, contains_trace::out)
+    is det.
+:- pred proc_info_get_has_user_event(proc_info::in, has_user_event::out) is det.
+:- pred proc_info_get_has_parallel_conj(proc_info::in, has_parallel_conj::out)
+    is det.
 :- pred proc_info_get_call_table_tip(proc_info::in,
     maybe(prog_var)::out) is det.
 :- pred proc_info_get_maybe_proc_table_io_info(proc_info::in,
@@ -1953,11 +1973,13 @@
     proc_info::in, proc_info::out) is det.
 :- pred proc_info_set_liveness_info(liveness_info::in,
     proc_info::in, proc_info::out) is det.
-:- pred proc_info_set_need_maxfr_slot(bool::in,
+:- pred proc_info_set_need_maxfr_slot(need_maxfr_slot::in,
+    proc_info::in, proc_info::out) is det.
+:- pred proc_info_set_contains_trace(contains_trace::in,
     proc_info::in, proc_info::out) is det.
-:- pred proc_info_set_has_user_event(bool::in,
+:- pred proc_info_set_has_user_event(has_user_event::in,
     proc_info::in, proc_info::out) is det.
-:- pred proc_info_set_has_parallel_conj(bool::in,
+:- pred proc_info_set_has_parallel_conj(has_parallel_conj::in,
     proc_info::in, proc_info::out) is det.
 :- pred proc_info_set_call_table_tip(maybe(prog_var)::in,
     proc_info::in, proc_info::out) is det.
@@ -2231,12 +2253,17 @@
                 % at the call, for use in implementing retry.) This slot
                 % is used only with the LLDS backend XXX. Its value is set
                 % during the live_vars pass; it is invalid before then.
-                need_maxfr_slot             :: bool,
+                need_maxfr_slot             :: need_maxfr_slot,
+
+                % Does this procedure contain a trace goal?
+                %
+                % This slot is set by the simplification pass.
+                proc_contains_trace         :: contains_trace,
 
                 % Does this procedure contain a user event?
                 %
                 % This slot is set by the simplification pass.
-                proc_has_user_event         :: bool,
+                proc_has_user_event         :: has_user_event,
 
                 % Does this procedure contain parallel conjunction?
                 % If yes, it should be run through the dependent parallel
@@ -2245,7 +2272,7 @@
                 % This slot is set by the simplification pass.
                 % Note that after some optimization passes, this flag
                 % may be a conservative approximation.
-                proc_has_parallel_conj        :: bool,
+                proc_has_parallel_conj        :: has_parallel_conj,
 
                 % If the procedure's evaluation method is memo, loopcheck or
                 % minimal, this slot identifies the variable that holds the tip
@@ -2426,7 +2453,9 @@
     SharingInfo = structure_sharing_info_init,
     ReuseInfo = structure_reuse_info_init,
     ProcSubInfo = proc_sub_info(no, no, Term2Info, IsAddressTaken, StackSlots,
-        ArgInfo, InitialLiveness, no, no, no, no, no, no, no, no, no,
+        ArgInfo, InitialLiveness, does_not_need_maxfr_slot,
+        does_not_contain_trace, does_not_have_user_event,
+        does_not_have_parallel_conj, no, no, no, no, no, no,
         VarNameRemap, SharingInfo, ReuseInfo),
     ProcInfo = proc_info(MContext, BodyVarSet, BodyTypes, HeadVars, InstVarSet,
         DeclaredModes, Modes, no, MaybeArgLives, MaybeDet, InferredDet,
@@ -2450,14 +2479,16 @@
         InstVarSet, HeadModes, MaybeDeclaredDetism, Detism, Goal, RttiVarMaps,
         IsAddressTaken, VarNameRemap, ProcInfo) :-
     map.init(StackSlots),
-    set.init(Liveness),
+    set.init(InitialLiveness),
     MaybeHeadLives = no,
     ModeErrors = [],
     Term2Info = term_constr_main.term2_info_init,
     SharingInfo = structure_sharing_info_init,
     ReuseInfo = structure_reuse_info_init,
     ProcSubInfo = proc_sub_info(no, no, Term2Info, IsAddressTaken,
-        StackSlots, no, Liveness, no, no, no, no, no, no, no, no, no,
+        StackSlots, no, InitialLiveness, does_not_need_maxfr_slot,
+        does_not_contain_trace, does_not_have_user_event,
+        does_not_have_parallel_conj, no, no, no, no, no, no,
         VarNameRemap, SharingInfo, ReuseInfo),
     ProcInfo = proc_info(Context, VarSet, VarTypes, HeadVars,
         InstVarSet, no, HeadModes, no, MaybeHeadLives,
@@ -2493,6 +2524,7 @@
 proc_info_maybe_arg_info(PI, PI ^ proc_sub_info ^ arg_pass_info).
 proc_info_get_liveness_info(PI, PI ^ proc_sub_info ^ initial_liveness).
 proc_info_get_need_maxfr_slot(PI, PI ^ proc_sub_info ^ need_maxfr_slot).
+proc_info_get_contains_trace(PI, PI ^ proc_sub_info ^ proc_contains_trace).
 proc_info_get_has_user_event(PI, PI ^ proc_sub_info ^ proc_has_user_event).
 proc_info_get_has_parallel_conj(PI,
     PI ^ proc_sub_info ^ proc_has_parallel_conj).
@@ -2532,6 +2564,8 @@
     PI ^ proc_sub_info ^ initial_liveness := IL).
 proc_info_set_need_maxfr_slot(NMS, PI,
     PI ^ proc_sub_info ^ need_maxfr_slot := NMS).
+proc_info_set_contains_trace(CT, PI,
+    PI ^ proc_sub_info ^ proc_contains_trace := CT).
 proc_info_set_has_user_event(HUE, PI,
     PI ^ proc_sub_info ^ proc_has_user_event := HUE).
 proc_info_set_has_parallel_conj(HPC, PI,
Index: compiler/implicit_parallelism.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/implicit_parallelism.m,v
retrieving revision 1.7
diff -u -b -r1.7 implicit_parallelism.m
--- compiler/implicit_parallelism.m	27 Feb 2008 07:23:07 -0000	1.7
+++ compiler/implicit_parallelism.m	29 Feb 2008 03:42:49 -0000
@@ -160,7 +160,8 @@
         process_goal_for_implicit_parallelism(Body0, Body, ProcInfo0,
             !ModuleInfo, no, _, 0, _, CallSites, _, SiteNumCounter, _),
         proc_info_set_goal(Body, ProcInfo0, ProcInfo1),
-        proc_info_set_has_parallel_conj(yes, ProcInfo1, ProcInfo2),
+        proc_info_set_has_parallel_conj(has_parallel_conj,
+            ProcInfo1, ProcInfo2),
         requantify_proc(ProcInfo2, ProcInfo3),
         recompute_instmap_delta_proc(do_not_recompute_atomic_instmap_deltas,
             ProcInfo3, ProcInfo, !ModuleInfo),
Index: compiler/inlining.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/inlining.m,v
retrieving revision 1.159
diff -u -b -r1.159 inlining.m
--- compiler/inlining.m	27 Feb 2008 07:23:07 -0000	1.159
+++ compiler/inlining.m	29 Feb 2008 03:43:16 -0000
@@ -502,7 +502,7 @@
 
         (
             InlinedParallel = yes,
-            proc_info_set_has_parallel_conj(yes, !ProcInfo)
+            proc_info_set_has_parallel_conj(has_parallel_conj, !ProcInfo)
         ;
             InlinedParallel = no
         ),
@@ -674,10 +674,10 @@
 
         proc_info_get_has_parallel_conj(ProcInfo, HasParallelConj),
         (
-            HasParallelConj = yes,
+            HasParallelConj = has_parallel_conj,
             InlinedParallel = yes
         ;
-            HasParallelConj = no,
+            HasParallelConj = does_not_have_parallel_conj,
             InlinedParallel = InlinedParallel0
         ),
 
Index: compiler/lambda.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/lambda.m,v
retrieving revision 1.135
diff -u -b -r1.135 lambda.m
--- compiler/lambda.m	27 Feb 2008 07:23:08 -0000	1.135
+++ compiler/lambda.m	29 Feb 2008 03:44:08 -0000
@@ -119,7 +119,7 @@
                 inst_varset,            % from the proc_info
                 rtti_varmaps,           % from the proc_info
                 pred_markers,           % from the pred_info
-                bool,                   % has_parallel_conj, from the proc_info
+                has_parallel_conj,      % from the proc_info
                 pred_or_func,
                 string,                 % pred/func name
                 module_info,
Index: compiler/pd_util.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/pd_util.m,v
retrieving revision 1.69
diff -u -b -r1.69 pd_util.m
--- compiler/pd_util.m	27 Feb 2008 07:23:12 -0000	1.69
+++ compiler/pd_util.m	29 Feb 2008 03:49:11 -0000
@@ -255,11 +255,11 @@
         SimplifyInfo0, SimplifyInfo),
 
     % Deconstruct the simplify_info.
-    simplify_info_get_module_info(SimplifyInfo, ModuleInfo),
-    simplify_info_get_varset(SimplifyInfo, VarSet),
-    simplify_info_get_var_types(SimplifyInfo, VarTypes),
-    simplify_info_get_cost_delta(SimplifyInfo, CostDelta),
-    simplify_info_get_rtti_varmaps(SimplifyInfo, RttiVarMaps),
+    ModuleInfo = simplify_info_get_module_info(SimplifyInfo),
+    VarSet = simplify_info_get_varset(SimplifyInfo),
+    VarTypes = simplify_info_get_var_types(SimplifyInfo),
+    RttiVarMaps = simplify_info_get_rtti_varmaps(SimplifyInfo),
+    CostDelta = simplify_info_get_cost_delta(SimplifyInfo),
     pd_info_get_proc_info(!.PDInfo, ProcInfo1),
     proc_info_set_varset(VarSet, ProcInfo1, ProcInfo2),
     proc_info_set_vartypes(VarTypes, ProcInfo2, ProcInfo3),
Index: compiler/proc_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/proc_gen.m,v
retrieving revision 1.25
diff -u -b -r1.25 proc_gen.m
--- compiler/proc_gen.m	26 Nov 2007 05:13:21 -0000	1.25
+++ compiler/proc_gen.m	29 Feb 2008 03:37:17 -0000
@@ -367,8 +367,8 @@
         % reserved a stack slot for storing the value of maxfr; if we didn't,
         % a retry command in the debugger from a point in the middle of this
         % procedure will do the wrong thing.
-        proc_info_get_need_maxfr_slot(ProcInfo, HaveMaxfrSlot),
-        expect(unify(HaveMaxfrSlot, yes), this_file,
+        proc_info_get_need_maxfr_slot(ProcInfo, NeedMaxfrSlot),
+        expect(unify(NeedMaxfrSlot, need_maxfr_slot), this_file,
             "should have reserved a slot for maxfr, but didn't")
     ;
         true
Index: compiler/simplify.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/simplify.m,v
retrieving revision 1.228
diff -u -b -r1.228 simplify.m
--- compiler/simplify.m	27 Feb 2008 07:23:14 -0000	1.228
+++ compiler/simplify.m	29 Feb 2008 03:56:59 -0000
@@ -260,43 +260,43 @@
     ).
 
 simplify_do_warn_simple_code(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_warn_simple_code = yes.
 simplify_do_warn_duplicate_calls(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_warn_duplicate_calls = yes.
 simplify_do_warn_known_bad_format(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_warn_known_bad_format = yes.
 simplify_do_warn_unknown_format(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_warn_unknown_format = yes.
 simplify_do_warn_obsolete(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_warn_obsolete = yes.
 simplify_do_once(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_do_once = yes.
 simplify_do_after_front_end(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_after_front_end = yes.
 simplify_do_excess_assign(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_excess_assign = yes.
 simplify_do_elim_removable_scopes(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_elim_removable_scopes = yes.
 simplify_do_opt_duplicate_calls(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_opt_duplicate_calls = yes.
 simplify_do_const_prop(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_constant_prop = yes.
 simplify_do_common_struct(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_common_struct = yes.
 simplify_do_extra_common_struct(Info) :-
-    simplify_info_get_simplifications(Info, Simplifications),
+    Simplifications = simplify_info_get_simplifications(Info),
     Simplifications ^ do_extra_common_struct = yes.
 
 %-----------------------------------------------------------------------------%
@@ -338,17 +338,17 @@
     % parallel conjunctions.
     proc_info_get_has_parallel_conj(ProcInfo, HasParallelConj),
     (
-        HasParallelConj = yes,
+        HasParallelConj = has_parallel_conj,
         module_info_set_contains_par_conj(!ModuleInfo)
     ;
-        HasParallelConj = no
+        HasParallelConj = does_not_have_parallel_conj
     ),
     proc_info_get_has_user_event(ProcInfo, HasUserEvent),
     (
-        HasUserEvent = yes,
+        HasUserEvent = has_user_event,
         module_info_set_contains_user_event(!ModuleInfo)
     ;
-        HasUserEvent = no
+        HasUserEvent = does_not_have_user_event
     ),
     map.det_update(ProcTable0, ProcId, ProcInfo, ProcTable),
     pred_info_set_procedures(ProcTable, !PredInfo),
@@ -384,7 +384,7 @@
     simplify_info_init(DetInfo0, Simplifications, InstMap0, !.ProcInfo, Info0),
     proc_info_get_goal(!.ProcInfo, Goal0),
 
-    simplify_info_get_pred_info(Info0, PredInfo),
+    PredInfo = simplify_info_get_pred_info(Info0),
     pred_info_get_markers(PredInfo, Markers),
     (
         check_marker(Markers, marker_mode_check_clauses),
@@ -402,7 +402,7 @@
 
     simplify_process_clause_body_goal(Goal1, Goal, Info0, Info),
 
-    simplify_info_get_varset(Info, VarSet1),
+    VarSet1 = simplify_info_get_varset(Info),
     ( simplify_do_after_front_end(Info) ->
         proc_info_get_var_name_remap(!.ProcInfo, VarNameRemap),
         map.foldl(svvarset.name_var, VarNameRemap, VarSet1, VarSet),
@@ -410,21 +410,24 @@
     ;
         VarSet = VarSet1
     ),
-    simplify_info_get_var_types(Info, VarTypes),
-    simplify_info_get_rtti_varmaps(Info, RttiVarMaps),
+    VarTypes = simplify_info_get_var_types(Info),
+    RttiVarMaps = simplify_info_get_rtti_varmaps(Info),
     proc_info_set_varset(VarSet, !ProcInfo),
     proc_info_set_vartypes(VarTypes, !ProcInfo),
     proc_info_set_goal(Goal, !ProcInfo),
     proc_info_set_rtti_varmaps(RttiVarMaps, !ProcInfo),
 
-    simplify_info_get_has_parallel_conj(Info, HasParallelConj),
-    proc_info_set_has_parallel_conj(HasParallelConj, !ProcInfo),
+    ContainsTrace = simplify_info_get_contains_trace(Info),
+    proc_info_set_contains_trace(ContainsTrace, !ProcInfo),
 
-    simplify_info_get_has_user_event(Info, HasUserEvent),
+    HasUserEvent = simplify_info_get_has_user_event(Info),
     proc_info_set_has_user_event(HasUserEvent, !ProcInfo),
 
-    simplify_info_get_module_info(Info, !:ModuleInfo),
-    simplify_info_get_error_specs(Info, !:ErrorSpecs),
+    HasParallelConj = simplify_info_get_has_parallel_conj(Info),
+    proc_info_set_has_parallel_conj(HasParallelConj, !ProcInfo),
+
+    !:ModuleInfo = simplify_info_get_module_info(Info),
+    !:ErrorSpecs = simplify_info_get_error_specs(Info),
     (
         Info ^ simp_format_calls = yes,
         ( Simplifications ^ do_warn_known_bad_format = yes
@@ -500,8 +503,8 @@
 
 simplify_process_clause_body_goal(!Goal, !Info) :-
     some [!Simplifications] (
-        simplify_info_get_simplifications(!.Info, !:Simplifications),
-        simplify_info_get_instmap(!.Info, InstMap0),
+        !:Simplifications = simplify_info_get_simplifications(!.Info),
+        InstMap0 = simplify_info_get_instmap(!.Info),
         (
             ( simplify_do_common_struct(!.Info)
             ; simplify_do_opt_duplicate_calls(!.Info)
@@ -524,11 +527,11 @@
         % On the second pass do excess assignment elimination and
         % some cleaning up after the common structure pass.
         do_process_clause_body_goal(!Goal, !Info),
-        simplify_info_get_found_contains_trace(!.Info, FoundContainsTrace),
+        FoundContainsTrace = simplify_info_get_contains_trace(!.Info),
         (
-            FoundContainsTrace = no
+            FoundContainsTrace = does_not_contain_trace
         ;
-            FoundContainsTrace = yes,
+            FoundContainsTrace = contains_trace,
             goal_contains_trace(!Goal, _)
         )
     ).
@@ -537,12 +540,14 @@
     simplify_info::in, simplify_info::out) is det.
 
 do_process_clause_body_goal(Goal0, Goal, !Info) :-
-    simplify_info_get_instmap(!.Info, InstMap0),
+    InstMap0 = simplify_info_get_instmap(!.Info),
     simplify_goal(Goal0, Goal1, !Info),
-    simplify_info_get_varset(!.Info, VarSet0),
-    simplify_info_get_var_types(!.Info, VarTypes0),
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
-    ( simplify_info_requantify(!.Info) ->
+    VarSet0 = simplify_info_get_varset(!.Info),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
+    RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
+    Requantify = simplify_info_get_requantify(!.Info),
+    (
+        Requantify = simplify_requantify,
         Goal1 = hlds_goal(_, GoalInfo1),
         NonLocals = goal_info_get_nonlocals(GoalInfo1),
         implicitly_quantify_goal(NonLocals, _, Goal1, Goal2,
@@ -557,26 +562,29 @@
         % in the case where unused variables should no longer be included
         % in the instmap_delta for a goal.
         % In the alias branch this is necessary anyway.
-        simplify_info_get_module_info(!.Info, ModuleInfo0),
+        ModuleInfo0 = simplify_info_get_module_info(!.Info),
         recompute_instmap_delta(recompute_atomic_instmap_deltas, Goal2, Goal3,
             VarTypes1, !.Info ^ simp_inst_varset, InstMap0,
             ModuleInfo0, ModuleInfo1),
         simplify_info_set_module_info(ModuleInfo1, !Info)
     ;
+        Requantify = simplify_do_not_requantify,
         Goal3 = Goal1
     ),
-    ( simplify_info_rerun_det(!.Info) ->
+    RerunDet = simplify_info_get_rerun_det(!.Info),
+    (
+        RerunDet = simplify_rerun_det,
         Goal0 = hlds_goal(_, GoalInfo0),
         Detism = goal_info_get_determinism(GoalInfo0),
         det_get_soln_context(Detism, SolnContext),
 
         % det_infer_goal looks up the proc_info in the module_info
         % for the vartypes, so we'd better stick them back in the module_info.
-        simplify_info_get_module_info(!.Info, ModuleInfo2),
-        simplify_info_get_varset(!.Info, VarSet2),
-        simplify_info_get_var_types(!.Info, VarTypes2),
-        simplify_info_get_det_info(!.Info, DetInfo2),
-        simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps2),
+        ModuleInfo2 = simplify_info_get_module_info(!.Info),
+        VarSet2 = simplify_info_get_varset(!.Info),
+        VarTypes2 = simplify_info_get_var_types(!.Info),
+        RttiVarMaps2 = simplify_info_get_rtti_varmaps(!.Info),
+        DetInfo2 = simplify_info_get_det_info(!.Info),
         det_info_get_pred_id(DetInfo2, PredId),
         det_info_get_proc_id(DetInfo2, ProcId),
         module_info_pred_proc_info(ModuleInfo2, PredId, ProcId,
@@ -588,11 +596,12 @@
             PredInfo, ProcInfo, ModuleInfo2, ModuleInfo3),
         simplify_info_set_module_info(ModuleInfo3, !Info),
 
-        simplify_info_get_det_info(!.Info, DetInfo0),
+        DetInfo3 = simplify_info_get_det_info(!.Info),
         det_infer_goal(Goal3, Goal, InstMap0, SolnContext, [], no,
-            _, _, DetInfo0, DetInfo, [], _),
+            _, _, DetInfo3, DetInfo, [], _),
         simplify_info_set_det_info(DetInfo, !Info)
     ;
+        RerunDet = simplify_do_not_rerun_det,
         Goal = Goal3
     ).
 
@@ -603,21 +612,22 @@
 
 simplify_goal(Goal0, hlds_goal(GoalExpr, GoalInfo), !Info) :-
     Goal0 = hlds_goal(_, GoalInfo0),
-    simplify_info_get_inside_duplicated_for_switch(!.Info,
-        InsideDuplForSwitch),
+    InsideDuplForSwitch =
+        simplify_info_get_inside_duplicated_for_switch(!.Info),
     ( goal_info_has_feature(GoalInfo0, feature_duplicated_for_switch) ->
-        simplify_info_set_inside_duplicated_for_switch(yes, !Info)
+        simplify_info_set_inside_duplicated_for_switch(inside_dupl_for_switch,
+            !Info)
     ;
         true
     ),
     ( goal_info_has_feature(GoalInfo0, feature_contains_trace) ->
-        simplify_info_set_found_contains_trace(yes, !Info)
+        simplify_info_set_contains_trace(contains_trace, !Info)
     ;
         true
     ),
     Detism = goal_info_get_determinism(GoalInfo0),
-    simplify_info_get_det_info(!.Info, DetInfo),
-    simplify_info_get_module_info(!.Info, ModuleInfo0),
+    DetInfo = simplify_info_get_det_info(!.Info),
+    ModuleInfo0 = simplify_info_get_module_info(!.Info),
     goal_can_loop_or_throw(Goal0, Goal0CanLoopOrThrow,
         ModuleInfo0, ModuleInfo),
     simplify_info_set_module_info(ModuleInfo, !Info),
@@ -684,7 +694,7 @@
         MaxSoln \= at_most_zero,
         InstMapDelta = goal_info_get_instmap_delta(GoalInfo0),
         NonLocalVars = goal_info_get_nonlocals(GoalInfo0),
-        simplify_info_get_instmap(!.Info, InstMap0),
+        InstMap0 = simplify_info_get_instmap(!.Info),
         det_no_output_vars(NonLocalVars, InstMap0, InstMapDelta, DetInfo),
         ( Purity = purity_pure ; Purity = purity_semipure ),
         ( det_info_get_fully_strict(DetInfo, no)
@@ -885,7 +895,7 @@
     simplify_info::in, simplify_info::out) is det.
 
 simplify_goal_2_plain_conj(Goals0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
-    simplify_info_get_instmap(!.Info, InstMap0),
+    InstMap0 = simplify_info_get_instmap(!.Info),
     excess_assigns_in_conj(GoalInfo0, Goals0, Goals1, !Info),
     simplify_conj(Goals1, [], Goals, GoalInfo0, !Info),
     simplify_info_set_instmap(InstMap0, !Info),
@@ -941,7 +951,7 @@
         GoalInfo = GoalInfo0,
         simplify_par_conj(Goals0, Goals, !.Info, !Info),
         GoalExpr = conj(parallel_conj, Goals),
-        simplify_info_set_has_parallel_conj(yes, !Info)
+        simplify_info_set_has_parallel_conj(has_parallel_conj, !Info)
     ).
 
 :- pred simplify_goal_2_disj(
@@ -951,7 +961,7 @@
 
 simplify_goal_2_disj(GoalExpr0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
     GoalExpr0 = disj(Disjuncts0),
-    simplify_info_get_instmap(!.Info, InstMap0),
+    InstMap0 = simplify_info_get_instmap(!.Info),
     simplify_disj(Disjuncts0, [], Disjuncts, [], InstMaps, !.Info, !Info),
     (
         Disjuncts = [],
@@ -970,9 +980,9 @@
             % and is very unlikely to get any better precision.
             GoalInfo = GoalInfo0
         ;
-            simplify_info_get_module_info(!.Info, ModuleInfo1),
+            ModuleInfo1 = simplify_info_get_module_info(!.Info),
             NonLocals = goal_info_get_nonlocals(GoalInfo0),
-            simplify_info_get_var_types(!.Info, VarTypes),
+            VarTypes = simplify_info_get_var_types(!.Info),
             merge_instmap_deltas(InstMap0, NonLocals, VarTypes, InstMaps,
                 NewDelta, ModuleInfo1, ModuleInfo2),
             simplify_info_set_module_info(ModuleInfo2, !Info),
@@ -1003,8 +1013,8 @@
 
 simplify_goal_2_switch(GoalExpr0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
     GoalExpr0 = switch(Var, SwitchCanFail0, Cases0),
-    simplify_info_get_instmap(!.Info, InstMap0),
-    simplify_info_get_module_info(!.Info, ModuleInfo0),
+    InstMap0 = simplify_info_get_instmap(!.Info),
+    ModuleInfo0 = simplify_info_get_module_info(!.Info),
     instmap.lookup_var(InstMap0, Var, VarInst),
     ( inst_is_bound_to_functors(ModuleInfo0, VarInst, Functors) ->
         functors_to_cons_ids(Functors, ConsIds0),
@@ -1038,14 +1048,13 @@
             % existential type variables in the types of the constructor
             % arguments or their typeinfos.
 
-            simplify_info_get_var_types(!.Info, VarTypes1),
+            VarTypes1 = simplify_info_get_var_types(!.Info),
             map.lookup(VarTypes1, Var, Type),
-            simplify_info_get_module_info(!.Info, ModuleInfo1),
+            ModuleInfo1 = simplify_info_get_module_info(!.Info),
             ( type_util.is_existq_cons(ModuleInfo1, Type, MainConsId) ->
                 GoalExpr = switch(Var, SwitchCanFail, Cases),
                 NonLocals = goal_info_get_nonlocals(GoalInfo0),
-                simplify_info_get_var_types(!.Info, VarTypes),
-                merge_instmap_deltas(InstMap0, NonLocals, VarTypes,
+                merge_instmap_deltas(InstMap0, NonLocals, VarTypes1,
                     InstMaps, NewDelta, ModuleInfo1, ModuleInfo2),
                 simplify_info_set_module_info(ModuleInfo2, !Info),
                 goal_info_set_instmap_delta(NewDelta, GoalInfo0, GoalInfo)
@@ -1062,7 +1071,7 @@
                 NonLocals0 = goal_info_get_nonlocals(GoalInfo0),
                 set.insert(NonLocals0, Var, NonLocals),
                 InstMapDelta0 = goal_info_get_instmap_delta(GoalInfo0),
-                simplify_info_get_instmap(!.Info, InstMap),
+                InstMap = simplify_info_get_instmap(!.Info),
                 instmap_delta_bind_var_to_functor(Var, Type, MainConsId,
                     InstMap, InstMapDelta0, InstMapDelta,
                     ModuleInfo1, ModuleInfo),
@@ -1091,9 +1100,9 @@
             % very unlikely to get any better precision.
             GoalInfo = GoalInfo0
         ;
-            simplify_info_get_module_info(!.Info, ModuleInfo1),
+            ModuleInfo1 = simplify_info_get_module_info(!.Info),
             NonLocals = goal_info_get_nonlocals(GoalInfo0),
-            simplify_info_get_var_types(!.Info, VarTypes),
+            VarTypes = simplify_info_get_var_types(!.Info),
             merge_instmap_deltas(InstMap0, NonLocals, VarTypes, InstMaps,
                 NewDelta, ModuleInfo1, ModuleInfo2),
             simplify_info_set_module_info(ModuleInfo2, !Info),
@@ -1149,7 +1158,7 @@
         )
     ;
         GenericCall = event_call(_),
-        simplify_info_set_has_user_event(yes, !Info),
+        simplify_info_set_has_user_event(has_user_event, !Info),
         GoalExpr = GoalExpr0
     ;
         ( GenericCall = class_method(_, _, _, _)
@@ -1165,7 +1174,7 @@
 
 simplify_goal_2_plain_call(GoalExpr0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
     GoalExpr0 = plain_call(PredId, ProcId, Args, IsBuiltin, _, _),
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     module_info_pred_info(ModuleInfo, PredId, PredInfo),
     ModuleName = hlds_pred.pred_info_module(PredInfo),
     Name = hlds_pred.pred_info_name(PredInfo),
@@ -1205,9 +1214,9 @@
         RT0 = rhs_lambda_goal(Purity, Groundness, PredOrFunc, EvalMethod,
             NonLocals, Vars, Modes, LambdaDeclaredDet, LambdaGoal0),
         simplify_info_enter_lambda(!Info),
-        simplify_info_get_common_info(!.Info, Common1),
-        simplify_info_get_module_info(!.Info, ModuleInfo),
-        simplify_info_get_instmap(!.Info, InstMap1),
+        Common1 = simplify_info_get_common_info(!.Info),
+        ModuleInfo = simplify_info_get_module_info(!.Info),
+        InstMap1 = simplify_info_get_instmap(!.Info),
         instmap.pre_lambda_update(ModuleInfo, Vars, Modes, InstMap1, InstMap2),
         simplify_info_set_instmap(InstMap2, !Info),
 
@@ -1313,16 +1322,16 @@
         list.append(CondList, ThenList, List),
         simplify_goal(hlds_goal(conj(plain_conj, List), GoalInfo0),
             hlds_goal(GoalExpr, GoalInfo), !Info),
-        simplify_info_get_inside_duplicated_for_switch(!.Info,
-            InsideDuplForSwitch),
+        InsideDuplForSwitch =
+            simplify_info_get_inside_duplicated_for_switch(!.Info),
         (
-            InsideDuplForSwitch = yes
+            InsideDuplForSwitch = inside_dupl_for_switch
             % Do not generate the warning, since it is quite likely to be
             % spurious: though the condition cannot fail in this arm of the
             % switch, it likely can fail in other arms that derive from
             % the exact same piece of source code.
         ;
-            InsideDuplForSwitch = no,
+            InsideDuplForSwitch = not_inside_dupl_for_switch,
             Context = goal_info_get_context(GoalInfo0),
             Pieces = [words("Warning: the condition of this if-then-else"),
                 words("cannot fail.")],
@@ -1377,16 +1386,16 @@
             List = [Cond | ElseList],
             simplify_goal(hlds_goal(conj(plain_conj, List), GoalInfo0),
                 hlds_goal(GoalExpr, GoalInfo), !Info),
-            simplify_info_get_inside_duplicated_for_switch(!.Info,
-                InsideDuplForSwitch),
+            InsideDuplForSwitch =
+                simplify_info_get_inside_duplicated_for_switch(!.Info),
             (
-                InsideDuplForSwitch = yes
+                InsideDuplForSwitch = inside_dupl_for_switch
                 % Do not generate the warning, since it is quite likely to be
                 % spurious: though the condition cannot succeed in this arm
                 % of the switch, it likely can succeed in other arms that
                 % derive from the exact same piece of source code.
             ;
-                InsideDuplForSwitch = no,
+                InsideDuplForSwitch = not_inside_dupl_for_switch,
                 Context = goal_info_get_context(GoalInfo0),
                 Pieces = [words("Warning: the condition of this if-then-else"),
                     words("cannot succeed.")],
@@ -1431,7 +1440,7 @@
         % if-then-else.
 
         Info0 = !.Info,
-        simplify_info_get_instmap(!.Info, InstMap0),
+        InstMap0 = simplify_info_get_instmap(!.Info),
         simplify_goal(Cond0, Cond, !Info),
         simplify_info_update_instmap(Cond, !Info),
         simplify_goal(Then0, Then, !Info),
@@ -1448,8 +1457,8 @@
         ElseDelta = goal_info_get_instmap_delta(ElseInfo),
         NonLocals = goal_info_get_nonlocals(GoalInfo0),
         some [!ModuleInfo] (
-            simplify_info_get_module_info(!.Info, !:ModuleInfo),
-            simplify_info_get_var_types(!.Info, VarTypes),
+            !:ModuleInfo = simplify_info_get_module_info(!.Info),
+            VarTypes = simplify_info_get_var_types(!.Info),
             merge_instmap_deltas(InstMap0, NonLocals, VarTypes,
                 [CondThenDelta, ElseDelta], NewDelta, !ModuleInfo),
             simplify_info_set_module_info(!.ModuleInfo, !Info)
@@ -1477,7 +1486,7 @@
             simplify_goal_2(IfThenElse, GoalExpr, GoalInfo1, GoalInfo,
                 !Info)
         ;
-            simplify_info_get_module_info(!.Info, ModuleInfo),
+            ModuleInfo = simplify_info_get_module_info(!.Info),
             warn_switch_for_ite_cond(ModuleInfo, VarTypes, Cond,
                 cond_can_switch_uncommitted, CanSwitch),
             (
@@ -1682,7 +1691,7 @@
     GoalExpr0 = negation(SubGoal0),
     % Can't use calls or unifications seen within a negation,
     % since non-local variables may not be bound within the negation.
-    simplify_info_get_common_info(!.Info, Common),
+    Common = simplify_info_get_common_info(!.Info),
     simplify_goal(SubGoal0, SubGoal1, !Info),
     simplify_info_set_common_info(Common, !Info),
     SubGoal1 = hlds_goal(_, SubGoalInfo1),
@@ -1744,7 +1753,7 @@
 
 simplify_goal_2_scope(GoalExpr0, GoalExpr, GoalInfo0, GoalInfo, !Info) :-
     GoalExpr0 = scope(Reason0, SubGoal0), 
-    simplify_info_get_common_info(!.Info, Common),
+    Common = simplify_info_get_common_info(!.Info),
     simplify_goal(SubGoal0, SubGoal, !Info),
     nested_scopes(Reason0, SubGoal, GoalInfo0, Goal1),
     Goal1 = hlds_goal(GoalExpr1, GoalInfo1),
@@ -1819,7 +1828,7 @@
                     % This kind of foreign_proc also acts as the marker
                     % for the fact that the then-part originated as the goal
                     % of a trace scope.
-                    simplify_info_get_module_info(!.Info, ModuleInfo),
+                    ModuleInfo = simplify_info_get_module_info(!.Info),
                     module_info_get_globals(ModuleInfo, Globals),
                     globals.get_target(Globals, Target),
                     PrivateBuiltin = mercury_private_builtin_module,
@@ -1904,7 +1913,7 @@
         Args0, ExtraArgs0, MaybeTraceRuntimeCond, Impl),
     (
         simplify_do_const_prop(!.Info),
-        simplify_info_get_module_info(!.Info, ModuleInfo),
+        ModuleInfo = simplify_info_get_module_info(!.Info),
         module_info_pred_info(ModuleInfo, PredId, CallPredInfo),
         CallModuleSymName = pred_info_module(CallPredInfo),
         is_std_lib_module_name(CallModuleSymName, CallModuleName),
@@ -1958,7 +1967,7 @@
     simplify_info) = bool.
 
 evaluate_compile_time_condition(trace_base(Base), Info) = Result :-
-    simplify_info_get_module_info(Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(Info),
     module_info_get_globals(ModuleInfo, Globals),
     (
         Base = trace_flag(FlagName),
@@ -2041,7 +2050,7 @@
     !:Info = !.Info ^ simp_varset := VarSet,
 
     % We have to add the type of R to the var_types.
-    simplify_info_get_var_types(!.Info, VarTypes0),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
     map.det_insert(VarTypes0, R, comparison_result_type, VarTypes),
     simplify_info_set_var_types(VarTypes, !Info),
 
@@ -2049,10 +2058,10 @@
     Context = hlds_goal.goal_info_get_context(GoalInfo),
     Args    = [TI, R, X, Y],
 
-    simplify_info_get_instmap(!.Info, InstMap),
+    InstMap = simplify_info_get_instmap(!.Info),
     instmap.lookup_var(InstMap, X, XInst),
     instmap.lookup_var(InstMap, Y, YInst),
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     ModeNo =
         ( if inst_is_unique(ModuleInfo, XInst) then
             ( if inst_is_unique(ModuleInfo, YInst) then 1 else 2 )
@@ -2101,7 +2110,7 @@
     simplify_info::in, simplify_info::out) is det.
 
 call_goal(PredId, ProcId, Args, IsBuiltin, !GoalExpr, !GoalInfo, !Info) :-
-    simplify_info_get_module_info(!.Info, ModuleInfo0),
+    ModuleInfo0 = simplify_info_get_module_info(!.Info),
     module_info_pred_proc_info(ModuleInfo0, PredId, ProcId,
         PredInfo, ProcInfo),
     GoalContext = goal_info_get_context(!.GoalInfo),
@@ -2111,7 +2120,7 @@
         pred_info_get_markers(PredInfo, Markers),
         check_marker(Markers, marker_obsolete),
 
-        simplify_info_get_det_info(!.Info, DetInfo0),
+        DetInfo0 = simplify_info_get_det_info(!.Info),
         det_info_get_pred_id(DetInfo0, ThisPredId),
 
         % Don't warn about directly recursive calls. (That would cause
@@ -2150,7 +2159,7 @@
 
         % Is this a (directly) recursive call, i.e. is the procedure being
         % called the same as the procedure we're analyzing?
-        simplify_info_get_det_info(!.Info, DetInfo),
+        DetInfo = simplify_info_get_det_info(!.Info),
         det_info_get_pred_id(DetInfo, PredId),
         det_info_get_proc_id(DetInfo, ProcId),
 
@@ -2165,12 +2174,12 @@
         \+ simplify_info_inside_lambda(!.Info),
 
         % Are the input arguments the same (or equivalent)?
-        simplify_info_get_module_info(!.Info, ModuleInfo1),
+        ModuleInfo1 = simplify_info_get_module_info(!.Info),
         module_info_pred_proc_info(ModuleInfo1, PredId, ProcId,
             PredInfo1, ProcInfo1),
         proc_info_get_headvars(ProcInfo1, HeadVars),
         proc_info_get_argmodes(ProcInfo1, ArgModes),
-        simplify_info_get_common_info(!.Info, CommonInfo1),
+        CommonInfo1 = simplify_info_get_common_info(!.Info),
         input_args_are_equiv(Args, HeadVars, ArgModes,
             CommonInfo1, ModuleInfo1),
 
@@ -2251,14 +2260,14 @@
 
     % Try to evaluate the call at compile-time.
     (
-        simplify_info_get_module_info(!.Info, ModuleInfo2),
+        ModuleInfo2 = simplify_info_get_module_info(!.Info),
         !.GoalExpr = plain_call(CallPredId, CallProcId, CallArgs, _, _, _),
         module_info_pred_info(ModuleInfo2, CallPredId, CallPredInfo),
         CallModuleSymName = pred_info_module(CallPredInfo),
         is_std_lib_module_name(CallModuleSymName, CallModuleName)
     ->
-        simplify_info_get_instmap(!.Info, Instmap0),
-        simplify_info_get_var_types(!.Info, VarTypes),
+        Instmap0 = simplify_info_get_instmap(!.Info),
+        VarTypes = simplify_info_get_var_types(!.Info),
 
         CallPredName = pred_info_name(CallPredInfo),
         proc_id_to_int(CallProcId, CallModeNum),
@@ -2316,8 +2325,8 @@
     %
     CanCompareCompoundValues = yes,
     list.reverse(Args, [Y, X, Res | _]),
-    simplify_info_get_module_info(!.Info, ModuleInfo),
-    simplify_info_get_var_types(!.Info, VarTypes),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
+    VarTypes = simplify_info_get_var_types(!.Info),
     map.lookup(VarTypes, Y, Type),
     type_definitely_has_no_user_defined_equality_pred(ModuleInfo, Type),
 
@@ -2384,8 +2393,8 @@
     simplify_info::in, simplify_info::out) is semidet.
 
 simplify_library_call_int_arity2(Op, X, Y, GoalExpr, !GoalInfo, !Info) :-
-    simplify_info_get_varset(!.Info, VarSet0),
-    simplify_info_get_var_types(!.Info, VarTypes0),
+    VarSet0 = simplify_info_get_varset(!.Info),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
     varset.new_var(VarSet0, ConstVar, VarSet),
     map.det_insert(VarTypes0, ConstVar, int_type, VarTypes),
     simplify_info_set_varset(VarSet, !Info),
@@ -2409,7 +2418,7 @@
 
     IntModuleSymName = mercury_std_lib_module_name(unqualified("int")),
     OpSymName = qualified(IntModuleSymName, Op),
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     module_info_get_predicate_table(ModuleInfo, PredTable),
     predicate_table_search_func_sym_arity(PredTable, is_fully_qualified,
         OpSymName, 2, OpPredIds),
@@ -2447,8 +2456,8 @@
 
 process_compl_unify(XVar, YVar, UniMode, CanFail, _OldTypeInfoVars, Context,
         GoalInfo0, Goal, !Info) :-
-    simplify_info_get_module_info(!.Info, ModuleInfo),
-    simplify_info_get_var_types(!.Info, VarTypes),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
+    VarTypes = simplify_info_get_var_types(!.Info),
     map.lookup(VarTypes, XVar, Type),
     ( Type = type_variable(TypeVar, Kind) ->
         % Convert polymorphic unifications into calls to `unify/2',
@@ -2588,10 +2597,10 @@
 
 make_type_info_vars(Types, TypeInfoVars, TypeInfoGoals, !Info) :-
     % Extract the information from simplify_info.
-    simplify_info_get_det_info(!.Info, DetInfo0),
-    simplify_info_get_varset(!.Info, VarSet0),
-    simplify_info_get_var_types(!.Info, VarTypes0),
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
+    DetInfo0 = simplify_info_get_det_info(!.Info),
+    VarSet0 = simplify_info_get_varset(!.Info),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
+    RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
     det_info_get_module_info(DetInfo0, ModuleInfo0),
     det_info_get_pred_id(DetInfo0, PredId),
     det_info_get_proc_id(DetInfo0, ProcId),
@@ -2639,7 +2648,7 @@
     list(hlds_goal)::out, simplify_info::in, simplify_info::out) is det.
 
 type_info_locn(TypeVar, Kind, TypeInfoVar, Goals, !Info) :-
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps),
+    RttiVarMaps = simplify_info_get_rtti_varmaps(!.Info),
     rtti_lookup_type_info_locn(RttiVarMaps, TypeVar, TypeInfoLocn),
     (
         % If the typeinfo is available in a variable, just use it.
@@ -2658,10 +2667,10 @@
 
 extract_type_info(TypeVar, Kind, TypeClassInfoVar, Index, Goals, TypeInfoVar,
         !Info) :-
-    simplify_info_get_module_info(!.Info, ModuleInfo),
-    simplify_info_get_varset(!.Info, VarSet0),
-    simplify_info_get_var_types(!.Info, VarTypes0),
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
+    VarSet0 = simplify_info_get_varset(!.Info),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
+    RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
 
     polymorphism.gen_extract_type_info(TypeVar, Kind, TypeClassInfoVar, Index,
         ModuleInfo, Goals, TypeInfoVar, VarSet0, VarSet, VarTypes0, VarTypes,
@@ -2825,7 +2834,7 @@
         ;
             % Delete unreachable goals.
             (
-                simplify_info_get_instmap(!.Info, InstMap1),
+                InstMap1 = simplify_info_get_instmap(!.Info),
                 instmap.is_unreachable(InstMap1)
             ;
                 Goal1 = hlds_goal(_, GoalInfo1),
@@ -2879,15 +2888,16 @@
     simplify_info::in, simplify_info::in, simplify_info::out) is det.
 
 simplify_par_conj([], [], _, !Info).
-simplify_par_conj([Goal0 |Goals0], [Goal | Goals], Info0, !Info) :-
+simplify_par_conj([Goal0 | Goals0], [Goal | Goals], StartInfo, !Info) :-
     simplify_goal(Goal0, Goal, !Info),
     simplify_info_update_instmap(Goal, !Info),
     % Reset common_info to what it was at the start of the parallel
     % conjunction, so as not to introduce more dependencies due to
     % removal of duplicate calls, etc.
-    simplify_info_get_common_info(Info0, Common),
+    Common = simplify_info_get_common_info(StartInfo),
     simplify_info_set_common_info(Common, !Info),
-    simplify_par_conj(Goals0, Goals, Info0, !Info).
+    simplify_par_conj(Goals0, Goals, StartInfo, !Info).
+    % ZZZ
 
 %-----------------------------------------------------------------------------%
 
@@ -2899,11 +2909,11 @@
     ( simplify_do_excess_assign(!.Info) ->
         ConjNonLocals = goal_info_get_nonlocals(ConjInfo),
         map.init(Subn0),
-        simplify_info_get_module_info(!.Info, ModuleInfo),
+        ModuleInfo = simplify_info_get_module_info(!.Info),
         module_info_get_globals(ModuleInfo, Globals),
         globals.get_trace_level(Globals, TraceLevel),
         globals.lookup_bool_option(Globals, trace_optimized, TraceOptimized),
-        simplify_info_get_varset(!.Info, VarSet0),
+        VarSet0 = simplify_info_get_varset(!.Info),
         find_excess_assigns_in_conj(TraceLevel, TraceOptimized,
             VarSet0, ConjNonLocals, Goals0, [], RevGoals, Subn0, Subn1),
         ( map.is_empty(Subn1) ->
@@ -2915,7 +2925,7 @@
             map.keys(Subn0, RemovedVars),
             varset.delete_vars(VarSet0, RemovedVars, VarSet),
             simplify_info_set_varset(VarSet, !Info),
-            simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
+            RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
             apply_substitutions_to_rtti_varmaps(map.init, map.init, Subn,
                 RttiVarMaps0, RttiVarMaps),
             simplify_info_set_rtti_varmaps(RttiVarMaps, !Info)
@@ -3031,10 +3041,10 @@
     list.reverse(RevCases, Cases).
 simplify_switch(Var, [Case0 | Cases0], RevCases0, Cases, !InstMaps,
         !CanFail, Info0, !Info) :-
-    simplify_info_get_instmap(Info0, InstMap0),
+    InstMap0 = simplify_info_get_instmap(Info0),
     Case0 = case(MainConsId, OtherConsIds, Goal0),
-    simplify_info_get_module_info(!.Info, ModuleInfo0),
-    simplify_info_get_var_types(!.Info, VarTypes),
+    ModuleInfo0 = simplify_info_get_module_info(!.Info),
+    VarTypes = simplify_info_get_var_types(!.Info),
     map.lookup(VarTypes, Var, Type),
     bind_var_to_functors(Var, Type, MainConsId, OtherConsIds,
         InstMap0, InstMap1, ModuleInfo0, ModuleInfo1),
@@ -3057,7 +3067,7 @@
         % before the goal would be used, resulting in a mode error.
 
         InstMapDelta0 = goal_info_get_instmap_delta(GoalInfo),
-        simplify_info_get_module_info(!.Info, ModuleInfo2),
+        ModuleInfo2 = simplify_info_get_module_info(!.Info),
         instmap_delta_bind_var_to_functors(Var, Type, MainConsId, OtherConsIds,
             InstMap0, InstMapDelta0, InstMapDelta, ModuleInfo2, ModuleInfo),
         simplify_info_set_module_info(ModuleInfo, !Info),
@@ -3079,17 +3089,17 @@
 
 create_test_unification(Var, ConsId, ConsArity,
         hlds_goal(ExtraGoal, ExtraGoalInfo), !Info) :-
-    simplify_info_get_varset(!.Info, VarSet0),
-    simplify_info_get_var_types(!.Info, VarTypes0),
+    VarSet0 = simplify_info_get_varset(!.Info),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
     varset.new_vars(VarSet0, ConsArity, ArgVars, VarSet),
     map.lookup(VarTypes0, Var, VarType),
-    simplify_info_get_module_info(!.Info, ModuleInfo),
+    ModuleInfo = simplify_info_get_module_info(!.Info),
     type_util.get_cons_id_arg_types(ModuleInfo, VarType, ConsId, ArgTypes),
     map.det_insert_from_corresponding_lists(VarTypes0, ArgVars,
         ArgTypes, VarTypes),
     simplify_info_set_varset(VarSet, !Info),
     simplify_info_set_var_types(VarTypes, !Info),
-    simplify_info_get_instmap(!.Info, InstMap),
+    InstMap = simplify_info_get_instmap(!.Info),
     instmap.lookup_var(InstMap, Var, Inst0),
     (
         inst_expand(ModuleInfo, Inst0, Inst1),
@@ -3149,9 +3159,8 @@
             % to be spurious: though the disjunct cannot succeed in this arm of
             % the switch, it likely can succeed in other arms that derive from
             % the exact same piece of source code.
-            simplify_info_get_inside_duplicated_for_switch(!.Info,
-                 InsideDuplForSwitch),
-            InsideDuplForSwitch = no
+            simplify_info_get_inside_duplicated_for_switch(!.Info)
+                = not_inside_dupl_for_switch
         ->
             Context = goal_info_get_context(GoalInfo),
             Pieces = [words("Warning: this disjunct"),
@@ -3174,7 +3183,7 @@
             ;
                 % Only remove disjuncts that might loop
                 % or call error/1 if --no-fully-strict.
-                simplify_info_get_det_info(!.Info, DetInfo),
+                DetInfo = simplify_info_get_det_info(!.Info),
                 det_info_get_fully_strict(DetInfo, no)
             )
         ->
@@ -3408,14 +3417,17 @@
                 simp_varset                  :: prog_varset,
                 simp_inst_varset             :: inst_varset,
 
+                % Information about type_infos and typeclass_infos.
+                simp_rtti_varmaps           :: rtti_varmaps,
+
                 % Does the goal need requantification?
-                simp_requantify              :: bool,       % ZZZ
+                simp_requantify             :: simplify_requantify,
 
                 % Do we need to recompute instmap_deltas for atomic goals?
-                simp_recompute_atomic        :: bool,
+                simp_recompute_atomic       :: simplify_recompute_atomic,
 
                 % Does determinism analysis need to be rerun?
-                simp_rerun_det               :: bool,
+                simp_rerun_det              :: simplify_rerun_det,
 
                 % Measure of the improvement in the goal from simplification.
                 simp_cost_delta              :: int,
@@ -3424,26 +3436,23 @@
                 % the current goal.
                 simp_lambdas                 :: int,
 
-                % Information about type_infos and typeclass_infos.
-                simp_rtti_varmaps            :: rtti_varmaps,
-
                 % Do we have any calls to string.format, stream.format and
                 % io.format?
                 simp_format_calls            :: bool,
 
                 % Are we currently inside a goal that was duplicated
                 % for a switch?
-                simp_inside_dupl_for_switch  :: bool,
+                simp_inside_dupl_for_switch :: inside_dupl_for_switch,
 
                 % Have we seen a parallel conjunction?
-                simp_has_parallel_conj       :: bool,
+                simp_has_parallel_conj      :: has_parallel_conj,
 
                 % Have we seen a goal with a feature that says it contains
                 % a trace goal?
-                simp_found_contains_trace    :: bool,
+                simp_contains_trace         :: contains_trace,
 
                 % Have we seen an event call?
-                simp_has_user_event          :: bool
+                simp_has_user_event         :: has_user_event
             ).
 
 simplify_info_init(DetInfo, Simplifications, InstMap, ProcInfo, Info) :-
@@ -3451,8 +3460,11 @@
     proc_info_get_inst_varset(ProcInfo, InstVarSet),
     proc_info_get_rtti_varmaps(ProcInfo, RttiVarMaps),
     Info = simplify_info(DetInfo, [], Simplifications,
-        common_info_init, InstMap, VarSet, InstVarSet,
-        no, no, no, 0, 0, RttiVarMaps, no, no, no, no, no).
+        common_info_init, InstMap, VarSet, InstVarSet, RttiVarMaps,
+        simplify_do_not_requantify, simplify_do_not_recompute_atomic,
+        simplify_do_not_rerun_det, 0, 0, no,
+        not_inside_dupl_for_switch, does_not_have_parallel_conj,
+        does_not_contain_trace, does_not_have_user_event).
 
     % Reinitialise the simplify_info before reprocessing a goal.
     %
@@ -3460,55 +3472,68 @@
     simplify_info::in, simplify_info::out) is det.
 
 simplify_info_reinit(Simplifications, InstMap0, !Info) :-
-    !:Info = !.Info ^ simp_simplifications := Simplifications,
-    !:Info = !.Info ^ simp_common_info := common_info_init,
-    !:Info = !.Info ^ simp_instmap := InstMap0,
-    !:Info = !.Info ^ simp_requantify := no,
-    !:Info = !.Info ^ simp_recompute_atomic := no,
-    !:Info = !.Info ^ simp_rerun_det := no,
-    !:Info = !.Info ^ simp_lambdas := 0,
-    !:Info = !.Info ^ simp_has_parallel_conj := no,
-    !:Info = !.Info ^ simp_has_user_event := no.
+    !Info ^ simp_simplifications := Simplifications,
+    !Info ^ simp_common_info := common_info_init,
+    !Info ^ simp_instmap := InstMap0,
+    !Info ^ simp_requantify := simplify_do_not_requantify,
+    !Info ^ simp_recompute_atomic := simplify_do_not_recompute_atomic,
+    !Info ^ simp_rerun_det := simplify_do_not_rerun_det,
+    !Info ^ simp_lambdas := 0,
+    !Info ^ simp_has_parallel_conj := does_not_have_parallel_conj,
+    !Info ^ simp_has_user_event := does_not_have_user_event.
 
     % exported for common.m
 :- interface.
 
 :- import_module parse_tree.prog_data.
 
+:- type simplify_requantify
+    --->    simplify_requantify
+    ;       simplify_do_not_requantify.
+
+:- type simplify_recompute_atomic
+    --->    simplify_recompute_atomic
+    ;       simplify_do_not_recompute_atomic.
+
+:- type simplify_rerun_det
+    --->    simplify_rerun_det
+    ;       simplify_do_not_rerun_det.
+
+:- type inside_dupl_for_switch
+    --->    inside_dupl_for_switch
+    ;       not_inside_dupl_for_switch.
+
 :- pred simplify_info_init(det_info::in, simplifications::in,
     instmap::in, proc_info::in, simplify_info::out) is det.
 
-:- pred simplify_info_get_det_info(simplify_info::in, det_info::out) is det.
-:- pred simplify_info_get_error_specs(simplify_info::in, list(error_spec)::out)
-    is det.
-:- pred simplify_info_get_simplifications(simplify_info::in,
-    simplifications::out) is det.
-:- pred simplify_info_get_common_info(simplify_info::in, common_info::out)
-    is det.
-:- pred simplify_info_get_instmap(simplify_info::in, instmap::out) is det.
-:- pred simplify_info_get_varset(simplify_info::in, prog_varset::out) is det.
-:- pred simplify_info_get_var_types(simplify_info::in, vartypes::out) is det.
-:- pred simplify_info_requantify(simplify_info::in) is semidet.
-:- pred simplify_info_recompute_atomic(simplify_info::in) is semidet.
-:- pred simplify_info_rerun_det(simplify_info::in) is semidet.
-:- pred simplify_info_get_cost_delta(simplify_info::in, int::out) is det.
-:- pred simplify_info_get_rtti_varmaps(simplify_info::in, rtti_varmaps::out)
-    is det.
+:- func simplify_info_get_det_info(simplify_info) = det_info.
+:- func simplify_info_get_error_specs(simplify_info) = list(error_spec).
+:- func simplify_info_get_simplifications(simplify_info) = simplifications.
+:- func simplify_info_get_common_info(simplify_info) = common_info.
+:- func simplify_info_get_instmap(simplify_info) = instmap.
+:- func simplify_info_get_varset(simplify_info) = prog_varset.
+:- func simplify_info_get_var_types(simplify_info) = vartypes.
+:- func simplify_info_get_rtti_varmaps(simplify_info) = rtti_varmaps.
+:- func simplify_info_get_requantify(simplify_info) = simplify_requantify.
+:- func simplify_info_get_recompute_atomic(simplify_info) =
+    simplify_recompute_atomic.
+:- func simplify_info_get_rerun_det(simplify_info) = simplify_rerun_det.
+:- func simplify_info_get_cost_delta(simplify_info) = int.
+
+:- func simplify_info_get_module_info(simplify_info) = module_info.
+:- func simplify_info_get_pred_info(simplify_info) = pred_info.
 
-:- pred simplify_info_get_module_info(simplify_info::in, module_info::out)
-    is det.
-:- pred simplify_info_get_pred_info(simplify_info::in, pred_info::out) is det.
 :- pred simplify_info_get_pred_proc_info(simplify_info::in, pred_info::out,
     proc_info::out) is det.
 
 :- pred simplify_info_set_common_info(common_info::in,
     simplify_info::in, simplify_info::out) is det.
+:- pred simplify_info_set_rtti_varmaps(rtti_varmaps::in,
+    simplify_info::in, simplify_info::out) is det.
 :- pred simplify_info_set_requantify(
     simplify_info::in, simplify_info::out) is det.
 :- pred simplify_info_set_rerun_det(
     simplify_info::in, simplify_info::out) is det.
-:- pred simplify_info_set_rtti_varmaps(rtti_varmaps::in,
-    simplify_info::in, simplify_info::out) is det.
 :- pred simplify_info_do_add_error_spec(error_spec::in,
     simplify_info::in, simplify_info::out) is det.
 
@@ -3520,50 +3545,45 @@
 
 :- implementation.
 
-:- pred simplify_info_get_format_calls(simplify_info::in, bool::out) is det.
-:- pred simplify_info_get_inside_duplicated_for_switch(simplify_info::in,
-    bool::out) is det.
-:- pred simplify_info_get_has_parallel_conj(simplify_info::in, bool::out)
-    is det.
-:- pred simplify_info_get_found_contains_trace(simplify_info::in, bool::out)
-    is det.
-:- pred simplify_info_get_has_user_event(simplify_info::in, bool::out) is det.
-
-simplify_info_get_det_info(Info, Info ^ simp_det_info).
-simplify_info_get_error_specs(Info, Info ^ simp_error_specs).
-simplify_info_get_simplifications(Info, Info ^ simp_simplifications).
-simplify_info_get_common_info(Info, Info ^ simp_common_info).
-simplify_info_get_instmap(Info, Info ^ simp_instmap).
-simplify_info_get_varset(Info, Info ^ simp_varset).
-simplify_info_get_var_types(Info, VarTypes) :-
+:- func simplify_info_get_format_calls(simplify_info) = bool.
+:- func simplify_info_get_inside_duplicated_for_switch(simplify_info) =
+    inside_dupl_for_switch.
+:- func simplify_info_get_has_parallel_conj(simplify_info) = has_parallel_conj.
+:- func simplify_info_get_contains_trace(simplify_info) = contains_trace.
+:- func simplify_info_get_has_user_event(simplify_info) = has_user_event.
+
+simplify_info_get_det_info(Info) = Info ^ simp_det_info.
+simplify_info_get_error_specs(Info) = Info ^ simp_error_specs.
+simplify_info_get_simplifications(Info) = Info ^ simp_simplifications.
+simplify_info_get_common_info(Info) = Info ^ simp_common_info.
+simplify_info_get_instmap(Info) = Info ^ simp_instmap.
+simplify_info_get_varset(Info) = Info ^ simp_varset.
+simplify_info_get_var_types(Info) = VarTypes :-
     det_info_get_vartypes(Info ^ simp_det_info, VarTypes).
-simplify_info_requantify(Info) :-
-    Info ^ simp_requantify = yes.
-simplify_info_recompute_atomic(Info) :-
-    Info ^ simp_recompute_atomic = yes.
-simplify_info_rerun_det(Info) :-
-    Info ^ simp_rerun_det = yes.
-simplify_info_get_cost_delta(Info, Info ^ simp_cost_delta).
-simplify_info_get_rtti_varmaps(Info, Info ^ simp_rtti_varmaps).
-simplify_info_get_format_calls(Info, Info ^ simp_format_calls).
-simplify_info_get_inside_duplicated_for_switch(Info,
-    Info ^ simp_inside_dupl_for_switch).
-simplify_info_get_has_parallel_conj(Info, Info ^ simp_has_parallel_conj).
-simplify_info_get_found_contains_trace(Info, Info ^ simp_found_contains_trace).
-simplify_info_get_has_user_event(Info, Info ^ simp_has_user_event).
+simplify_info_get_rtti_varmaps(Info) = Info ^ simp_rtti_varmaps.
+simplify_info_get_requantify(Info) = Info ^ simp_requantify.
+simplify_info_get_recompute_atomic(Info) = Info ^ simp_recompute_atomic.
+simplify_info_get_rerun_det(Info) = Info ^ simp_rerun_det.
+simplify_info_get_cost_delta(Info) = Info ^ simp_cost_delta.
+simplify_info_get_format_calls(Info) = Info ^ simp_format_calls.
+simplify_info_get_inside_duplicated_for_switch(Info) =
+    Info ^ simp_inside_dupl_for_switch.
+simplify_info_get_has_parallel_conj(Info) = Info ^ simp_has_parallel_conj.
+simplify_info_get_contains_trace(Info) = Info ^ simp_contains_trace.
+simplify_info_get_has_user_event(Info) = Info ^ simp_has_user_event.
 
-simplify_info_get_module_info(Info, ModuleInfo) :-
-    simplify_info_get_det_info(Info, DetInfo),
+simplify_info_get_module_info(Info) = ModuleInfo :-
+    DetInfo = simplify_info_get_det_info(Info),
     det_info_get_module_info(DetInfo, ModuleInfo).
 
-simplify_info_get_pred_info(Info, PredInfo) :-
-    simplify_info_get_det_info(Info, DetInfo),
+simplify_info_get_pred_info(Info) = PredInfo :-
+    DetInfo = simplify_info_get_det_info(Info),
     det_info_get_module_info(DetInfo, ModuleInfo),
     det_info_get_pred_id(DetInfo, PredId),
     module_info_pred_info(ModuleInfo, PredId, PredInfo).
 
 simplify_info_get_pred_proc_info(Info, PredInfo, ProcInfo) :-
-    simplify_info_get_det_info(Info, DetInfo),
+    DetInfo = simplify_info_get_det_info(Info),
     det_info_get_module_info(DetInfo, ModuleInfo),
     det_info_get_pred_id(DetInfo, PredId),
     det_info_get_proc_id(DetInfo, ProcId),
@@ -3586,13 +3606,13 @@
     simplify_info::in, simplify_info::out) is det.
 :- pred simplify_info_set_format_calls(bool::in,
     simplify_info::in, simplify_info::out) is det.
-:- pred simplify_info_set_inside_duplicated_for_switch(bool::in,
-    simplify_info::in, simplify_info::out) is det.
-:- pred simplify_info_set_has_parallel_conj(bool::in,
+:- pred simplify_info_set_inside_duplicated_for_switch(
+    inside_dupl_for_switch::in, simplify_info::in, simplify_info::out) is det.
+:- pred simplify_info_set_has_parallel_conj(has_parallel_conj::in,
     simplify_info::in, simplify_info::out) is det.
-:- pred simplify_info_set_found_contains_trace(bool::in,
+:- pred simplify_info_set_contains_trace(contains_trace::in,
     simplify_info::in, simplify_info::out) is det.
-:- pred simplify_info_set_has_user_event(bool::in,
+:- pred simplify_info_set_has_user_event(has_user_event::in,
     simplify_info::in, simplify_info::out) is det.
 
 :- pred simplify_info_add_error_spec(error_spec::in,
@@ -3609,31 +3629,45 @@
 :- pred simplify_info_set_module_info(module_info::in,
     simplify_info::in, simplify_info::out) is det.
 
-simplify_info_set_det_info(Det, Info, Info ^ simp_det_info := Det).
-simplify_info_set_error_specs(Specs, Info, Info ^ simp_error_specs := Specs).
-simplify_info_set_simplifications(Simp, Info,
-    Info ^ simp_simplifications := Simp).
-simplify_info_set_instmap(InstMap, Info, Info ^ simp_instmap := InstMap).
-simplify_info_set_common_info(Common, Info, Info ^ simp_common_info := Common).
-simplify_info_set_varset(VarSet, Info, Info ^ simp_varset := VarSet).
-simplify_info_set_var_types(VarTypes, Info, Info ^ simp_det_info := DetInfo) :-
-    det_info_set_vartypes(VarTypes, Info ^ simp_det_info, DetInfo).
-simplify_info_set_requantify(Info, Info ^ simp_requantify := yes).
-simplify_info_set_recompute_atomic(Info, Info ^ simp_recompute_atomic := yes).
-simplify_info_set_rerun_det(Info, Info ^ simp_rerun_det := yes).
-simplify_info_set_cost_delta(Delta, Info, Info ^ simp_cost_delta := Delta).
-simplify_info_set_rtti_varmaps(Rtti, Info, Info ^ simp_rtti_varmaps := Rtti).
-simplify_info_set_format_calls(FC, Info, Info ^ simp_format_calls := FC).
-simplify_info_set_inside_duplicated_for_switch(IDFS, Info,
-    Info ^ simp_inside_dupl_for_switch := IDFS).
-simplify_info_set_has_parallel_conj(MHPC, Info,
-    Info ^ simp_has_parallel_conj := MHPC).
-simplify_info_set_found_contains_trace(FCT, Info,
-    Info ^ simp_found_contains_trace := FCT).
-simplify_info_set_has_user_event(HUE, Info, Info ^ simp_has_user_event := HUE).
+simplify_info_set_det_info(Det, !Info) :-
+    !Info ^ simp_det_info := Det.
+simplify_info_set_error_specs(Specs, !Info) :-
+    !Info ^ simp_error_specs := Specs.
+simplify_info_set_simplifications(Simp, !Info) :-
+    !Info ^ simp_simplifications := Simp.
+simplify_info_set_instmap(InstMap, !Info) :-
+    !Info ^ simp_instmap := InstMap.
+simplify_info_set_common_info(Common, !Info) :-
+    !Info ^ simp_common_info := Common.
+simplify_info_set_varset(VarSet, !Info) :-
+    !Info ^ simp_varset := VarSet.
+simplify_info_set_var_types(VarTypes, !Info) :-
+    DetInfo0 = !.Info ^ simp_det_info,
+    det_info_set_vartypes(VarTypes, DetInfo0, DetInfo),
+    !Info ^ simp_det_info := DetInfo.
+simplify_info_set_rtti_varmaps(Rtti, !Info) :-
+    !Info ^ simp_rtti_varmaps := Rtti.
+simplify_info_set_requantify(!Info) :-
+    !Info ^ simp_requantify := simplify_requantify.
+simplify_info_set_recompute_atomic(!Info) :-
+    !Info ^ simp_recompute_atomic := simplify_recompute_atomic.
+simplify_info_set_rerun_det(!Info) :-
+    !Info ^ simp_rerun_det := simplify_rerun_det.
+simplify_info_set_cost_delta(Delta, !Info) :-
+    !Info ^ simp_cost_delta := Delta.
+simplify_info_set_format_calls(FC, !Info) :-
+    !Info ^ simp_format_calls := FC.
+simplify_info_set_inside_duplicated_for_switch(IDFS, !Info) :-
+    !Info ^ simp_inside_dupl_for_switch := IDFS.
+simplify_info_set_has_parallel_conj(MHPC, !Info) :-
+    !Info ^ simp_has_parallel_conj := MHPC.
+simplify_info_set_contains_trace(FCT, !Info) :-
+    !Info ^ simp_contains_trace := FCT.
+simplify_info_set_has_user_event(HUE, !Info) :-
+    !Info ^ simp_has_user_event := HUE.
 
-simplify_info_incr_cost_delta(Incr, Info,
-    Info ^ simp_cost_delta := Info ^ simp_cost_delta + Incr).
+simplify_info_incr_cost_delta(Incr, !Info) :-
+    !Info ^ simp_cost_delta := !.Info ^ simp_cost_delta + Incr.
 
 simplify_info_add_error_spec(Spec, !Info) :-
     ( simplify_do_warn_simple_code(!.Info) ->
@@ -3643,7 +3677,7 @@
     ).
 
 simplify_info_do_add_error_spec(Spec, !Info) :-
-    simplify_info_get_error_specs(!.Info, Specs0),
+    Specs0 = simplify_info_get_error_specs(!.Info),
     Specs = [Spec | Specs0],
     simplify_info_set_error_specs(Specs, !Info).
 
@@ -3663,13 +3697,13 @@
     Info ^ simp_lambdas > 0.
 
 simplify_info_set_module_info(ModuleInfo, !Info) :-
-    simplify_info_get_det_info(!.Info, DetInfo0),
+    DetInfo0 = simplify_info_get_det_info(!.Info),
     det_info_set_module_info(ModuleInfo, DetInfo0, DetInfo),
     simplify_info_set_det_info(DetInfo, !Info).
 
 simplify_info_apply_type_substitution(TSubst, !Info) :-
-    simplify_info_get_var_types(!.Info, VarTypes0),
-    simplify_info_get_rtti_varmaps(!.Info, RttiVarMaps0),
+    VarTypes0 = simplify_info_get_var_types(!.Info),
+    RttiVarMaps0 = simplify_info_get_rtti_varmaps(!.Info),
     ApplyTSubst = (pred(_::in, T0::in, T::out) is det :-
             apply_rec_subst_to_type(TSubst, T0, T)
         ),
@@ -3682,8 +3716,10 @@
 :- pred simplify_info_update_instmap(hlds_goal::in,
     simplify_info::in, simplify_info::out) is det.
 
-simplify_info_update_instmap(Goal, Info, Info ^ simp_instmap := InstMap) :-
-    update_instmap(Goal, Info ^ simp_instmap, InstMap).
+simplify_info_update_instmap(Goal, !Info) :-
+    InstMap0 = !.Info ^ simp_instmap,
+    update_instmap(Goal, InstMap0, InstMap),
+    !Info ^ simp_instmap := InstMap.
 
 :- type before_after
     --->    before
@@ -3708,7 +3744,7 @@
         Goal = hlds_goal(GoalExpr, _),
         will_flush(GoalExpr, BeforeAfter) = yes
     ->
-        simplify_info_get_common_info(!.Info, CommonInfo0),
+        CommonInfo0 = simplify_info_get_common_info(!.Info),
         common_info_clear_structs(CommonInfo0, CommonInfo),
         simplify_info_set_common_info(CommonInfo, !Info)
     ;
@@ -3815,9 +3851,9 @@
     simplify_info::out) is det.
 
 simplify_info_post_branch_update(PreBranchInfo, PostBranchInfo0, Info) :-
-    simplify_info_get_instmap(PreBranchInfo, InstMap),
+    InstMap = simplify_info_get_instmap(PreBranchInfo),
     simplify_info_set_instmap(InstMap, PostBranchInfo0, PostBranchInfo1),
-    simplify_info_get_common_info(PreBranchInfo, Common),
+    Common = simplify_info_get_common_info(PreBranchInfo),
     simplify_info_set_common_info(Common, PostBranchInfo1, Info).
 
     % Undo updates to the simplify_info before redoing simplification
@@ -3826,10 +3862,10 @@
 :- pred simplify_info_undo_goal_updates(simplify_info::in, simplify_info::in,
     simplify_info::out) is det.
 
-simplify_info_undo_goal_updates(Info0, !Info) :-
-    simplify_info_get_common_info(Info0, CommonInfo0),
+simplify_info_undo_goal_updates(StartInfo, !Info) :-
+    CommonInfo0 = simplify_info_get_common_info(StartInfo),
     simplify_info_set_common_info(CommonInfo0, !Info),
-    simplify_info_get_instmap(Info0, InstMap),
+    InstMap = simplify_info_get_instmap(StartInfo),
     simplify_info_set_instmap(InstMap, !Info).
 
 %-----------------------------------------------------------------------------%
Index: compiler/trace_gen.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_gen.m,v
retrieving revision 1.23
diff -u -b -r1.23 trace_gen.m
--- compiler/trace_gen.m	11 Feb 2008 21:26:10 -0000	1.23
+++ compiler/trace_gen.m	29 Feb 2008 03:38:26 -0000
@@ -309,11 +309,11 @@
         proc_info_get_goal(!.ProcInfo, Goal),
         code_util.goal_may_alloc_temp_frame(Goal, yes)
     ->
-        MaxfrFlag = yes
+        NeedMaxfrSlot = need_maxfr_slot
     ;
-        MaxfrFlag = no
+        NeedMaxfrSlot = does_not_need_maxfr_slot
     ),
-    proc_info_set_need_maxfr_slot(MaxfrFlag, !ProcInfo).
+    proc_info_set_need_maxfr_slot(NeedMaxfrSlot, !ProcInfo).
 
     % trace_reserved_slots and trace_setup cooperate in the allocation of
     % stack slots for tracing purposes. The allocation is done in the
@@ -437,10 +437,10 @@
         ),
         proc_info_get_need_maxfr_slot(ProcInfo, NeedMaxfr),
         (
-            NeedMaxfr = yes,
+            NeedMaxfr = need_maxfr_slot,
             Maxfr = 1
         ;
-            NeedMaxfr = no,
+            NeedMaxfr = does_not_need_maxfr_slot,
             Maxfr = 0
         ),
         ReservedSlots0 = Fixed + RedoLayout + FromFull + IoSeq + Trail + Maxfr,
@@ -519,13 +519,13 @@
     ),
     proc_info_get_need_maxfr_slot(ProcInfo, NeedMaxfr),
     (
-        NeedMaxfr = yes,
+        NeedMaxfr = need_maxfr_slot,
         MaybeMaxfrSlot = yes(NextSlotAfterTrail),
         MaxfrLval = stack_slot_num_to_lval(StackId, NextSlotAfterTrail),
         MaybeMaxfrLval = yes(MaxfrLval),
         NextSlotAfterMaxfr = NextSlotAfterTrail + 1
     ;
-        NeedMaxfr = no,
+        NeedMaxfr = does_not_need_maxfr_slot,
         MaybeMaxfrSlot = no,
         MaybeMaxfrLval = no,
         NextSlotAfterMaxfr = NextSlotAfterTrail
Index: compiler/trace_params.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/trace_params.m,v
retrieving revision 1.42
diff -u -b -r1.42 trace_params.m
--- compiler/trace_params.m	23 Nov 2007 07:35:29 -0000	1.42
+++ compiler/trace_params.m	29 Feb 2008 03:36:44 -0000
@@ -251,10 +251,10 @@
             ->
                 proc_info_get_has_user_event(ProcInfo, ProcHasUserEvent),
                 (
-                    ProcHasUserEvent = yes,
+                    ProcHasUserEvent = has_user_event,
                     EffTraceLevel = basic_user
                 ;
-                    ProcHasUserEvent = no,
+                    ProcHasUserEvent = does_not_have_user_event,
                     module_info_get_contains_user_event(ModuleInfo,
                         ModuleHasUserEvent),
                     (
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing debian/patches
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/base64
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/fixed
cvs diff: Diffing extras/gator
cvs diff: Diffing extras/gator/generations
cvs diff: Diffing extras/gator/generations/1
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/easyx
cvs diff: Diffing extras/graphics/easyx/samples
cvs diff: Diffing extras/graphics/mercury_allegro
cvs diff: Diffing extras/graphics/mercury_allegro/examples
cvs diff: Diffing extras/graphics/mercury_allegro/samples
cvs diff: Diffing extras/graphics/mercury_allegro/samples/demo
cvs diff: Diffing extras/graphics/mercury_allegro/samples/mandel
cvs diff: Diffing extras/graphics/mercury_allegro/samples/pendulum2
cvs diff: Diffing extras/graphics/mercury_allegro/samples/speed
cvs diff: Diffing extras/graphics/mercury_glut
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/gears
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/log4m
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/mopenssl
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/net
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/posix/samples
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/solver_types
cvs diff: Diffing extras/solver_types/library
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/windows_installer_generator
cvs diff: Diffing extras/windows_installer_generator/sample
cvs diff: Diffing extras/windows_installer_generator/sample/images
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing extras/xml_stylesheets
cvs diff: Diffing java
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing mdbcomp
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/standalone_c
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/solver_types
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing slice
cvs diff: Diffing ssdb
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/par_conj
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/trailing
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
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