From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2831 invoked by alias); 27 Jul 2007 17:29:57 -0000 Received: (qmail 2816 invoked by uid 22791); 27 Jul 2007 17:29:57 -0000 X-Spam-Check-By: sourceware.org Received: from mail1.panix.com (HELO mail1.panix.com) (166.84.1.72) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 27 Jul 2007 17:29:53 +0000 Received: from mailspool3.panix.com (mailspool3.panix.com [166.84.1.78]) by mail1.panix.com (Postfix) with ESMTP id 6D61E29404; Fri, 27 Jul 2007 13:29:51 -0400 (EDT) Received: from [192.168.1.60] (pool-70-104-131-212.nycmny.fios.verizon.net [70.104.131.212]) by mailspool3.panix.com (Postfix) with ESMTP id 3FBB51696F; Fri, 27 Jul 2007 13:29:51 -0400 (EDT) Message-ID: <46AA2B8E.1080900@naturalbridge.com> Date: Fri, 27 Jul 2007 17:39:00 -0000 From: Kenneth Zadeck User-Agent: Thunderbird 1.5.0.12 (X11/20060911) MIME-Version: 1.0 To: gcc-bugzilla@gcc.gnu.org, gcc-patches , "Park, Seongbae" , Richard Sandiford , "Bonzini, Paolo" Subject: Re: [Bug middle-end/32749] [4.3 regression]: gfortran.dg/auto_array_1.f90 References: <20070726115131.30046.qmail@sourceware.org> In-Reply-To: <20070726115131.30046.qmail@sourceware.org> Content-Type: multipart/mixed; boundary="------------040005010209020908090306" Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01999.txt.bz2 This is a multi-part message in MIME format. --------------040005010209020908090306 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-length: 1082 This patch rearranges the updating of the local dataflow info when building reg_dead notes. The need for this was that processing was not correctly handled for clobbers that occurred within conditional call insns. A rare case but one that at least happens on the ia-64. This patch not only fixes the regressions listed in pr32749, but also fixes the gfortran.dg/matmul_3.f90 on the ia-64 regressions. This patch was bootstrapped and regression tested yesterday on x86-64 and ia-64 and was again bootstrapped this morning on x86-64 (just to make sure there were no interactions with richard sandiford's fixes to closely related code that was just committed.) Committed as revision 126987. Kenny 2007-07-26 Kenneth Zadeck PR middle-end/32749 * df-problems.c (df_create_unused_note): Removed do_not_gen parm and the updating of the live and do_not_gen sets. (df_note_bb_compute): Added updating of live and do_not_gen sets for regular defs so that the case of clobber inside conditional call is processed correctly. --------------040005010209020908090306 Content-Type: text/x-patch; name="notes5.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="notes5.diff" Content-length: 3175 Index: df-problems.c =================================================================== --- df-problems.c (revision 126979) +++ df-problems.c (working copy) @@ -3868,13 +3868,12 @@ df_set_dead_notes_for_mw (rtx insn, rtx } -/* Create a REG_UNUSED note if necessary for DEF in INSN updating LIVE - and DO_NOT_GEN. Do not generate notes for registers in artificial - uses. */ +/* Create a REG_UNUSED note if necessary for DEF in INSN updating + LIVE. Do not generate notes for registers in ARTIFICIAL_USES. */ static rtx df_create_unused_note (rtx insn, rtx old, struct df_ref *def, - bitmap live, bitmap do_not_gen, bitmap artificial_uses) + bitmap live, bitmap artificial_uses) { unsigned int dregno = DF_REF_REGNO (def); @@ -3899,12 +3898,6 @@ df_create_unused_note (rtx insn, rtx old #endif } - if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER + DF_REF_MAY_CLOBBER))) - bitmap_set_bit (do_not_gen, dregno); - - /* Kill this register if it is not a subreg store or conditional store. */ - if (!(DF_REF_FLAGS (def) & (DF_REF_PARTIAL | DF_REF_CONDITIONAL))) - bitmap_clear_bit (live, dregno); return old; } @@ -3915,7 +3908,7 @@ df_create_unused_note (rtx insn, rtx old static void df_note_bb_compute (unsigned int bb_index, - bitmap live, bitmap do_not_gen, bitmap artificial_uses) + bitmap live, bitmap do_not_gen, bitmap artificial_uses) { basic_block bb = BASIC_BLOCK (bb_index); rtx insn; @@ -4012,17 +4005,17 @@ df_note_bb_compute (unsigned int bb_inde for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) { struct df_ref *def = *def_rec; - if (!(DF_REF_FLAGS (def) & (DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER))) - old_unused_notes - = df_create_unused_note (insn, old_unused_notes, - def, live, do_not_gen, - artificial_uses); - - /* However a may or must clobber still needs to kill the - reg so that REG_DEAD notes are later placed - appropriately. */ - else - bitmap_clear_bit (live, DF_REF_REGNO (def)); + unsigned int dregno = DF_REF_REGNO (def); + if (!DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER)) + { + old_unused_notes + = df_create_unused_note (insn, old_unused_notes, + def, live, artificial_uses); + bitmap_set_bit (do_not_gen, dregno); + } + + if (!DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL | DF_REF_CONDITIONAL)) + bitmap_clear_bit (live, dregno); } } else @@ -4043,10 +4036,16 @@ df_note_bb_compute (unsigned int bb_inde for (def_rec = DF_INSN_UID_DEFS (uid); *def_rec; def_rec++) { struct df_ref *def = *def_rec; + unsigned int dregno = DF_REF_REGNO (def); old_unused_notes = df_create_unused_note (insn, old_unused_notes, - def, live, do_not_gen, - artificial_uses); + def, live, artificial_uses); + + if (!DF_REF_FLAGS_IS_SET (def, DF_REF_MUST_CLOBBER | DF_REF_MAY_CLOBBER)) + bitmap_set_bit (do_not_gen, dregno); + + if (!DF_REF_FLAGS_IS_SET (def, DF_REF_PARTIAL | DF_REF_CONDITIONAL)) + bitmap_clear_bit (live, dregno); } } --------------040005010209020908090306--