[m-rev.] diff: fix deforestation bug
Simon Taylor
stayl at cs.mu.OZ.AU
Tue Apr 30 01:35:51 AEST 2002
On 29-Apr-2002, Fergus Henderson <fjh at cs.mu.OZ.AU> wrote:
> On 29-Apr-2002, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > compiler/deforest.m:
> > Don't attempt to improve the determinism of procedures
> > with determinism cc_multi or cc_nondet -- those determinisms
> > can't be inferred, and attempting to do so would cause
> > errors in determinism analysis.
>
> The comment here is wrong -- the compiler *can* infer determinism
> `cc_multi' or `cc_nondet'.
>From det_analysis.m:
% Work out whether the procedure occurs in a single-solution
% context or not. Currently we only assume so if
% the predicate has an explicit determinism declaration
% that says so.
proc_info_declared_determinism(Proc0, MaybeDeclaredDetism),
( MaybeDeclaredDetism = yes(DeclaredDetism) ->
det_get_soln_context(DeclaredDetism, SolnContext)
;
SolnContext = all_solns
),
To infer a cc_multi or cc_nondet determinism for a procedure the compiler
would need to check that the procedure is only ever called in a single
solution context.
Simon.
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list