------- Comment #6 from j at uriah dot heep dot sax dot de  2007-02-21 14:46 
-------
(In reply to comment #5)

> Unfortunately(?) the cost metrics for inlining are completely target
> independent at the moment.  Can you check whether adjusting --param
> inline-call-cost will
> fix it for you?

Only if I change it to 0, I get a different picture:

---8<---
Deciding on inlining.  Starting with 8 insns.

Inlining always_inline functions:

Deciding on smaller functions:
Considering inline candidate wait.

Considering wait with 4 insns
 to be inlined into main
 Estimated growth after inlined into all callees is +2 insns.
 Estimated badness is 4, frequency 100.00.
 Inlined into main which now has 7 insns,net change of +3 insns.

Considering wait with 4 insns
 to be inlined into main
 Estimated growth after inlined into all callees is -1 insns.
 Estimated badness is 1, frequency 100.00.
 Inlined into main which now has 10 insns,net change of -1 insns.

Deciding on functions called once:

Inlined 2 calls, eliminated 1 functions, 8 insns turned to 10 insns.
...
---8<---

So it inlines them still, even though it knows the resulting code will
grow. :-(


-- 


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

Reply via email to