This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension
- From: Jan Hubicka <hubicka at ucw dot cz>
- To: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- Cc: Jan Hubicka <hubicka at ucw dot cz>, Jeff Law <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Jul 2014 15:41:05 +0200
- Subject: Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension
- Authentication-results: sourceware.org; auth=none
- References: <20140416140313 dot GC41722 at msticlxl57 dot ims dot intel dot com> <53CF3267 dot 8080309 at redhat dot com> <20140724095907 dot GA15208 at msticlxl57 dot ims dot intel dot com> <20140724113841 dot GB9836 at atrey dot karlin dot mff dot cuni dot cz> <CAMbmDYY8hVzJoOji9866_DzrEe5MmfiGr+1WEhyW__3UUS_URw at mail dot gmail dot com>
> > 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