public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/40106]  New: Time increase with inlining for the Polyhedron test air.f90
@ 2009-05-11 18:04 dominiq at lps dot ens dot fr
  2009-05-12 11:52 ` [Bug middle-end/40106] " hubicka at gcc dot gnu dot org
                   ` (62 more replies)
  0 siblings, 63 replies; 64+ messages in thread
From: dominiq at lps dot ens dot fr @ 2009-05-11 18:04 UTC (permalink / raw)
  To: gcc-bugs

The run time of air.f90 of the Polyhedron test suite takes ~15% more time when
compiled with -fwhole-file than without the option.  I have checked that the
subroutines DERIV(X|Y) are inlined with -finline-limit=100, but not with
-finline-limit=50 (for the later I recover the timing without -fwhole-file).
What I have found very odd is that if I manually inline only a single call (see
below) I get the same timing that with all of them (2*14) inlined. This is the
case for trunk and gfortran 4.4.0, but not for 4.3.3 which gives a slower
executable.


I have inlined 

      SUBROUTINE DERIVX(D,U,Ux,Al,Np,Nd,M)
      IMPLICIT REAL*8(A-H,O-Z)
      PARAMETER (NX=150,NY=150)
      DIMENSION D(NX,33) , U(NX,NY) , Ux(NX,NY) , Al(30) , Np(30)
      DO jm = 1 , M
         jmax = 0
         jmin = 1
         DO i = 1 , Nd
            jmax = jmax + Np(i) + 1
            DO j = jmin , jmax
               uxt = 0.
               DO k = 0 , Np(i)
                  uxt = uxt + D(j,k+1)*U(jmin+k,jm)
               ENDDO
               Ux(j,jm) = uxt*Al(i)
            ENDDO
!
            jmin = jmin + Np(i) + 1
         ENDDO
      ENDDO
      CONTINUE
      END

at line 793 as

!       CALL DERIVX(DX,f4,f4x,ALX,NPX,NDX,MXPy)
      DO jm = 1 , MXPy
         jmax = 0
         jmin = 1
         DO i = 1 , NDX
            jmax = jmax + NPX(i) + 1
            DO j = jmin , jmax
               uxt = 0.
               DO k = 0 , NPX(i)
                  uxt = uxt + DX(j,k+1)*f4(jmin+k,jm)
               ENDDO
               f4x(j,jm) = uxt*ALX(i)
            ENDDO
            jmin = jmin + NPX(i) + 1
         ENDDO
      ENDDO


-- 
           Summary: Time increase with inlining for the Polyhedron test
                    air.f90
           Product: gcc
           Version: 4.5.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: dominiq at lps dot ens dot fr
 GCC build triplet: i686-apple-darwin9
  GCC host triplet: i686-apple-darwin9
GCC target triplet: i686-apple-darwin9


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


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

