[Mono-devel-list] Re: [Mono-patches] r40869 - trunk/mcs/mcs

Ben Maurer bmaurer at ximian.com
Fri Feb 18 13:41:14 EST 2005


Hey,

On Fri, 2005-02-18 at 13:30 -0500, Miguel de Icaza wrote:
> Hey,
> 
> > I don't see any reason to require /optimize here. This is an
> > optimization that takes O(1) time, where the constant is *very* small.
> > 
> > Personally, I think /optimize should only be used to enable expensive
> > optimizations. The goal of the flag is so that the default compile will
> > take shorter.
> 
> Marek said that the reason was that you could not set a breakpoint in
> that line if you optimize the code away.  
> 
> I also think this should just be done always, and that not being able to
> set a breakpoint in that line wont hurt.

Yeah, I am not sure how many people need to set a breakpoint on public
int foo = 0. :-).

For now, the thing of setting /optimize to true by default works.
However, if we were to add more expensive optimizations (for example,
csc will do a round of jump optimizations), it would be nice to keep the
`duh' type ones on by default.

(nb, I realize that jump optimizations are done by the jit, etc. But
there might be other more expensive optimizations that are not done by
the jit, or optimizations that are so expensive that they would only be
done at aot time, so that it would be cool to do them at compile time as
well.)

-- Ben




More information about the Mono-devel-list mailing list