[m-dev.] Re: for review: deforestation [4/4]

Simon Taylor stayl at cs.mu.OZ.AU
Thu Mar 19 10:05:42 AEDT 1998


Thanks for your review Fergus,

>
> > 	% pd_util__can_reorder_goals(ModuleInfo, FullyStrict, Goal1, Goal2).
> > 	%
> > 	% Goals can be reordered if
> > 	% - the goals are independent
> > 	% - the goals are pure
> > 	% - any possible change in termination behaviour is allowed
> > 	% 	according to the semantics options.
> > :- pred pd_util__can_reorder_goals(module_info::in, bool::in, hlds_goal::in,
> > 		hlds_goal::in) is semidet.
> 
> You could also use the termination info computed by termination
> analysis, couldn't you?  Any reason why you don't do that?
> 

It does. pd_util__reordering_maintains_termination calls
code_aux__goal_cannot_loop, which checks the termination info.

Simon.



More information about the developers mailing list