This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH, tm]: Annotate _ITM_free as leaf
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Uros Bizjak <ubizjak at gmail dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <hubicka at ucw dot cz>
- Date: Wed, 28 Aug 2013 19:07:49 +0200
- Subject: Re: [PATCH, tm]: Annotate _ITM_free as leaf
- Authentication-results: sourceware.org; auth=none
- References: <CAFULd4YiziGY6Kuecd49wvhLb39tGiCJmPaxZou63nG=MTRBsA at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Aug 28, 2013 at 07:06:04PM +0200, Uros Bizjak wrote:
> >> while adding LEAF attributes, I apparently missed free. Malloc is already annotated.
> >> Fixed thus. Comitted as obvoius.
> >
> > Given that glibc headers mark free as leaf and nothing has been reported
> > against it, it is probably fine; but you've ignored the comment that
> > told you to adjust also BUILT_IN_TM_FREE.
>
> Like in attached patch.
>
> 2013-08-28 Uros Bizjak <ubizjak@gmail.com>
>
> * gtm-builtins.def (_ITM_free): Declare leaf.
>
> Tested on x86_64-pc-linux-gnu {,-m32}.
>
> OK for mainline?
Yes, thanks.
> --- gcc/gtm-builtins.def (revision 202054)
> +++ gcc/gtm-builtins.def (working copy)
> @@ -28,7 +28,7 @@ DEF_TM_BUILTIN (BUILT_IN_TM_MALLOC, "_ITM_malloc",
> DEF_TM_BUILTIN (BUILT_IN_TM_CALLOC, "_ITM_calloc",
> BT_FN_PTR_SIZE_SIZE, ATTR_TMPURE_MALLOC_NOTHROW_LIST)
> DEF_TM_BUILTIN (BUILT_IN_TM_FREE, "_ITM_free",
> - BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LIST)
> + BT_FN_VOID_PTR, ATTR_TMPURE_NOTHROW_LEAF_LIST)
>
> /* Logging builtins. */
> DEF_TM_BUILTIN (BUILT_IN_TM_LOG_1, "_ITM_LU1",
Jakub