From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4699 invoked by alias); 1 Oct 2009 13:54:33 -0000 Received: (qmail 4682 invoked by uid 22791); 1 Oct 2009 13:54:31 -0000 X-SWARE-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from mel.act-europe.fr (HELO mel.act-europe.fr) (212.99.106.210) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 01 Oct 2009 13:54:26 +0000 Received: from localhost (localhost [127.0.0.1]) by filtered-smtp.eu.adacore.com (Postfix) with ESMTP id 8BE19290010; Thu, 1 Oct 2009 15:54:24 +0200 (CEST) Received: from mel.act-europe.fr ([127.0.0.1]) by localhost (smtp.eu.adacore.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id l-CLl7ztqxZy; Thu, 1 Oct 2009 15:54:18 +0200 (CEST) Received: from [192.168.1.2] (83-155-198-229.rev.libertysurf.net [83.155.198.229]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mel.act-europe.fr (Postfix) with ESMTP id E9063290003; Thu, 1 Oct 2009 15:54:17 +0200 (CEST) From: Eric Botcazou To: Richard Sandiford Subject: Re: Use simplify_replace_rtx rather than wrap_constant Date: Thu, 01 Oct 2009 13:54:00 -0000 User-Agent: KMail/1.9.6 (enterprise 20070904.708012) Cc: gcc-patches@gcc.gnu.org, Bernd Schmidt References: <87ljk1sr4c.fsf@firetop.home> <4AC35E54.7090404@t-online.de> <87y6nwdwvz.fsf@firetop.home> In-Reply-To: <87y6nwdwvz.fsf@firetop.home> MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200910011557.10845.ebotcazou@adacore.com> Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit 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: 2009-10/txt/msg00049.txt.bz2 > Do you think the changes are unsafe, or are you worried about the > performance impact? If the latter, then what about my suggestion > of making rtx_equal_p an inline wrapper to an out-of-line function? > I think that is a separate change, but I'm happy to do it if you > think it's worthwhile (or even necessary for the main patch to > be acceptable). FWIW I share Bernd's concerns, in particular I'd be cautious about unsharing everything by default; the recog.c approach might be better, with the two variants validate_change and validate_unshare_change But I agree that making rtx_equal_p an inline wrapper would be a good idea to speed things up; there are already a few manual attemps, e.g. /* X matches FROM if it is the same rtx or they are both referring to the same register in the same mode. Avoid calling rtx_equal_p unless the operands look similar. */ if (x == from || (REG_P (x) && REG_P (from) && GET_MODE (x) == GET_MODE (from) && REGNO (x) == REGNO (from)) || (GET_CODE (x) == GET_CODE (from) && GET_MODE (x) == GET_MODE (from) && rtx_equal_p (x, from))) { validate_unshare_change (object, loc, to, 1); return; } -- Eric Botcazou