public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "jv244 at cam dot ac dot uk" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/34940] New: contained subroutines called only once are not inlined Date: Wed, 23 Jan 2008 13:14:00 -0000 [thread overview] Message-ID: <bug-34940-6642@http.gcc.gnu.org/bugzilla/> (raw) contained subroutines called only once are not inlined, despite the fact that it is always a win (independent of the size of the contained subroutine). It 'only requires' counting the number of calls to cs1 in the routine s1, if it is 1, it should be inlined, as there can not be other callers. example that shows no inlining at -O3 with GNU Fortran (GCC) 4.3.0 20080121 (experimental) [trunk revision 131689] SUBROUTINE S1(X) CALL CS1(X) CONTAINS SUBROUTINE CS1(X) CALL RANDOM_NUMBER(X) WRITE(6,*) X END SUBROUTINE CS1 END SUBROUTINE S1 -- Summary: contained subroutines called only once are not inlined Product: gcc Version: 4.3.0 Status: UNCONFIRMED Keywords: missed-optimization Severity: normal Priority: P3 Component: tree-optimization AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: jv244 at cam dot ac dot uk http://gcc.gnu.org/bugzilla/show_bug.cgi?id=34940
next reply other threads:[~2008-01-23 11:13 UTC|newest] Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top 2008-01-23 13:14 jv244 at cam dot ac dot uk [this message] 2008-01-23 13:14 ` [Bug tree-optimization/34940] " steven at gcc dot gnu dot org 2008-01-23 14:25 ` rguenth at gcc dot gnu dot org 2008-01-23 14:38 ` rguenth at gcc dot gnu dot org 2008-01-23 16:21 ` jv244 at cam dot ac dot uk 2008-01-23 17:57 ` jv244 at cam dot ac dot uk 2008-12-29 14:57 ` pinskia at gcc dot gnu dot org
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=bug-34940-6642@http.gcc.gnu.org/bugzilla/ \ --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: linkBe 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).