public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug rtl-optimization/42592] really bad register allocation for x86
Date: Sun, 03 Jan 2010 11:27:00 -0000	[thread overview]
Message-ID: <20100103112729.32096.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42592-7834@http.gcc.gnu.org/bugzilla/>



------- Comment #1 from rguenth at gcc dot gnu dot org  2010-01-03 11:27 -------
Confirmed.  Well, GCC produces exactly the same code as ICC when using
-O2 -mno-accumulate-outgoing-args -fno-optimize-sibling-calls
-fomit-frame-pointer

Thus the sibcall comes in the way as obviously does -maccumulate-outgoing-args.
w/o -maccumulate-outgoing-args but the rest of the options we produce

Perl_sv_vsetpvfn:
        pushl   %ebx
        subl    $40, %esp
        movl    48(%esp), %ebx
        movl    $0, 8(%esp)
        movl    $.LC0, 4(%esp)
        movl    %ebx, (%esp)
        call    Perl_sv_setpvn
        movl    72(%esp), %eax
        movl    %ebx, (%esp)
        movl    %eax, 24(%esp)
        movl    68(%esp), %eax
        movl    %eax, 20(%esp)
        movl    64(%esp), %eax
        movl    %eax, 16(%esp)
        movl    60(%esp), %eax
        movl    %eax, 12(%esp)
        movl    56(%esp), %eax
        movl    %eax, 8(%esp)
        movl    52(%esp), %eax
        movl    %eax, 4(%esp)
        call    Perl_sv_vcatpvfn
        addl    $40, %esp
        popl    %ebx
        ret

which looks like we cannot do better with that constraint.  The sibcall
variant isn't too bad either.

Of course with sibcalling and -mno-accumulate-outgoing-args we fail to
re-order argument setup for optimal size, even with -fschedule-insns.
So that part of the bug would be valid.


-- 

rguenth at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |vmakarov at redhat dot com
           Severity|normal                      |enhancement
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|0                           |1
           Keywords|                            |missed-optimization, ra
   Last reconfirmed|0000-00-00 00:00:00         |2010-01-03 11:27:29
               date|                            |


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


  reply	other threads:[~2010-01-03 11:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-03  8:02 [Bug rtl-optimization/42592] New: " andi-gcc at firstfloor dot org
2010-01-03 11:27 ` rguenth at gcc dot gnu dot org [this message]
2010-01-03 15:40 ` [Bug rtl-optimization/42592] " andi-gcc at firstfloor 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=20100103112729.32096.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).