From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14948 invoked by alias); 14 Jul 2011 16:12:15 -0000 Received: (qmail 14928 invoked by uid 22791); 14 Jul 2011 16:12:12 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 14 Jul 2011 16:11:52 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id 7852A9AC859; Thu, 14 Jul 2011 18:11:50 +0200 (CEST) Date: Thu, 14 Jul 2011 16:19:00 -0000 From: Jan Hubicka To: Jan Hubicka , GCC Patches Subject: Re: [PATCH] New IPA-CP with real function cloning Message-ID: <20110714161150.GB26075@kam.mff.cuni.cz> References: <20110623192404.GC2736@virgil.arch.suse.de> <20110710170421.GJ26368@atrey.karlin.mff.cuni.cz> <20110714153109.GB1349@virgil.arch.suse.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20110714153109.GB1349@virgil.arch.suse.de> User-Agent: Mutt/1.5.18 (2008-05-17) 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: 2011-07/txt/msg01177.txt.bz2 > > > if (dec < cs->count) > > > cs->count -= dec; > > > else > > > cs->count = 0; > > > } > > > > > > if (dump_file) > > > dump_profile_updates (orig_node, new_node); > > > } > > > > > > if (node->local.can_change_signature) > > > { > > > args_to_skip = BITMAP_GGC_ALLOC (); > > > for (i = 0; i < count; i++) > > > { > > > tree t = VEC_index (tree, known_vals, i); > > > > > > if ((t && TREE_CODE (t) != TREE_BINFO) > > > || !ipa_is_param_used (info, i)) > > > bitmap_set_bit (args_to_skip, i); > > > } > > > } > > > else > > > args_to_skip = NULL; > > When we can't change signature, still we can set is_parm_unused flag for the callee > > to aid later optimizers. > > I assume I can re-use the node->local.can_change_signature flag? Is > that supposed to be set at any given place or can IPA-CP do it on its own? can_change_signature is currently used by i386 backend and it is set by inliner. I plan to move it to visibility pass at the time local functions are dentified. So yes, you can assume it is set and up to date at the time IPA-CP is run. Honza > > > > > Rest of patch looks OK. It definitely reads better than previous ipa-cp.c ;) > > I suppose we will need to get some experience with the logic deciding whether to clone.. > > > Thanks, I'll post the current version in a moment. > > Martin