This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension
- From: Ilya Enkovich <enkovich dot gnu at gmail dot com>
- To: Jan Hubicka <hubicka at ucw dot cz>
- Cc: Jeff Law <law at redhat dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 25 Jul 2014 13:58:09 +0400
- 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> <20140724134105 dot GA26403 at kam dot mff dot cuni dot cz>
2014-07-24 17:41 GMT+04:00 Jan Hubicka <email@example.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:
> 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.
> Sorry for ignoring the patches so long - I seem to have missed my CC in original
> thread. I would welcome if you CC firstname.lastname@example.org for cgraph/ipa related patches.