[patch] Optimize empty class copies within a C++ return statement

Jason Merrill jason@redhat.com
Tue Mar 10 23:59:00 GMT 2015


On 03/10/2015 07:10 PM, Aldy Hernandez wrote:
> -	    /* Remove any copies of empty classes.  We check that the RHS
> -	       has a simple form so that TARGET_EXPRs and non-empty
> -	       CONSTRUCTORs get reduced properly, and we leave the return
> -	       slot optimization alone because it isn't a copy (FIXME so it
> -	       shouldn't be represented as one).

Let's keep this comment.

> gimplify op0 to an lvalue

Also, I don't see this first step in the patch; I wanted that so the op0 
side-effects happen first.

Jason



More information about the Gcc-patches mailing list