public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "guillaume dot melquiond at ens-lyon dot fr" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/23372] [4.0/4.1/4.2 Regression] Temporary aggregate copy not elided when passing parameters by value
Date: Thu, 06 Apr 2006 10:59:00 -0000	[thread overview]
Message-ID: <20060406105912.25541.qmail@sourceware.org> (raw)
In-Reply-To: <bug-23372-7904@http.gcc.gnu.org/bugzilla/>



------- Comment #36 from guillaume dot melquiond at ens-lyon dot fr  2006-04-06 10:59 -------
The generated code is getting both better and worse. I just tested with GCC
4.1, and there is now a byte-by-byte (!) copy instead of memcpy. So not only
does GCC use superfluous copies, but it generates code such that these copies
are the slowest possible. On the other hand, there is only one copy left. So
this is better than GCC 4.0, but still worse than GCC 3.4.

        pushl   %ebp
        movl    %esp, %ebp
        pushl   %ebx
        subl    $8004, %esp
        leal    -4004(%ebp), %ebx
        movl    %ebx, (%esp)
        call    f
        xorl    %edx, %edx
        subl    $4, %esp
.L3:
        cmpl    $4000, %edx
        jb      .L2
        call    g
        movl    -4(%ebp), %ebx
        leave
        ret
        .p2align 4,,7
.L2:
        movzbl  (%ebx,%edx), %eax
        movb    %al, (%esp,%edx)
        incl    %edx
        jmp     .L3


-- 


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


  parent reply	other threads:[~2006-04-06 10:59 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-23372-7904@http.gcc.gnu.org/bugzilla/>
2005-10-16 22:20 ` [Bug c++/23372] [4.0/4.1 " pinskia at gcc dot gnu dot org
2005-10-31  5:00 ` mmitchel at gcc dot gnu dot org
2006-01-14 12:40 ` [Bug c++/23372] [4.0/4.1/4.2 " rguenth at gcc dot gnu dot org
2006-01-14 17:12 ` rguenth at gcc dot gnu dot org
2006-01-30 13:46 ` rguenth at gcc dot gnu dot org
2006-01-30 13:48 ` rguenth at gcc dot gnu dot org
2006-01-31 15:24 ` [Bug c++/23372] [4.0/4.1 " pinskia at gcc dot gnu dot org
2006-01-31 16:03 ` rguenth at gcc dot gnu dot org
2006-01-31 16:05 ` pinskia at gcc dot gnu dot org
2006-01-31 16:05 ` pinskia at gcc dot gnu dot org
2006-02-02  9:16 ` rguenth at gcc dot gnu dot org
2006-02-02 17:16 ` sje at cup dot hp dot com
2006-02-03  1:49 ` hp at gcc dot gnu dot org
2006-02-03  9:16 ` rguenth at gcc dot gnu dot org
2006-02-07 15:36 ` rguenth at gcc dot gnu dot org
2006-02-07 15:39 ` [Bug c++/23372] [4.0/4.1/4.2 " rguenth at gcc dot gnu dot org
2006-02-08 15:11 ` rguenth at gcc dot gnu dot org
2006-02-08 15:16 ` rguenth at gcc dot gnu dot org
2006-02-08 15:16 ` pinskia at gcc dot gnu dot org
2006-02-08 15:18 ` rguenth at gcc dot gnu dot org
2006-02-14 15:41 ` rguenth at gcc dot gnu dot org
2006-02-14 15:41 ` rguenth at gcc dot gnu dot org
2006-02-24  0:30 ` mmitchel at gcc dot gnu dot org
2006-04-06 10:59 ` guillaume dot melquiond at ens-lyon dot fr [this message]
2006-05-25  2:34 ` mmitchel at gcc dot gnu dot org
2006-08-22 21:09 ` jason at gcc dot gnu dot org
2006-08-23  4:28 ` jason at gcc dot gnu dot org
2006-08-23 14:23 ` [Bug c++/23372] [4.0/4.1 " jason at gcc dot gnu dot org
2006-08-23 14:23 ` jason at gcc dot gnu dot org
2006-08-23 14:34 ` jason at gcc dot gnu dot org
2006-10-07  3:49 ` pinskia at gcc dot gnu dot org
2006-10-07  6:16 ` 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=20060406105912.25541.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).