From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31131 invoked by alias); 10 Jun 2012 18:30:55 -0000 Received: (qmail 31118 invoked by uid 22791); 10 Jun 2012 18:30:55 -0000 X-SWARE-Spam-Status: No, hits=-2.8 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RCVD_IN_DNSWL_NONE,RCVD_IN_HOSTKARMA_NO,T_RP_MATCHES_RCVD,UNPARSEABLE_RELAY X-Spam-Check-By: sourceware.org Received: from mailout10.t-online.de (HELO mailout10.t-online.de) (194.25.134.21) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sun, 10 Jun 2012 18:30:41 +0000 Received: from fwd20.aul.t-online.de (fwd20.aul.t-online.de ) by mailout10.t-online.de with smtp id 1SdmuM-0002or-6U; Sun, 10 Jun 2012 20:30:38 +0200 Received: from [192.168.0.104] (Ssroq-ZG8h2kkdlZfKm9w8bjK6yEoDr26y--NnRT-q-apNjbsQtw8cfK5V0WoNTwHx@[93.218.159.5]) by fwd20.t-online.de with esmtp id 1SdmuJ-12Saoq0; Sun, 10 Jun 2012 20:30:35 +0200 Message-ID: <1339353032.2300.39.camel@yam-132-YW-E178-FTW> Subject: Re: inc-dec (was: Re: [RFC, ivopts] fix bugs in ivopts address cost computation) From: Oleg Endo To: Hans-Peter Nilsson Cc: Sandra Loosemore , gcc-patches@gcc.gnu.org Date: Sun, 10 Jun 2012 18:39:00 -0000 In-Reply-To: References: <4FCE3512.7070607@codesourcery.com> <1339345901.2300.30.camel@yam-132-YW-E178-FTW> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Mime-Version: 1.0 X-IsSubscribed: yes 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: 2012-06/txt/msg00552.txt.bz2 On Sun, 2012-06-10 at 13:50 -0400, Hans-Peter Nilsson wrote: > On Sun, 10 Jun 2012, Oleg Endo wrote: > > I've tried some of the cases mentioned in > > http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50749 > > with Sandra's patch applied. Unfortunately it didn't help much. > > But thanks for checking! > Sure thing. I forgot to mention that when trying it, I also played a bit with the address cost function, but it didn't have any effect either. > > BTW, auto-inc-dec uses 'set_src_cost' in 'attempt_change' to determine > > the address costs. At least the SH target will not respond to that > > properly. I was thinking of adding something to sh_rtx_costs to invoke > > sh_address_cost as a fix for that, but on the other hand I was wondering > > why the target's address cost function isn't used in auto-inc-dec > > directly ... > > Sounds like a bug. Depends on the perspective ;) I don't know on/for which target it was developed originally. If this target's rtx cost function meets the expectations, then there's a bug in any other target ;) > TBH, I haven't dug into the real reason why > auto-inc-dec-generation is still poor (or whether it by magic > has improved dramatically recently), because every so often > there's some effort to improve that, alas I don't remember > seeing any improvement mentioned for any target I have interest > in. At the time when I filed the aforementioned PR it was at least able to find and generate the first post-inc addr (see the original description of the PR). Now it seems that it fails to do so. So I guess some of the pre-conditions for the auto-inc-dec pass have slightly changed since then... Cheers, Oleg