http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47663
Richard Guenther <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW Last reconfirmed| |2011.02.09 16:11:54 Ever Confirmed|0 |1 --- Comment #1 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-09 16:11:54 UTC --- It's actually not that simple as we have to match the caller / callee side of costs to not run into negative limits. We could disregard returns in registers completely or account for the cost (benefit) by not accounting the return statement at all. It would at least be nice to have a way to positively bias inlining of struct X { ...large... } foo(); at a call-site that does not use the return value. Currently call-sites that do use the return value get a benefit as well (independent of, for example, if the return slot is passed by reference). Not handling the return type at all would at least remove that false benefit accounting.