From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27869 invoked by alias); 13 Mar 2013 20:38:02 -0000 Received: (qmail 25359 invoked by uid 48); 13 Mar 2013 20:37:33 -0000 From: "steven at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug rtl-optimization/21182] [4.6/4.7/4.8 Regression] gcc can use registers but uses stack instead Date: Wed, 13 Mar 2013 20:38:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: rtl-optimization X-Bugzilla-Keywords: missed-optimization, ra X-Bugzilla-Severity: normal X-Bugzilla-Who: steven at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.6.4 X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 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: 2013-03/txt/msg01059.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21182 --- Comment #12 from Steven Bosscher 2013-03-13 20:37:23 UTC --- Curious to hear whether "-fschedule-insns -fsched-pressure" helps. At least from the %esp and %ebp counts, it looks hopeful: $ ./cc1 -quiet -m32 -O2 t.c -DNAIL_REGS -o t.s.NAIL $ ./cc1 -quiet -m32 -O2 t.c -UNAIL_REGS -o t.s $ ./cc1 -quiet -m32 -O2 t.c -UNAIL_REGS -o t.s.sched_pres \ -fschedule-insns -fsched-pressure $ egrep -c '%ebp|%esp' t.s* t.s:366 t.s.NAIL:305 t.s.sched_pres:277 $ grep ident t.s .ident "GCC: (GNU) 4.8.0 20130313 (experimental) [trunk revision 196638]" It is unfortunate that nobody has put in the resources yet to make options like "-fschedule-insns -fsched-pressure" the default for x86.