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 869633858C3A for ; Tue, 21 Sep 2021 09:31:23 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 869633858C3A 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 556B12209F; Tue, 21 Sep 2021 09:31:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_rsa; t=1632216682; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osCB2+C7VcAKh4QRB9VfTUSIvDm4Uia+N8xZsT8JMx0=; b=VqcNb5Hk/3g9N44uK1YaEVbei0bKS7qR7dATo7K/NPSVL/rv0i7k5iQoReVKphNNh88JKU 9getPBEZ8pu33scLIc0vKs/Uu0pp/4GtXK/O1Q07788fjZEShbDcxJvWFYriLJ5Oznn+5E 55tpzlMHj+5ipB3o450u2ZzUpkJgQGw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.cz; s=susede2_ed25519; t=1632216682; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=osCB2+C7VcAKh4QRB9VfTUSIvDm4Uia+N8xZsT8JMx0=; b=WUsc0qUpOBvTzPOiZ1rshuhwTVHoK9ZCiKvVbsqR2WWfwWmj9hFKrc43j1odbdYk/jCD8u xPT0HIZ3yzcjzKCQ== 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 10923A3B9B; Tue, 21 Sep 2021 09:31:22 +0000 (UTC) From: Martin Jambor To: "Kewen.Lin" Cc: Richard Biener , Jan Hubicka , Martin =?utf-8?Q?Li=C5=A1ka?= , Segher Boessenkool , Bill Schmidt , fweimer@redhat.com, GCC Patches Subject: Re: [PATCH v2] ipa-inline: Add target info into fn summary [PR102059] In-Reply-To: References: <0d10e5a2-a966-3b26-2e59-b6fd98d703a2@linux.ibm.com> <8a4da9c1-b46e-5176-2cde-65ac4a59dd75@linux.ibm.com> <8d230b16-e507-583f-7d98-d2ff45c7e656@linux.ibm.com> User-Agent: Notmuch/0.32.3 (https://notmuchmail.org) Emacs/27.2 (x86_64-suse-linux-gnu) Date: Tue, 21 Sep 2021 11:31:21 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-5.1 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.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) 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, 21 Sep 2021 09:31:25 -0000 Hi, On Tue, Sep 21 2021, Kewen.Lin wrote: > on 2021/9/17 =E4=B8=8B=E5=8D=887:26, Martin Jambor wrote: >> On Fri, Sep 17 2021, Kewen.Lin wrote: [...] >>> >>> Sorry that I failed to use 16 bit-fields for this, I figured out that >>> the bit-fields can not be address-taken or passed as non-const referenc= e. >>> The gentype also failed to recognize uint16_t if I used uint16_t direct= ly >>> in ipa-fnsummary.h. Finally I used unsigned int instead. >>> >>=20 >> well, you could have used: >>=20 >> unsigned int target_info : 16; >>=20 >> for the field (and uint16_t when passed to hooks). >>=20 >> But I am not sure if it is that crucial. >>=20 > > I may miss something, specifically I tried with: > > 1) > > unsigned int target_info : 16; > unsigned inlinable : 1; > ... > > update_ipa_fn_target_info (uint16_t &, const gimple *) Yeah, you would have to copy the bit-field into a temporary, pass reference to that in the hook and then copy it back. At least that is what I meant but since we apparently want unsigned int everywhere, it does not matter. Martin