https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91988

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #2)
> I see IPA-CP being applied and that function not inlined.
> 
> Deciding on inlining of small functions.  Starting with size 9.
> Enqueueing calls in fun.constprop/9.
> Enqueueing calls in main/3.
> missed:   not inlinable: main/3 -> fun.constprop/9, mismatched arguments
> Unit growth for small function inlining: 9->9 (0%)
> 
> looks like the inliner predicate needs to consider IPA-CP transform
> being applied somehow?

hmm, w/o LTO and early inlining disabled a single-TU testcase is fine:

Deciding on inlining of small functions.  Starting with size 12.
Enqueueing calls in fun.constprop/6.
Enqueueing calls in int main()/4.
   Estimating body: fun.constprop/6
   Known to be false: not inlined
   size:0 time:0.000000 nonspec time:2.000000
   Estimating body: fun.constprop/6
   Known to be false: not inlined
   size:0 time:0.000000 nonspec time:2.000000
  enqueuing call int main()/4 -> fun.constprop/6, badness -inf
Enqueueing calls in int fun(A)/3.
   Estimating body: fun.constprop/6
   Known to be false: not inlined
   size:0 time:0.000000 nonspec time:2.000000
...
t3.C:6:13: optimized:  Inlined fun.constprop/6 into int main()/4 which now has
time 2.000000 and size 3, net change of -6.

Reply via email to