[m-dev.] for review: constraint propagation

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 24 15:08:31 AEDT 2000

On 24-Feb-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> > 
> > On Wed, Feb 23, 2000 at 04:12:03PM EST, Simon Taylor wrote:
> > > compiler/make_hlds.m:
> > > 	Add `no_inline' marker to the "recursive" procedures
> > > 	introduced for builtins to stop constraint propagation
> > > 	attempting to specialize such procedures.
> > 
> > In general, we might want to inline a recursive procedure - call
> > it loop unrolling. Or more importantly, if we find for example that
> > append is called with an empty first arg very often, then we might
> > decide to inline it into the caller....
> > 
> > In any case, I suggest using a different marker, say one called
> > "recursive".
> I haven't added `no_inline' markers to all recursive predicates, just
> the ones introduced so that builtins can have their address taken.
> (e.g. X + Y = X + Y.). The generated code for these is not recursive,
> because the call in the body is generated as a call to the C builtin.
> Inlining these predicates does not achieve anything. When constraint
> propagation attempts to specialize these predicates, it introduces
> infinite loops, because the call in the body is renamed.

Add `no_inline' markers to these predicates is a bad idea,
I think, because we certainly *do* want them inlined where possible.

Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at        |     -- the last words of T. S. Garp.
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au

More information about the developers mailing list