[Freeciv-Dev] Re: (PR#3801) use of "malloc" attribute in mem.h
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Mar 26, 2003 at 05:43:27PM -0800, Rafa³ Bursig wrote:
> Dnia 2003.03.26 22:25 Raimar Falke napisa³(a):
> > On Wed, Mar 26, 2003 at 12:04:09PM -0800, Rafa? Bursig wrote:
> > >
> > > Hi
> > >
> > > This code allow us use "malloc" attribute with
> > > fc_(malloc,calloc,realloc).
> > > Problem is that this attribute is avilable in gcc >= 3.x then we
> > must
> > > have new fc_attribute_3x macro which check gcc version.
> > >
> > > I don't check it with gcc < 3.x then some good peoples could do it.
> >
> > With gcc 3.2 I'm not able to produce a different asm output on the
> > files in common/, ai/ and server/. So this is a nop. I don't see a
> > reason for applying this change before the gcc folks make their home
> > work and really implement this optimization.
> >
> Here is the same patch + using "pure"/"const" attribute.
> I build 2 tree one with and secound without this patch. Both was
> compile with -O3 -fomit-frame-poiter.
>
> With patch tree have smaller common *.a file and biger gui-sdl *.a file
> than without patch.
> Totaly with pach tree has bigger "civclient" executable file.
>
> I have not time check rest becouse current my destiny is... bed :)
>
> Raimar could you look on it closer, please.
Attached is the diff of the two asm trees. Summary: attributes only
generate noise (different registers are used which generate a lot of
these:
.L2:
movl 12(%ebp), %eax
+ movl 12(%ebp), %edx
movl 8(%eax), %eax
movl %eax, (%esp)
- movl 12(%ebp), %eax
- movl 12(%eax), %eax
+ movl 12(%edx), %eax
movl %eax, 4(%esp)
I couldn't found any real change.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"I was dead ... but I'm better now."
-- Capitain Sheridan in Babylon 5
attr.diff.gz
Description: attr.diff.gz
|
|