This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: 0001-Part-1.-Add-generic-part-for-Intel-CET-enabling
- From: Jeff Law <law at redhat dot com>
- To: "Tsimbalist, Igor V" <igor dot v dot tsimbalist at intel dot com>, "'gcc-patches at gcc dot gnu dot org'" <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 13 Sep 2017 12:56:48 -0600
- Subject: Re: 0001-Part-1.-Add-generic-part-for-Intel-CET-enabling
- Authentication-results: sourceware.org; auth=none
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com
- Authentication-results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=law at redhat dot com
- Dmarc-filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2B09D5D5EA
- References: <D511F25789BA7F4EBA64C8A63891A0027AA04014@IRSMSX102.ger.corp.intel.com> <d4754eea-8944-bde9-9446-b9ee524b804c@redhat.com> <D511F25789BA7F4EBA64C8A63891A0027AA8EE91@IRSMSX102.ger.corp.intel.com>
On 09/12/2017 09:59 AM, Tsimbalist, Igor V wrote:
>
>> Q. Do we need to do anything with ICF (identical code folding) and CFE?
>> Given two functions which have the same implementation in gimple, except
>> that one has a notrack indirect call and the other has a tracked indirect call,
>> what is proper behavior? I think we'd keep them separate which implies we
>> need to make sure the notrack attribute is part of the ICF hashing
>> implementation. It'd probably even be worth building a test for this :-)
> Are you talking about a case when such two functions are inlined? Or there is a possibility to merge
> function bodies if they are identical?
The latter. The compiler has a couple strategies when it finds
identical bodies. I'm over-simplifying, but given two functions, A and
B. If ICF hashing finds they are identical, then only one function
definition would be emitted.
So given two functions A & B. They are identical except that A has an
indirect call and the signature of the call target has the notrack
attribute while B has an indirect call and the signature of the call
target does not have the notrack attribute.
A & B would be subject to ICF, but I don't think that's the right/safe
thing to do. Or am I missing something?
jeff