This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, Pointer Bounds Checker 9/x] Cgraph extension


2014-07-24 17:41 GMT+04:00 Jan Hubicka <hubicka@ucw.cz>:
>> > 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
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]