end of thread, other threads:[~2010-04-30  8:55 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-05-11 18:04 [Bug middle-end/40106] New: Time increase with inlining for the Polyhedron test air.f90 dominiq at lps dot ens dot fr
2009-05-12 11:52 ` [Bug middle-end/40106] " hubicka at gcc dot gnu dot org
2009-05-12 13:23 ` dominiq at lps dot ens dot fr
2009-05-12 14:47 ` rguenther at suse dot de
2009-05-12 16:18 ` dominiq at lps dot ens dot fr
2009-05-22 20:39 ` dominiq at lps dot ens dot fr
2009-05-22 20:41 ` dominiq at lps dot ens dot fr
2009-05-22 20:52 ` dominiq at lps dot ens dot fr
2009-07-13 15:29 ` burnus at gcc dot gnu dot org
2009-08-25 11:56 ` dominiq at lps dot ens dot fr
2009-08-25 12:01 ` [Bug middle-end/40106] Time increase " dominiq at lps dot ens dot fr
2009-08-25 12:22 ` [Bug middle-end/40106] Time increase with inlining " rguenth at gcc dot gnu dot org
2009-08-25 12:30 ` dominiq at lps dot ens dot fr
2009-08-25 12:40 ` rguenther at suse dot de
2009-08-25 12:51 ` dominiq at lps dot ens dot fr
2009-08-25 15:31 ` dominiq at lps dot ens dot fr
2009-08-25 21:25 ` [Bug middle-end/40106] Time increase for the Polyhedron test air.f90 due to bad optimization dominiq at lps dot ens dot fr
2009-08-27 21:59 ` dominiq at lps dot ens dot fr
2009-08-28  1:09 ` howarth at nitro dot med dot uc dot edu
2009-08-28  5:39 ` dominiq at lps dot ens dot fr
2009-08-28  7:19 ` dominiq at lps dot ens dot fr
2009-08-28 12:01 ` dominiq at lps dot ens dot fr
2009-08-28 12:23 ` dominiq at lps dot ens dot fr
2009-08-28 13:36 ` howarth at nitro dot med dot uc dot edu
2009-08-31 13:06 ` dominiq at lps dot ens dot fr
2009-08-31 15:04 ` dominiq at lps dot ens dot fr
2009-08-31 15:21 ` jv244 at cam dot ac dot uk
2009-08-31 15:23 ` rguenther at suse dot de
2009-08-31 23:59 ` dominiq at lps dot ens dot fr
2009-09-01  9:37 ` dominiq at lps dot ens dot fr
2009-09-03  7:10 ` [Bug middle-end/40106] [4.4/4.5 Regression] " dominiq at lps dot ens dot fr
2009-09-03 11:20 ` dominiq at lps dot ens dot fr
2009-09-06 22:15 ` rguenth at gcc dot gnu dot org
2009-09-18  8:58 ` rguenth at gcc dot gnu dot org
2009-10-15 12:49 ` jakub at gcc dot gnu dot org
2009-10-18 13:22 ` rguenth at gcc dot gnu dot org
2009-12-15 16:40 ` rguenth at gcc dot gnu dot org
2010-01-21 13:16 ` jakub at gcc dot gnu dot org
2010-02-25 17:20 ` [Bug middle-end/40106] [4.4/4.5 Regression] Weird interaction between optimize_insn_for_speed_p and -funsafe-math-optimizations dominiq at lps dot ens dot fr
2010-03-16 15:07 ` dominiq at lps dot ens dot fr
2010-03-16 15:11 ` rguenther at suse dot de
2010-03-16 15:26 ` rguenth at gcc dot gnu dot org
2010-03-16 15:50 ` dominiq at lps dot ens dot fr
2010-03-16 15:52 ` rguenther at suse dot de
2010-03-16 16:04 ` dominiq at lps dot ens dot fr
2010-03-16 16:07 ` rguenther at suse dot de
2010-03-16 16:39 ` dominiq at lps dot ens dot fr
2010-03-16 16:59 ` jakub at gcc dot gnu dot org
2010-03-16 17:14 ` dominiq at lps dot ens dot fr
2010-03-18 18:30 ` dominiq at lps dot ens dot fr
2010-03-19 10:26 ` rguenth at gcc dot gnu dot org
2010-03-19 10:35 ` rguenth at gcc dot gnu dot org
2010-03-19 15:40 ` dominiq at lps dot ens dot fr
2010-03-20 13:03 ` dominiq at lps dot ens dot fr
2010-03-20 13:21 ` dominiq at lps dot ens dot fr
2010-03-20 14:19 ` rguenther at suse dot de
2010-03-20 14:40 ` dominiq at lps dot ens dot fr
2010-03-20 15:00 ` rguenth at gcc dot gnu dot org
2010-03-20 15:12 ` rguenth at gcc dot gnu dot org
2010-03-22 10:36 ` rguenth at gcc dot gnu dot org
2010-03-22 12:38 ` rguenth at gcc dot gnu dot org
2010-03-22 12:39 ` [Bug middle-end/40106] [4.4 " rguenth at gcc dot gnu dot org
2010-03-25 17:38 ` hubicka at gcc dot gnu dot org
2010-04-30  9:01 ` jakub 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).