[m-rev.] for review: ssdebug fixes

Julien Fischer juliensf at csse.unimelb.edu.au
Thu Jun 10 01:21:03 AEST 2010


On Wed, 9 Jun 2010, Peter Wang wrote:

> Branches: main, 10.04
>
> Fix problems with the ssdebug transformation at higher optimisation levels
> and with less conventional code.
>
> compiler/ssdebug.m:
>        Transform code without relying on a determinism pass afterwards.
>
>        Handle procedures with inferred determinisms tighter than declared
>        determinisms, i.e. inferred semidet but declared cc_nondet, and
>        inferred cc_multi but declared cc_nondet.  We transform the procedure
>        according to the inferred determinism, but in those two cases we have
>        to introduce promise_equivalent_solutions scopes.
>
>        Do not treat input arguments with more precise final insts,
>        i.e. ground >> bound(...), as if they were output arguments.
>
>        Handle procedures with existentially typed head variables.  The
>        corresponding type_info argument is an output variable, which gets
>        renamed away to a temporary variable, and is only assigned just before
>        leaving the procedure.  At the point where we build up the variable
>        list for the exit port, we must use the temporary variable.
>
>        Factor out common code in the four process_proc* predicates.
>
> compiler/mercury_compile_middle_passes.m:
>        Remove an unnecessary determinism pass.
>
> compiler/hlds_pred.m:
>        Make define_new_pred take a sym_name as the name of the predicate to
>        define.  Thus the new predicate does not have to have the current
>        module as the module qualifier.
>
> compiler/loop_inv.m:
>        Auxiliary predicates generated from procedures with the same name from
>        different modules could clash (in target code) if they had the same
>        line number.  Retain the module qualifier from the original predicate
>        to distinguish between them.
>
>        However, that is still not enough to distinguish special predicates.
>        Use the predicate id in place of a counter to distinguish between
>        special predicates for different types.  This should only affect
>        ssdebug grades; special predicates normally wouldn't contain anything
>        to hoist.

That looks fine.

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