public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug middle-end/30908] -Os inlines functions that are called more than once (optimization regression)
Date: Wed, 21 Feb 2007 17:27:00 -0000	[thread overview]
Message-ID: <20070221172659.5558.qmail@sourceware.org> (raw)
In-Reply-To: <bug-30908-11199@http.gcc.gnu.org/bugzilla/>



------- 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


  parent reply	other threads:[~2007-02-21 17:27 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-02-21 11:48 [Bug c/30908] New: " j at uriah dot heep dot sax dot de
2007-02-21 11:50 ` [Bug c/30908] " j at uriah dot heep dot sax dot de
2007-02-21 12:34 ` rguenth at gcc dot gnu dot org
2007-02-21 12:35 ` rguenth at gcc dot gnu dot org
2007-02-21 12:58 ` j at uriah dot heep dot sax dot de
2007-02-21 14:36 ` rguenth at gcc dot gnu dot org
2007-02-21 14:47 ` j at uriah dot heep dot sax dot de
2007-02-21 15:11 ` [Bug middle-end/30908] " pinskia at gcc dot gnu dot org
2007-02-21 17:19 ` j at uriah dot heep dot sax dot de
2007-02-21 17:27 ` hubicka at gcc dot gnu dot org [this message]
2007-02-21 17:42 ` steven at gcc dot gnu dot org
2007-02-21 19:32 ` j at uriah dot heep dot sax dot de
2007-02-21 19:32 ` j at uriah dot heep dot sax dot de
2007-02-21 19:33 ` j at uriah dot heep dot sax dot de
2007-02-21 19:38 ` pinskia at gcc dot gnu dot org
2007-02-21 19:51 ` j at uriah dot heep dot sax dot de
2007-02-24  9:12 ` pinskia at gcc dot gnu dot org
2007-02-24  9:14 ` [Bug middle-end/30908] tree cost for types which are > WORD_SIZE pinskia at gcc dot gnu dot org
2007-04-10 14:35 ` giovannibajo at libero dot it
2008-04-08 10:03 ` rguenth at gcc dot gnu dot org
2009-01-15 11:15 ` m dot reszat at kostal dot com
2010-09-08  9:50 ` abnikant dot singh at atmel dot com

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070221172659.5558.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).