[m-rev.] for review: don't do constant propagation if no-allow-inlining

Ian MacLarty maclarty at cs.mu.OZ.AU
Sun Mar 13 19:30:01 AEDT 2005


On Sun, Mar 13, 2005 at 03:46:27PM +1100, Julien Fischer wrote:
> 
> On Sat, 12 Mar 2005, Ian MacLarty wrote:
> 
> > Another one found with the mdb dice command :-)
> >
> What's the emoticon for smug grin?
> 

what about :-} 

> 
> > Estimated hours taken: 2
> > Branches: main
> >
> > Fix failing test debugger/declarative/binary_search.  The test fails with -O3
> > and grade = *.debug.  It was failing because int.- was being inlined
> > in certain places, because constant propagation was ignoring the allow_inlining
> > option.
> 
> It's not really being inlined, it's being evaluated at those points, i.e
> it won't be there (inlined or not) after constant propagation.
> 

You're right.  I've changed the log message to:

It was failing because int.- was being evaluated by
constant propagation, and so wasn't generating any interface events.

> > compiler/handle_options.m
> > 	If allow_inlining is no then turn of constant_propagation since this
> > 	inlines builtins.
> >
> 
> I think that the correct fix here would not to enable constant propagation
> in the .debug and .decldebug grades (unless of course --trace-optimized
> was specified).
> 

What if the user specifies --no-inlining?  Should constant propagation
be done then?  Currently constant propogation is turned off if this option is
given.

When tracing is enabled the allow-inlining option is set to no
but inline-builtins isn't (nor are any of the other inlinings).  I believe
this is done because inlining is turned off in other places for different
reasons and it's simpler to set one option than several.

Zoltan, is there meant to be any difference between --no-allow-inlining and
--no-inlining?

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