[m-rev.] for review: inst_results

Zoltan Somogyi zs at unimelb.edu.au
Mon Apr 23 13:17:16 AEST 2012


On 23-Apr-2012, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>> avoided, allowing the updated inst to keept the address as well as the 
>> value
>
> s/keept/keep/

Done.

>> of the corresponding original inst.
>>
>> Without this diff, the compiler takes more than 10 seconds to compile
>> zm_rcpsp_cpx.m, with most of that time being spent in mode checking.
>> With this diff, it takes less than 5 seconds. Basically, mode checking
>> went from 6+ seconds to 1. i
>
> Nicely done!

Thanks.

>> The profile of the compiler is now flat on this input; no single pass
>> takes much more time than the others.
>
> How extensively did you check this with different combinations of grade
> and optimization options?

Not very extensive at all; the mode checking pass is done regardless
of grade and optimization options. With some optimizations, including
I think deforestation, we repeat mode checking, so we should get the same
benefit again. But you are right: there may be worse-than-linear algorithms
left in optimizations and code generators that can cause the profile to be
non-flat if/when they are invoked.

>> +        % ALL arguments of ALL functors should be required to be valid 
>> mutable
>> +        % insts.
>> +        list.member(bound_functor(_, ArgInsts), BoundInsts),
>> +        list.member(ArgInst, ArgInsts),
>> +        is_valid_mutable_inst_2(ModuleInfo, ArgInst, Expansions0)
>
> Yes, it is wrong.  It should indeed check that all arguments of all fuctors 
> are
> valid mutable insts.

OK, I will make that as a separate change.

Thanks for the review.

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