[m-rev.] diff: more parallelism
Zoltan Somogyi
zs at csse.unimelb.edu.au
Thu Oct 14 16:48:40 AEDT 2010
compiler/passes_aux.m:
compiler/typecheck.m:
Make it easier for the feedback tool to find profitable parallelism
in these modules.
Zoltan.
cvs diff: Diffing .
Index: passes_aux.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/passes_aux.m,v
retrieving revision 1.98
diff -u -b -r1.98 passes_aux.m
--- passes_aux.m 23 Aug 2010 07:38:29 -0000 1.98
+++ passes_aux.m 14 Oct 2010 05:39:41 -0000
@@ -306,16 +306,22 @@
par_process_nonimported_procs_in_preds(ModuleInfo, Task, ValidPredIdSet,
[PredIdInfo0 | PredIdsInfos0], [PredIdInfo | PredIdsInfos]) :-
PredIdInfo0 = PredId - PredInfo0,
- ( set_tree234.member(ValidPredIdSet, PredId) ->
+ (
+ set_tree234.member(ValidPredIdSet, PredId),
ProcIds = pred_info_non_imported_procids(PredInfo0),
+ ProcIds = [_ | _]
+ ->
+ % Potential parallelization site.
par_process_nonimported_procs(ModuleInfo, Task, PredId, ProcIds,
PredInfo0, PredInfo),
- PredIdInfo = PredId - PredInfo
- ;
- PredIdInfo = PredIdInfo0
- ),
- par_process_nonimported_procs_in_preds(ModuleInfo, Task, ValidPredIdSet,
- PredIdsInfos0, PredIdsInfos).
+ PredIdInfo = PredId - PredInfo,
+ par_process_nonimported_procs_in_preds(ModuleInfo, Task,
+ ValidPredIdSet, PredIdsInfos0, PredIdsInfos)
+ ;
+ PredIdInfo = PredIdInfo0,
+ par_process_nonimported_procs_in_preds(ModuleInfo, Task,
+ ValidPredIdSet, PredIdsInfos0, PredIdsInfos)
+ ).
:- pred par_process_nonimported_procs(module_info::in,
update_proc_task::par_proc_task, pred_id::in, list(proc_id)::in,
Index: typecheck.m
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/compiler/typecheck.m,v
retrieving revision 1.446
diff -u -b -r1.446 typecheck.m
--- typecheck.m 30 Jul 2010 05:16:18 -0000 1.446
+++ typecheck.m 14 Oct 2010 05:39:21 -0000
@@ -356,8 +356,12 @@
not set_tree234.member(ValidPredIdSet, PredId)
)
->
- PredIdInfo = PredIdInfo0
+ PredIdInfo = PredIdInfo0,
+ typecheck_module_one_iteration(ModuleInfo, ValidPredIdSet,
+ PredIdsInfos0, PredIdsInfos, !NewlyInvalidPredIds,
+ !Specs, !Changed)
;
+ % Potential parallelization site.
typecheck_pred_if_needed(ModuleInfo, PredId, PredInfo0, PredInfo,
PredSpecs, PredChanged),
@@ -385,10 +389,11 @@
),
PredIdInfo = PredId - PredInfo,
!:Specs = PredSpecs ++ !.Specs,
- bool.or(PredChanged, !Changed)
- ),
+ bool.or(PredChanged, !Changed),
typecheck_module_one_iteration(ModuleInfo, ValidPredIdSet,
- PredIdsInfos0, PredIdsInfos, !NewlyInvalidPredIds, !Specs, !Changed).
+ PredIdsInfos0, PredIdsInfos, !NewlyInvalidPredIds,
+ !Specs, !Changed)
+ ).
:- pred typecheck_pred_if_needed(module_info::in, pred_id::in,
pred_info::in, pred_info::out, list(error_spec)::out, bool::out) is det.
cvs diff: Diffing notes
--------------------------------------------------------------------------
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