From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13773 invoked by alias); 25 Jul 2014 09:58:15 -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 13762 invoked by uid 89); 25 Jul 2014 09:58:14 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-ig0-f179.google.com Received: from mail-ig0-f179.google.com (HELO mail-ig0-f179.google.com) (209.85.213.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Fri, 25 Jul 2014 09:58:12 +0000 Received: by mail-ig0-f179.google.com with SMTP id h18so531929igc.12 for ; Fri, 25 Jul 2014 02:58:09 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.50.61.140 with SMTP id p12mr3712072igr.41.1406282289653; Fri, 25 Jul 2014 02:58:09 -0700 (PDT) Received: by 10.64.229.17 with HTTP; Fri, 25 Jul 2014 02:58:09 -0700 (PDT) In-Reply-To: <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> <20140724134105.GA26403@kam.mff.cuni.cz> Date: Fri, 25 Jul 2014 11:20:00 -0000 Message-ID: Subject: Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension From: Ilya Enkovich To: Jan Hubicka Cc: Jeff Law , gcc-patches Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2014-07/txt/msg01724.txt.bz2 2014-07-24 17:41 GMT+04:00 Jan Hubicka : >> > 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... Thanks for looking into this! I looked into clones mechanism before introducing instrumentation clones and did not see how I can re-use it. Probably you may see if it can be easily adopted. Thanks, Ilya > > 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 >