[tree-ssa] Simplifying TARGET_EXPR

Jason Merrill jason@redhat.com
Mon Jul 22 13:10:00 GMT 2002


>>>>> "Nathan" == Nathan Sidwell <nathan@codesourcery.com> writes:

> Mark Mitchell wrote:
>> Maybe I'm developing an unhealthy paranoia.  On the one hand,
>> optimizing away more copy constructors is like optimizing away
>> more copies between scalars, and I'm all for having -O2 do more
>> of that!  On the other, copy constructor elision is observable
>> behavior in the program, and it's going to make it hard to do
>> debug, profile, and otherwise analyze your program if the number
>> of copy constructor calls changes when you optimize.

> I disagree. Alias analysis makes optimized broken programs hard
> to debug, I don't see why temporary elision is any different..
> Maybe have the elision separately disablable at -O2, but I think
> it should be permissable.

I agree.  Copy constructor calls are small change in debuggability of
optimized code.

Of course, we've never tried to optimize away more copy constructors after
inlining, so this is all theoretical...

Jason



More information about the Gcc mailing list