From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28213 invoked by alias); 3 Nov 2007 15:27:33 -0000 Received: (qmail 28205 invoked by uid 22791); 3 Nov 2007 15:27:32 -0000 X-Spam-Check-By: sourceware.org Received: from nikam-dmz.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.31) with ESMTP; Sat, 03 Nov 2007 15:27:30 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 29025) id 1F15B5BA2B; Sat, 3 Nov 2007 16:27:28 +0100 (CET) Date: Sat, 03 Nov 2007 15:27:00 -0000 From: Zdenek Dvorak To: Kenneth Zadeck Cc: gcc@gcc.gnu.org Subject: Re: Tree-SSA and POST_INC address mode inompatible in GCC4? Message-ID: <20071103152728.GA14818@kam.mff.cuni.cz> References: <2E073B3ABB3F664DBA1D1C4D5FB47EF405C97B92@NT-IRVA-0752.brcm.ad.broadcom.com> <87fxzna11s.fsf@numenor.site> <20071103142504.GA5043@kam.mff.cuni.cz> <472C8B27.6080303@naturalbridge.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <472C8B27.6080303@naturalbridge.com> User-Agent: Mutt/1.5.9i Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00080.txt.bz2 Hi, > >> I believe that this is something new and is most likely fallout from > >> diego's reworking of the tree to rtl converter. > >> > >> To fix this will require a round of copy propagation, most likely in > >> concert with some induction variable detection, since the most > >> profitable place for this will be in loops. > >> > >> I wonder if any of this effects the rtl level induction variable > >> discovery? > >> > > > > it should not (iv analysis is able to deal with this kind of ivs). > > > does the iv analysis canonize them in a way that we should perhaps > consider moving the auto-inc detection after the iv analysis? no, iv analysis does not change the program; also, since the code in this particular example is not in any loop, iv analysis is somewhat irrelevant for it. Btw. I would have actually expected this code to be folded to *a_3(D) = D.1543_2; a_4 = a_3(D) + 1; b_5 = b_1(D) + 1; D.1543_6 = *b_5; *a_4 = D.1543_6; a_7 = a_3 + 2; b_8 = b_1 + 2; D.1543_9 = *b_8; *a_7 = D.1543_9; a_10 = a_3 + 3; b_11 = b_1 + 3; D.1543_12 = *b_11; *a_10 = D.1543_12; a_13 = a_3 + 4; b_14 = b_1 + 4; D.1543_15 = *b_14; *a_13 = D.1543_15; etc.; I am fairly sure we used to do this. Zdenek