diff mbox

[tm] : Annotate _ITM_free as leaf

Message ID CAFULd4YiziGY6Kuecd49wvhLb39tGiCJmPaxZou63nG=MTRBsA@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak Aug. 28, 2013, 5:06 p.m. UTC
Hello!

>> 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?

Uros.

Comments

Jakub Jelinek Aug. 28, 2013, 5:07 p.m. UTC | #1
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
Jan Hubicka Aug. 28, 2013, 5:11 p.m. UTC | #2
> 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.

Thank you for beating me!
Honza
diff mbox

Patch

Index: gcc/gtm-builtins.def
===================================================================
--- 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",