public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18219] New: gcc-4.0.0 bloats code by 31%
@ 2004-10-29 14:00 miguel55angel at hotmail dot com
  2004-10-29 14:03 ` [Bug tree-optimization/18219] [4.0 Regression] " pinskia at gcc dot gnu dot org
                   ` (21 more replies)
  0 siblings, 22 replies; 23+ messages in thread
From: miguel55angel at hotmail dot com @ 2004-10-29 14:00 UTC (permalink / raw)
  To: gcc-bugs

Hi,
this little function shows an increase in codesize by 31% or 13 byte.
   
void cdt (int *limit, int *base, int minLen, int maxLen)
{
   int i;
   
   for (i = minLen + 1; i <= maxLen; i++)
      base[i] = ((limit[i-1] + 1) << 1) - base[i];
}
   
   
Size  Version Flags
  41  3.4.2   -Os
  54  4.0.0   -Os -fno-ivopts
  63  4.0.0   -Os

3.4.2 disassembly code
00000000 <cdt>:
   0:   55                      push   %ebp
   1:   89 e5                   mov    %esp,%ebp
   3:   8b 4d 14                mov    0x14(%ebp),%ecx
   6:   56                      push   %esi
   7:   8b 55 10                mov    0x10(%ebp),%edx  
   a:   8b 75 08                mov    0x8(%ebp),%esi
   d:   53                      push   %ebx
   e:   8b 5d 0c                mov    0xc(%ebp),%ebx
  11:   42                      inc    %edx
  12:   39 ca                   cmp    %ecx,%edx  
  14:   7f 0f                   jg     25 <cdt+0x25>
  16:   8b 44 96 fc             mov    0xfffffffc(%esi,%edx,4),%eax
  1a:   40                      inc    %eax
  1b:   01 c0                   add    %eax,%eax
  1d:   2b 04 93                sub    (%ebx,%edx,4),%eax
  20:   89 04 93                mov    %eax,(%ebx,%edx,4)
  23:   eb ec                   jmp    11 <cdt+0x11>
  25:   5b                      pop    %ebx
  26:   5e                      pop    %esi
  27:   5d                      pop    %ebp
  28:   c3                      ret


4.0.0-20041028 disassembly code
00000000 <cdt>:
   0:   55                      push   %ebp
   1:   89 e5                   mov    %esp,%ebp
   3:   8b 4d 10                mov    0x10(%ebp),%ecx
   6:   57                      push   %edi
   7:   8b 7d 08                mov    0x8(%ebp),%edi
   a:   56                      push   %esi
   b:   8b 75 14                mov    0x14(%ebp),%esi
   e:   53                      push   %ebx
   f:   8b 5d 0c                mov    0xc(%ebp),%ebx
  12:   41                      inc    %ecx
  13:   8d 14 8d 00 00 00 00    lea    0x0(,%ecx,4),%edx
  1a:   eb 11                   jmp    2d <cdt+0x2d>
  1c:   8b 44 3a fc             mov    0xfffffffc(%edx,%edi,1),%eax
  20:   41                      inc    %ecx
  21:   40                      inc    %eax
  22:   01 c0                   add    %eax,%eax
  24:   2b 04 1a                sub    (%edx,%ebx,1),%eax
  27:   89 04 1a                mov    %eax,(%edx,%ebx,1)
  2a:   83 c2 04                add    $0x4,%edx
  2d:   39 f1                   cmp    %esi,%ecx
  2f:   7e eb                   jle    1c <cdt+0x1c>
  31:   5b                      pop    %ebx
  32:   5e                      pop    %esi
  33:   5f                      pop    %edi
  34:   5d                      pop    %ebp
  35:   c3                      ret
  
This PR may be related to PR17549, but it's much smaller and
hopefully easier to analyse!

-- 
           Summary: gcc-4.0.0 bloats code by 31%
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: miguel55angel at hotmail dot com
                CC: gcc-bugs at gcc dot gnu dot org
  GCC host triplet: i386-linux


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


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

end of thread, other threads:[~2005-09-27 16:00 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-29 14:00 [Bug c/18219] New: gcc-4.0.0 bloats code by 31% miguel55angel at hotmail dot com
2004-10-29 14:03 ` [Bug tree-optimization/18219] [4.0 Regression] " pinskia at gcc dot gnu dot org
2004-10-29 14:30 ` pinskia at gcc dot gnu dot org
2004-10-29 15:43 ` giovannibajo at libero dot it
2004-10-30 20:35 ` rakdver at gcc dot gnu dot org
2004-11-01 13:21 ` rakdver at gcc dot gnu dot org
2004-11-01 14:40 ` giovannibajo at libero dot it
2004-11-01 14:58 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2004-11-05  9:10 ` uros at kss-loka dot si
2004-11-05 10:34 ` giovannibajo at libero dot it
2004-11-05 14:34 ` pinskia at gcc dot gnu dot org
2004-11-27 21:17 ` neroden at gcc dot gnu dot org
2005-01-21  7:57 ` pinskia at gcc dot gnu dot org
2005-01-21  8:19 ` rakdver at atrey dot karlin dot mff dot cuni dot cz
2005-01-21 14:05 ` steven at gcc dot gnu dot org
2005-01-21 21:05 ` pinskia at gcc dot gnu dot org
2005-02-07  4:52 ` cvs-commit at gcc dot gnu dot org
2005-02-08 14:04 ` andrewhutchinson at cox dot net
2005-02-10 23:53 ` pinskia at gcc dot gnu dot org
2005-02-11 10:15 ` steven at gcc dot gnu dot org
2005-04-21  5:02 ` [Bug tree-optimization/18219] [4.0/4.1 Regression] gcc-4.0/4.1.0 " mmitchel at gcc dot gnu dot org
2005-07-08  1:38 ` mmitchel at gcc dot gnu dot org
2005-09-27 16:02 ` mmitchel 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).