From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6625 invoked by alias); 24 Jul 2014 13:41:12 -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 6605 invoked by uid 89); 24 Jul 2014 13:41:10 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW,RP_MATCHES_RCVD autolearn=ham version=3.3.2 X-HELO: nikam.ms.mff.cuni.cz Received: from nikam.ms.mff.cuni.cz (HELO nikam.ms.mff.cuni.cz) (195.113.20.16) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 24 Jul 2014 13:41:09 +0000 Received: by nikam.ms.mff.cuni.cz (Postfix, from userid 16202) id CE9FC540866; Thu, 24 Jul 2014 15:41:05 +0200 (CEST) Date: Thu, 24 Jul 2014 13:52:00 -0000 From: Jan Hubicka To: Ilya Enkovich Cc: Jan Hubicka , Jeff Law , gcc-patches Subject: Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension Message-ID: <20140724134105.GA26403@kam.mff.cuni.cz> References: <20140416140313.GC41722@msticlxl57.ims.intel.com> <53CF3267.8080309@redhat.com> <20140724095907.GA15208@msticlxl57.ims.intel.com> <20140724113841.GB9836@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2014-07/txt/msg01666.txt.bz2 > > So the patch is introducing yet another notion of clone (in addition to existing virtual clones > > and function versions used by ifun) and you add a new type of reference (CHKP) to link the > > original and the clone. > > > > Why do you need to link things in 3 different ways? (i.e. instrumented_version points to the > > same place as CHKP and as orig_decl, right?). > > CHKP reference is required to have reachability algorithms working > correctly and not removing required instrumented nodes. References > are rebuilt time to time and instrumented_version is used to rebuild > CHKP reference. orig_decl is required because original function node > may be removed as unreachable. > > > > > I would preffer if this can be put into the existing clone mechanizm. The virtual clones can > > have quite generic transformations done on them and the do perform all the necessary links > > back and forth. > > I suppose virtual clones are useful when we may delay their > materialization, i.e. for IPA passes. For checker we have > instrumentation almost immediately following clone creation. > Instrumentation is a GIMPLE pass and we have to materialize clones to > have bodies to instrument. After materialization there is no link to > original node anymore and it means we would still require all new > fields in cgraph_node structure. > > > > > I will look into the rest of changes, is there some overview? > > I have a short overview of how it works on a wiki page: > https://gcc.gnu.org/wiki/Intel%20MPX%20support%20in%20the%20GCC%20compiler#Instrumentation_clones Thanks, I will take a deeper look. I am just somewhat concerned that you seem to be duplicating a lot of logic that is already present in the other clonning schemes we have (i.e. arranging sane partitining, keeping clones linked with their original etc). We may want to generalize current mechanizm rather than implementing similar in parallel... Sorry for ignoring the patches so long - I seem to have missed my CC in original thread. I would welcome if you CC hubicka@ucw.cz for cgraph/ipa related patches. Honza