From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16185 invoked by alias); 17 May 2014 07:04:57 -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 16169 invoked by uid 89); 17 May 2014 07:04:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f170.google.com Received: from mail-we0-f170.google.com (HELO mail-we0-f170.google.com) (74.125.82.170) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Sat, 17 May 2014 07:04:54 +0000 Received: by mail-we0-f170.google.com with SMTP id u57so3505767wes.29 for ; Sat, 17 May 2014 00:04:51 -0700 (PDT) X-Received: by 10.180.73.201 with SMTP id n9mr1898192wiv.45.1400310291745; Sat, 17 May 2014 00:04:51 -0700 (PDT) Received: from localhost ([2.26.169.52]) by mx.google.com with ESMTPSA id fi2sm2362008wic.15.2014.05.17.00.04.50 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 17 May 2014 00:04:50 -0700 (PDT) From: Richard Sandiford To: Jeff Law Mail-Followup-To: Jeff Law ,gcc-patches@gcc.gnu.org, rdsandiford@googlemail.com Cc: gcc-patches@gcc.gnu.org Subject: Re: Avoiding some garbage rtl from instantiate_virtual_regs References: <874n0q155r.fsf@talisman.default> <53765474.3060400@redhat.com> Date: Sat, 17 May 2014 07:04:00 -0000 In-Reply-To: <53765474.3060400@redhat.com> (Jeff Law's message of "Fri, 16 May 2014 12:09:56 -0600") Message-ID: <87zjigzy0d.fsf@talisman.default> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-SW-Source: 2014-05/txt/msg01368.txt.bz2 Jeff Law writes: >> Index: gcc/emit-rtl.h >> =================================================================== >> --- gcc/emit-rtl.h 2014-05-15 11:27:06.000259353 +0100 >> +++ gcc/emit-rtl.h 2014-05-16 09:11:42.479556294 +0100 >> @@ -52,10 +52,10 @@ extern tree get_spill_slot_decl (bool); >> ADDR. The caller is asserting that the actual piece of memory pointed >> to is the same, just the form of the address is being changed, such as >> by putting something into a register. */ >> -extern rtx replace_equiv_address (rtx, rtx); >> +extern rtx replace_equiv_address (rtx, rtx, bool = false); >> >> /* Likewise, but the reference is not required to be valid. */ >> -extern rtx replace_equiv_address_nv (rtx, rtx); >> +extern rtx replace_equiv_address_nv (rtx, rtx, bool = false); > Presumably the default value for the inplace argument is to avoid having > to fixup all the call sites. Yeah, partly. > I guess that's OK. Clearly it's a safe default and avoids a fair amount > of unnecessary churn. I suppose the argument against default arguments is that having mandatory arguments forces every caller to think about whether to allow in-place modification. But like you say, in practice there are so many callers to things like plus_constant that I'd have to conservative and add "false" to calls where "true" would have been OK. And then people might think there's a specific reason why it has to be false. > OK for the trunk. Applied, thanks. Richard