From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9172 invoked by alias); 28 Dec 2010 20:26:30 -0000 Received: (qmail 9164 invoked by uid 22791); 28 Dec 2010 20:26:30 -0000 X-SWARE-Spam-Status: No, hits=-5.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,TW_TM,T_RP_MATCHES_RCVD,T_TVD_MIME_NO_HEADERS X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 28 Dec 2010 20:26:23 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id oBSKQKrA011676 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 28 Dec 2010 15:26:21 -0500 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id oBSKQJDb025977 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 28 Dec 2010 15:26:20 -0500 Received: from livre.localdomain (livre-to-gw.oliva.athome.lsd.ic.unicamp.br [172.31.160.19]) by freie.oliva.athome.lsd.ic.unicamp.br (8.14.4/8.14.4) with ESMTP id oBSKQIZf001667; Tue, 28 Dec 2010 18:26:18 -0200 Received: from livre.localdomain (aoliva@localhost [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id oBSKQHPf003627; Tue, 28 Dec 2010 18:26:17 -0200 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id oBSKQGpC003626; Tue, 28 Dec 2010 18:26:16 -0200 From: Alexandre Oliva To: Richard Guenther Cc: gcc-patches@gcc.gnu.org Subject: Re: [PR debug/46931] don't crash propagating removed DEFs into debug stmts References: Date: Tue, 28 Dec 2010 21:09:00 -0000 In-Reply-To: (Richard Guenther's message of "Sun, 26 Dec 2010 23:04:25 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" 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: 2010-12/txt/msg01907.txt.bz2 --=-=-= Content-length: 1016 On Dec 26, 2010, Richard Guenther wrote: > Yeah. But wasn't there a correctness problem with propagating as well? > the the debug info will refer to the wrong value of i. Remember that > we can have overlapping life ranges for SSA names but not for the > decls for which we emit debug info. The value expressions in debug stmts refer to the SSA names, so there's no problem, at least in this regard. The overlapping ranges, if expanded to different pseudos, it will get the correct RTL expressions; if no longer available at a point, it should not get any RTL expression (although it would in theory be possible to do better, looking for some equivalence). Now, I don't think the latter has been actually verified, especially after the change that made us go straight from SSA to RTL, so if you have evidence that we're doing it wrong, I'd love to see it. >> Regstrapping your proposed patch now. > It's ok to commit if it works (with your testcase). Here's what I installed. --=-=-= Content-Type: text/x-diff Content-Disposition: inline; filename=tree-vect-loop-manip-pr46931.patch Content-length: 1004 for gcc/ChangeLog from Richard Guenther PR debug/46931 * tree-vect-loop-manip.c (slpeel_tree_peel_loop_to_edge): Update SSA before removing dead stmts. Index: gcc/tree-vect-loop-manip.c =================================================================== --- gcc/tree-vect-loop-manip.c.orig 2010-12-18 04:28:14.000000000 -0200 +++ gcc/tree-vect-loop-manip.c 2010-12-23 05:50:15.540018010 -0200 @@ -1442,6 +1442,9 @@ slpeel_tree_peel_loop_to_edge (struct lo if (update_first_loop_count) slpeel_make_loop_iterate_ntimes (first_loop, first_niters); + BITMAP_FREE (definitions); + delete_update_ssa (); + /* Remove all pattern statements from the loop copy. They will confuse the expander if DCE is disabled. ??? The pattern recognizer should be split into an analysis and @@ -1451,9 +1454,6 @@ slpeel_tree_peel_loop_to_edge (struct lo adjust_vec_debug_stmts (); - BITMAP_FREE (definitions); - delete_update_ssa (); - return new_loop; } --=-=-= Content-length: 257 -- Alexandre Oliva, freedom fighter http://FSFLA.org/~lxoliva/ You must be the change you wish to see in the world. -- Gandhi Be Free! -- http://FSFLA.org/ FSF Latin America board member Free Software Evangelist Red Hat Brazil Compiler Engineer --=-=-=--