This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


On 03/10/2015 08:07 PM, Aldy Hernandez wrote:
On 03/10/2015 04:59 PM, Jason Merrill wrote:
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).

The comment is now in the abstracted function simple_empty_class_p
header.  Although, I did remove the "remove any copies of empty classes"
bit, as well as the FIXME.  I can put both of those parts back in if
desired.  Presumably, the "remove any copies" back where it was, and the
FIXME in the abstracted function?

Sounds good.

Jason



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]