From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 32125 invoked by alias); 3 Jan 2010 11:27:39 -0000 Received: (qmail 32097 invoked by uid 48); 3 Jan 2010 11:27:29 -0000 Date: Sun, 03 Jan 2010 11:27:00 -0000 Message-ID: <20100103112729.32096.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug rtl-optimization/42592] really bad register allocation for x86 In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "rguenth at gcc dot gnu dot org" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2010-01/txt/msg00249.txt.bz2 ------- 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