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

Olga Golovanevsky OLGA@il.ibm.com
Thu Aug 17 13:04:00 GMT 2006


"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.

Richard, Dan and Kaveh,
many thanks for helping me to understand this issue,

olga

>
> Richard.
>
> > thanks you a lot,
> >
> > Olga
> >
> > > Richard.
> >
> >



More information about the Gcc-patches mailing list