From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6530 invoked by alias); 15 Dec 2011 19:09:27 -0000 Received: (qmail 6516 invoked by uid 22791); 15 Dec 2011 19:09:26 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00,TW_GJ,TW_OV,TW_PQ X-Spam-Check-By: sourceware.org Received: from localhost (HELO gcc.gnu.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 15 Dec 2011 19:09:12 +0000 From: "gjl at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug other/50775] Register allocator sets up frame and frame pointer with low register pressure Date: Thu, 15 Dec 2011 19:10:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: other X-Bugzilla-Keywords: ra X-Bugzilla-Severity: normal X-Bugzilla-Who: gjl at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 4.7.0 X-Bugzilla-Changed-Fields: Status Resolution 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: 2011-12/txt/msg01719.txt.bz2 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50775 Georg-Johann Lay changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |WORKSFORME --- Comment #9 from Georg-Johann Lay 2011-12-15 19:07:02 UTC --- Code looks much better now. Great! With options $ avr-gcc in.c -c -save-temps -dp -Os -mmcu=avr4 -mstrict-X The code is: func1: push r28 ; 43 pushqi1/1 [length = 1] push r29 ; 44 pushqi1/1 [length = 1] /* prologue: function */ /* frame size = 0 */ /* stack size = 2 */ .L__stack_usage = 2 movw r18,r24 ; 2 *movhi/1 [length = 1] movw r28,r22 ; 3 *movhi/1 [length = 1] ld r24,Y ; 8 movqi_insn/4 [length = 1] movw r26,r18 ; 37 *movhi/1 [length = 1] ld r25,X ; 9 movqi_insn/4 [length = 1] add r24,r25 ; 10 addqi3/1 [length = 1] movw r30,r20 ; 38 *movhi/1 [length = 1] ld r25,Z ; 11 movqi_insn/4 [length = 1] add r24,r25 ; 12 addqi3/1 [length = 1] movw r30,r18 ; 39 *movhi/1 [length = 1] ldd r25,Z+1 ; 13 movqi_insn/4 [length = 1] add r24,r25 ; 14 addqi3/1 [length = 1] ldd r25,Y+1 ; 15 movqi_insn/4 [length = 1] add r24,r25 ; 16 addqi3/1 [length = 1] movw r30,r20 ; 40 *movhi/1 [length = 1] ldd r25,Z+1 ; 17 movqi_insn/4 [length = 1] add r24,r25 ; 18 addqi3/1 [length = 1] movw r30,r18 ; 41 *movhi/1 [length = 1] ldd r25,Z+2 ; 19 movqi_insn/4 [length = 1] add r24,r25 ; 20 addqi3/1 [length = 1] ldd r25,Y+2 ; 21 movqi_insn/4 [length = 1] add r24,r25 ; 22 addqi3/1 [length = 1] movw r30,r20 ; 42 *movhi/1 [length = 1] ldd r25,Z+2 ; 23 movqi_insn/4 [length = 1] add r24,r25 ; 29 addqi3/1 [length = 1] /* epilogue start */ pop r29 ; 47 popqi [length = 1] pop r28 ; 48 popqi [length = 1] ret ; 49 return_from_epilogue [length = 1]