[m-rev.] for review: exception analysis, intermodule-analysis and optimization

Julien Fischer juliensf at cs.mu.OZ.AU
Thu Feb 16 15:23:02 AEDT 2006


On Thu, 16 Feb 2006, Peter Wang wrote:

> On 2006-02-16, Julien Fischer <juliensf at cs.mu.OZ.AU> wrote:
> > +        UseAnalysisRegistry = yes,
> > +        some [!AnalysisInfo] (
> > +            module_info_get_analysis_info(!.ModuleInfo, !:AnalysisInfo),
> > +            module_id_func_id(!.ModuleInfo, PPId, ModuleId, FuncId),
> > +            lookup_best_result(ModuleId, FuncId, any_call, MaybeBestStatus,
> > +                !AnalysisInfo, !IO),
> > +            (
> > +                MaybeBestStatus = yes({_Call, Answer, AnalysisStatus}),
> > +                ( AnalysisStatus = invalid ->
> > +                    % Don't make use of invalid analysis results.
> > +                    ExceptionStatus = may_throw(user_exception)
> > +                ;
> > +                    Answer = exception_analysis_answer(ExceptionStatus)
> > +                )
>
> lookup_best_result should never return an invalid answer, but it's okay.
>

Ok.  I'll just call unexpected/2 there.  (The documentation in
analysis.m should say that).

> > +            ;
> > +                MaybeBestStatus = no,
> > +                ExceptionStatus = may_throw(user_exception)
> > +            ),
> > +            module_info_get_name(!.ModuleInfo, ThisModuleName),
> > +            ThisModuleId = module_name_to_module_id(ThisModuleName),
> > +            record_dependency(ThisModuleId, analysis_name, ModuleId, FuncId,
> > +                any_call, !AnalysisInfo),
> > +            module_info_set_analysis_info(!.AnalysisInfo, !ModuleInfo)
>
> Is there a case where exception analysis won't already have recorded the
> dependencies?
>

It's possible for this predicate to be called before exception_analysis
is run, e.g. in simplify.m.

> >  %-----------------------------------------------------------------------------%
> >
> > -    % can_reorder_goals(ModuleInfo, FullyStrict, Goal1, Goal2).
> > +    % can_reorder_goals(ModuleInfo, VarTypes, FullyStrict,
> > +    %   InstmapBeforeGoal1, Goal1, InstmapBeforegoal2, Goal2).
>
> InstmapBeforeGoal2

Fixed.

Thanks for that,

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