From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by sourceware.org (Postfix) with ESMTPS id 3AC40394742C for ; Tue, 29 Jun 2021 11:34:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3AC40394742C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=suse.cz Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=suse.cz Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out1.suse.de (Postfix) with ESMTP id 39E35226AA; Tue, 29 Jun 2021 11:34:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1624966463; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dX6Osnoc8BGk9F+aYVinKJAju7wPyscH2vfbw9C0kWw=; b=bqM+GR1yg5O4xMpQw9RSmhrKpA9GdNTbYziYlHgWZhgmW2MYnCxEjCPHxlZD5pG604lcZY VaCpKbXUtpf2eU09mVvrRWZd510vRtjqxi8/A0wTBjw3J/VPw7aPiITQWlms73iONPE2w1 0qA2agsdoDDD8awJf9CQ81NPl4BDqRw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1624966463; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=dX6Osnoc8BGk9F+aYVinKJAju7wPyscH2vfbw9C0kWw=; b=PheUdjsxuiKL+RYp1dXj0O1LyyuFX9M40FejzO+3SwoFoS8Dg5ir1pHdyWpmrf54KZoUKQ EGu41eoCpTlPb5Cg== Received: from suse.cz (virgil.suse.cz [10.100.13.50]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by relay2.suse.de (Postfix) with ESMTPS id 25C2CA3B85; Tue, 29 Jun 2021 11:34:23 +0000 (UTC) From: Martin Jambor To: Richard Biener , Martin Sebor Cc: Jonathan Wakely , gcc-patches Subject: Re: [PATCH] define auto_vec copy ctor and assignment (PR 90904) In-Reply-To: References: <91545a73-12af-33b2-c6e7-119b5a21de60@gmail.com> <4d503394-4e82-1d36-41ca-34315042775b@redhat.com> <49569f1d-9856-55c7-b9e9-578bbd7c7b7a@gmail.com> User-Agent: Notmuch/0.32 (https://notmuchmail.org) Emacs/27.2 (x86_64-suse-linux-gnu) Date: Tue, 29 Jun 2021 13:34:23 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-4.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 11:34:25 -0000 Hi, On Tue, Jun 29 2021, Richard Biener via Gcc-patches wrote: > On Mon, Jun 28, 2021 at 8:07 PM Martin Sebor wrote: [...] >> >> vNULL can bind to a const vec& (via the vec conversion ctor) but >> not to vec&. The three functions that in the patch are passed >> vNULL modify the argument when it's not vNULL but not otherwise. >> An alternate design is to have them take a vec* and pass in >> a plain NULL (or nullptr) instead of vNULL. That would require >> some surgery on the function bodies that I've been trying to >> avoid in the first pass. > > But I wonder if since you now identified them they could be massaged > prior to doing the change. > > I do hope we end up not needing .to_vec () after all, if no users remain ;) I am afraid that the decay from ipa_auto_call_arg_values to ipa_call_arg_values would still need them. The auto variant is very useful for ipa-cp but the non-auto one is necessary because of how ipa_cached_call_context is structured and how it operates. I tried to rework ipa_cached_call_context last summer - though I do not remember it enough to be 100% sure that it would avoid the need for to_vec - but Honza strongly preferred how it works now. Martin