------- Comment #9 from hubicka at gcc dot gnu dot org  2007-02-21 17:26 -------
The main problem here is that inliner really don't have enough of detailed
information.  In general inlining improves optimization and often leads to
smaller code when inlining such a trivial function ARM or not. Clearly the
outcome depends on function, on the context it is called in and on the target
platform and on the other optimizations enabled but basically only function
body in very rought way is considered when making inlining decisions.

I don't see that adding a hook to provide target specific tuning for size
estimates at this level is going to be useful enough to justify maintenance
cost of such code.  Sadly inlining heuristics is one of the most important and
least informed parts of optimization queue.

Honza

PS: In your testcase x86-64 will pass in register and won't need stack frame
either.  


-- 


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

Reply via email to