This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node
- From: Patrick Marlier <patrick dot marlier at gmail dot com>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 7 Aug 2014 08:10:51 +0200
- Subject: Re: [PATCH, trans-mem, PR 61393] Copy tm_clone field of cgraph_node when cloning the node
- Authentication-results: sourceware.org; auth=none
- References: <20140730165605 dot GE14543 at virgil dot suse> <20140806140241 dot GJ14543 at virgil dot suse>
Hi Martin,
On Wed, Aug 6, 2014 at 4:02 PM, Martin Jambor <mjambor@suse.cz> wrote:
> Hi,
>
> On Wed, Jul 30, 2014 at 06:56:05PM +0200, Martin Jambor wrote:
>> Hi,
>>
>> IPA-CP can wreck havoc to transactional memory support as described in
>> the summary of the PR in bugzilla. It seems the cause is that IPA-CP
>> clones of nodes created by trans-mem do not have their tm_clone flag
>> set. For release branches we have decided to simply disable IPA-CP of
>> trans-mem clones but for trunk we'd like to avoid this. I am not 100%
>> sure that just copying the flag is OK but it seems that it works for
>> the provided testcase and nobody from the trans-mem people has
>> commented in bugzilla for over a month. So I suggest we commit this
>> patch and wait and see if something breaks. Hopefully nothing will.
>>
>
> Honza has approved the patch in person and so I have committed it as
> revision 213666 after re-testing. Hopefully it does not break
> anything, if it does then read the paragraph above and remember it is
> not really my fault :-)
Thanks for fixing this!
Copying the flag seems to me the good solution. tm_clone flag
indicates that this is an instrumented function. It is used for
different part in trans-mem but particularly to find tm region to
instrument.
However, I am wondering if we should not call record_tm_clone_pair if
it duplicates a tm_clone. libitm needs to find the clone of particular
function. So the question is: Can the compiler replace a function
pointer by its corresponding constprop function pointer in some cases?
--
Patrick Marlier