[m-dev.] Re: intermodule optimization bug

Tyson Richard DOWD trd at students.cs.mu.oz.au
Sun Oct 26 00:50:46 AEST 1997


Fergus Henderson wrote:
> Simon Taylor, you wrote:
> > 
> > io__report_stats calls benchmarking:report_stats, which does non-logical 
> > I/O. The compiler is allowed to optimize away the second call to 
> > benchmarking:report_stats since it has the same inputs as the first.
> > The best fix for this is to add :- pragma(no_inline, io__report_stats/2) 
> > to io.m.
> 
> Yes, I agree that this is the best fix for now.
> 
> library/io.m:
> 	Add `pragma no_inline' declaration for io__report_stats,
> 	to prevent duplicate-call optimization of report_stats/0.

The comment in the code should reflect the "for now" status of
the fix. Otherwise, seems fine.

>


-- 
       Tyson Dowd           # To fix this, edit BLAH\BlahKey\Blah\Whatever 
                            # in the registry.
     trd at cs.mu.oz.au        # *WARNING* Editing the registry can DESTROY
http://www.cs.mu.oz.au/~trd # your machine forever. Do not do it.



More information about the developers mailing list