[patch] [struct-reorg] port to ssa - 47% on art on ppc

Olga Golovanevsky OLGA@il.ibm.com
Thu Aug 17 14:30:00 GMT 2006



"Richard Guenther" <richard.guenther@gmail.com> wrote on 17/08/2006
16:03:56:

> On 8/17/06, Olga Golovanevsky <OLGA@il.ibm.com> wrote:
> >
> > "Richard Guenther" <richard.guenther@gmail.com> wrote on 16/08/2006
> > 23:10:23:
> >
> > >
> > > You should use DECL_FUNCTION_CODE on the function decl and
> > > see if it matches BUILT_IN_MALLOC (or others, see gcc/builtins.def).
> > > This is because a user might override malloc with something different
> > > and still set the malloc attribute on it.
> > >
> > > > I need to distinguish between these functions because their trees
> > > > have different structures, and I need to go inside and analyze
their
> > > > arguments.
> > > > (For example, calloc has two parameters, and malloc only one)
> > >
> > > There's at least BUILT_IN_CALLOC and BUILT_IN_ALLOCA.
> >
> > ok. so for now I will use this method to identify malloc and alloca,
that
> > is
> > obviously restriction from optimization point of view, but still allows
> > struct-reorg to be applied on art. (It uses malloc)
> >
> > In general, we can deal with any allocation function, even user defined
> > (with malloc attribute), if we knows its interface.
>
> For that you need another user annotation really.  As the malloc
attribute
> only specifies properties regarding aliasing of a pointer return value.

right.
I understand it's the reason why realloc does not have malloc attribute.

>
> Richard.



More information about the Gcc-patches mailing list