From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18716 invoked by alias); 1 Jun 2011 22:31:48 -0000 Received: (qmail 18707 invoked by uid 22791); 1 Jun 2011 22:31:47 -0000 X-SWARE-Spam-Status: No, hits=-5.8 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD 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; Wed, 01 Jun 2011 22:31:31 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id p51MVULE018879 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Wed, 1 Jun 2011 18:31:31 -0400 Received: from freie.oliva.athome.lsd.ic.unicamp.br (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id p51MVREZ004901 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 1 Jun 2011 18:31:30 -0400 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 p51MVPcb004819; Wed, 1 Jun 2011 19:31:26 -0300 Received: from livre.localdomain (aoliva@localhost.localdomain [127.0.0.1]) by livre.localdomain (8.14.3/8.14.3/Debian-5+lenny1) with ESMTP id p51MSKA5007640; Wed, 1 Jun 2011 19:28:20 -0300 Received: (from aoliva@localhost) by livre.localdomain (8.14.3/8.14.3/Submit) id p51MSFTr007639; Wed, 1 Jun 2011 19:28:15 -0300 From: Alexandre Oliva To: Michael Matz Cc: gcc-patches@gcc.gnu.org Subject: Re: [PR48866] three alternative fixes References: Date: Wed, 01 Jun 2011 22:31:00 -0000 In-Reply-To: (Michael Matz's message of "Mon, 30 May 2011 15:31:35 +0200 (CEST)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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: 2011-06/txt/msg00113.txt.bz2 On May 30, 2011, Michael Matz wrote: > Hi, > On Mon, 30 May 2011, Alexandre Oliva wrote: >> > 3. expand dominators before dominated blocks, so that DEFs of >> > replaceable SSA names are expanded before their uses. Expand them >> > when they're encountered, but not requiring a REG as a result. >> > Save the RTL expression that results from the expansion for use in >> > debug insns and at the non-debug use. >> >> This patch addresses some of the problems in 2, avoiding expanding code >> out of order within a block, and (hopefully) ensuring that, expanding >> dominators before dominatedblocks, DEFs are expanded before USEs. > That isn't necessary. Replaceable SSA_NAMEs are defined in the same BB as > their use, and hence they're expanded strictly before their use already > right now. Hmm... You're obviously right. I must have misinterpreted some other failure, then. Thanks, this enables some simplification to two of the patches. >> There is a theoretical possibility that a USE may be expanded before a >> DEF, depending on internal details of out-of-ssa, > This can only happen with non-replaceable SSA_NAMEs and I thought you wish > to deal only with replaceable. Yup. > That said, I dislike approach 2 for the same worries you noted. And with > the above I don't see why your approach (3) isn't workable without changes > to the BB order, which should then be a really small patch. Yup. I'll give that a try. > As SSA_NAMEs are (fairly) dense it might be better to simply use an > array instead of a pointer_map for the SSA_NAME->rtx mapping. Likewise. Thanks! -- 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