Bug#173513: [Bug tree-optimization/9079] [tree-ssa] Inline constant function pointers
------- Comment #19 from jamborm at gcc dot gnu dot org 2008-07-25 17:51 -------
As of revision 138092 we are handling this much better.
The example in bug description gets inlined at -O2 even with
-fno-early-inlining.
The example in comment #10 does not work as expected yet. The new
edge is discovered but the always_inline attribute is disregarded and
the inlined does not decide to inline it on its own. I will try to
fix this but it should be noted that few guarantees can be made about
indirect calls to always_inline functions and about always_inline
functions which have their addresses taken in general.
As far as the third example in comment #11 is concerned, the only
problem is loading the target function from the array. The loaded
value is not recognized to be constant early enough to be considered
for inlining. That is really a separate issue though, quite different
from the one originally described. I will have a look at what we can
do earlier but I will close the bug if this is the only outstanding
issue and I don't see an easy fix.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9079
------- You are receiving this mail because: -------
You reported the bug, or are watching the reporter.
Reply to: