public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/34940]  New: contained subroutines called only once are not inlined
@ 2008-01-23 13:14 jv244 at cam dot ac dot uk
  2008-01-23 13:14 ` [Bug tree-optimization/34940] " steven at gcc dot gnu dot org
                   ` (5 more replies)
  0 siblings, 6 replies; 17+ messages in thread
From: jv244 at cam dot ac dot uk @ 2008-01-23 13:14 UTC (permalink / raw)
  To: gcc-bugs

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


^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-03-29  8:58 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-34940-4@http.gcc.gnu.org/bugzilla/>
2010-11-10 18:04 ` [Bug tree-optimization/34940] contained subroutines called only once are not inlined hubicka at gcc dot gnu.org
2010-11-10 18:06 ` hubicka at gcc dot gnu.org
2010-11-10 19:13 ` jakub at gcc dot gnu.org
2010-11-10 22:36 ` hubicka at ucw dot cz
2010-11-10 22:43 ` jakub at gcc dot gnu.org
2010-11-10 22:50 ` hubicka at ucw dot cz
2010-11-10 22:54 ` rguenth at gcc dot gnu.org
2010-11-10 22:55 ` rguenth at gcc dot gnu.org
2010-11-10 23:05 ` hubicka at ucw dot cz
2012-06-29 14:53 ` Joost.VandeVondele at mat dot ethz.ch
2013-03-29  8:58 ` Joost.VandeVondele at mat dot ethz.ch
2008-01-23 13:14 [Bug tree-optimization/34940] New: " jv244 at cam dot ac dot uk
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

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