From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24213 invoked by alias); 11 Jul 2014 12:06:10 -0000 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 Received: (qmail 24156 invoked by uid 89); 11 Jul 2014 12:06:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from cantor2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Fri, 11 Jul 2014 12:05:57 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2ACD6ACC2; Fri, 11 Jul 2014 12:05:54 +0000 (UTC) Date: Fri, 11 Jul 2014 12:06:00 -0000 From: Michael Matz To: Jeff Law cc: Richard Biener , Marc Glisse , GCC Patches Subject: Re: update address taken: don't drop clobbers In-Reply-To: <53BED9FE.1040701@redhat.com> Message-ID: References: <53BED9FE.1040701@redhat.com> User-Agent: Alpine 2.00 (LNX 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg00801.txt.bz2 Hi, On Thu, 10 Jul 2014, Jeff Law wrote: > > The insight to note is, that undefined SSA names should really be > > coalesced with something (otherwise you lost an optimization opportunity), > > but it doesn't matter with _what_ each use of the undefined name is > > coalesced, you can even identify different uses of them with different SSA > > names (e.g. the LHS of each using stmt). Requires some change in the > > order things are done in out-of-ssa. > > The last part is what I hinted might be problematical. If some > undefined SSA_NAME appears on the RHS of two PHIs and we want to > coalesce that undefined SSA_NAME with the LHS of each of those PHIs, > then the LHS of those two PHIs must coalesce as well. At least that's > my recollection of how all that stuff worked. Only with the usual definition of coalescing (being transitive). For undefined SSA names the definition can be mended. > It was that realization that made me wonder if we should have a unique > SSA_NAME at each undefined use point. It's easier to implicitely regard every individual use of an undefined SSA name as a unique name in coalescing I think (instead of having it be a unique name explicitely). That is, given: bb1: x_1 = PHI ... bb2: x_4 = PHI ... There is no reason to not regard the two uses of b_3 as separate and identify the first with x_1 and the second with x_2, _without_ coalescing x_1 and x_2. But yes, this doesn't fit readily into the normal coalescing merge-find framework, but rather would have to be something after coalescing when writing out-of-ssa (whenever an undefined use is rewritten just take a random other fitting variable). Ciao, Michael.