This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [patch] original function and TM clone has to be marked needed
- From: Richard Henderson <rth at redhat dot com>
- To: Patrick Marlier <patrick dot marlier at gmail dot com>
- Cc: Aldy Hernandez <aldyh at redhat dot com>, gcc-patches at gcc dot gnu dot org, Torvald Riegel <triegel at redhat dot com>
- Date: Thu, 01 Dec 2011 13:38:37 -0800
- Subject: Re: [patch] original function and TM clone has to be marked needed
- References: <4ED701CD.6000900@gmail.com>
On 11/30/2011 08:25 PM, Patrick Marlier wrote:
> In the current version, the original function and its clone are marked as taken with cgraph_mark_address_taken_node. But it seems not enough and it has to be marked as needed.
> It comes with a testcase (testsuite/g++.dg/tm/ctor-used.C).
>
> Passed all TM tests.
>
> PS: Note that there is still a problem with the testcase because _ITM_getTMCloneOrIrrevocable is called instead of _ITM_getTMCloneSafe (it is an atomic not relaxed transaction). I can have a look if you want.
>
> 2011-11-30 Patrick Marlier <patrick.marlier@gmail.com>
>
> * trans-mem.c (ipa_tm_insert_gettmclone_call): mark original
> and clone as needed.
>
There are more problems than that. This function is defined in this
file, and somehow we declined to clone it. We should not have attempted
to call _ITM_getTMCloneOrIrrevocable or _ITM_getTMCloneSafe.
r~