http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47663

Richard Guenther <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |enhancement

--- Comment #2 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-02-10 
13:05:14 UTC ---
We want to inline all cases of

int foo0();
void bar0() { foo0(); }
void foobar0() { bar0(); }

void foo1();
void bar1() { foo1(); }
void foobar1() { bar1(); }

int foo2();
int bar2() { return foo2(); }
void foobar2() { bar2(); }

int foo3();
int bar3() { return foo3(); }
void foobar3() { return bar3(); }

int bar4() { return 0; }
void foobar4() { bar4(); }

int bar5() { return 0; }
void foobar5() { return bar5(); }

and corresponding versions that return an aggregate at
-O -finline-small-functions --param early-inlining-insns=0
(thus, with strict non-growth limits).

To achieve that we probably need to track whether a callgraph-edge
caller uses its return value (or even better, store the call cost
in the cgraph-edge instead of computing it based on the type of
the callee).

Reply via email to