From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by sourceware.org (Postfix) with ESMTPS id 479733857354 for ; Wed, 24 May 2023 14:10:26 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 479733857354 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 imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 7533B1F8AA; Wed, 24 May 2023 14:10:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1684937425; 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=at3eoZRxeGqes4yioLt31/Opwa0jGS1+b/bRK8ULoOA=; b=lrbjYhV7Z0kxK50SWY0WWBgDnvJ9yQxt5WOqw6QXdqzwd8BoNtqubNqOt96qwi618ElJGA agh4ojhBIQhnsYaYVvxZ72Va2xC3mW/a1ZicYmkRZD7sSVssVJ0KDtqfMYRGW9B93+PaCE mGG1kzn17F9u13RSRZ1qoDSxD63/R5o= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1684937425; 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=at3eoZRxeGqes4yioLt31/Opwa0jGS1+b/bRK8ULoOA=; b=Dm/E9M71M263GYVqW28PyGTwmYo/BWhr96M77Uy998qWu4lLO08aA/u15RItOJSKRcHTEr /eqN4z2UQGNqsUDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 69F0413425; Wed, 24 May 2023 14:10:25 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id sH/YGdEabmTtHgAAMHmgww (envelope-from ); Wed, 24 May 2023 14:10:25 +0000 From: Martin Jambor To: Aldy Hernandez Cc: Andrew MacLeod , GCC patches Subject: Re: [PATCH] Provide an API for ipa_vr. In-Reply-To: <20230517141622.464538-1-aldyh@redhat.com> References: <20230517141622.464538-1-aldyh@redhat.com> User-Agent: Notmuch/0.37 (https://notmuchmail.org) Emacs/28.2 (x86_64-suse-linux-gnu) Date: Wed, 24 May 2023 16:10:25 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-5.6 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS,TXREP,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: Hello, On Wed, May 17 2023, Aldy Hernandez wrote: > This patch encapsulates the ipa_vr internals into an API. It also > makes it type agnostic, in preparation for upcoming changes to IPA. > > Interestingly, there's a 0.44% improvement to IPA-cp, which I'm sure > we'll soak up with future changes in this area :). > > BTW, there's a note here: > + // vrange_storage is typeless, but we need to know what type of > + // range that is being streamed out (irange, frange, etc). AFAICT, > + // there's no way to get at the underlying type by the time we > + // stream out in write_ipcp_transformation_info. > + tree m_type; > > Could someone more IPA savvy double check this is indeed the case? Yes, that is true and keeping the type around in ipa_vr is probably easier than postponing the deallocation of parameter descriptors somehow. > > OK for trunk? Yes, thanks. Martin > > gcc/ChangeLog: > > * ipa-cp.cc (ipa_value_range_from_jfunc): Use new ipa_vr API. > (ipcp_store_vr_results): Same. > * ipa-prop.cc (ipa_vr::ipa_vr): New. > (ipa_vr::get_vrange): New. > (ipa_vr::set_unknown): New. > (ipa_vr::streamer_read): New. > (ipa_vr::streamer_write): New. > (write_ipcp_transformation_info): Use new ipa_vr API. > (read_ipcp_transformation_info): Same. > (ipa_vr::nonzero_p): Delete. > (ipcp_update_vr): Use new ipa_vr API. > * ipa-prop.h (class ipa_vr): Provide an API and hide internals. > * ipa-sra.cc (zap_useless_ipcp_results): Use new ipa_vr API. > * gcc.dg/ipa/pr78121.c: Adjust for vrange::dump use. > * gcc.dg/ipa/vrp1.c: Same. > * gcc.dg/ipa/vrp2.c: Same. > * gcc.dg/ipa/vrp3.c: Same. > * gcc.dg/ipa/vrp4.c: Same. > * gcc.dg/ipa/vrp5.c: Same. > * gcc.dg/ipa/vrp6.c: Same. > * gcc.dg/ipa/vrp7.c: Same. > * gcc.dg/ipa/vrp8.c: Same.