gm2
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gm2] Over-aggressive Optimizations with gcc 4.1.1


From: Gaius Mulley
Subject: Re: [Gm2] Over-aggressive Optimizations with gcc 4.1.1
Date: 30 Oct 2006 11:08:04 +0000
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.4

Waldek Hebisch <address@hidden> writes:

> Gaius Mulley wote:
> > John O Goyo <address@hidden> writes:
> <snip>
> > > gcc-4.1.1-32: tst=> gm2 -S -I. -O2 add.mod
> > > gcc-4.1.1-32: tst=> cat add.s
> > >          .file   "add.mod"
> > >          .ident  "GCC: (GNU) 4.1.1"
> > > gcc-4.1.1-32: tst=>
> > > 
> > > Hhhmm..... #6-)
> > > john
> > 
> > Hi John,
> > 
> > thanks for the report - yes gm2 does perform some rather optimistic
> > transformations..  looks like we need another set of regression tests
> > which perform -O2 and a link and run.
> >
> 
> Do you mean that gm2 frontend mis-optimizes the code.  For Pascal I
> found out that 4.x backend has quite aggresive removal of "unused" code.
> At -O2 and -O3 cgraph routines start from known external entries
> and mark reachable objects.  Everything unreachable is removed.
> I had to make sure that backend knows about all exported functions
> (otherwise it removed them): I do not remember exactly what I did,
> but I think it is enough to make sure that your declaration is
> on the list returned by getdecls and has proper bits set (TREE_PUBLIC
> and TREE_STATIC).

Hi,

yes my guess is that the gm2 front end is not setting appropriate
fields in external declarations.  The optimise bug in gm2 has been
present since before it was using gcc-3.3.6 as a base.

Thanks for the pointers re: getdecls and TREE_PUBLIC and TREE_STATIC

regards,
Gaius




reply via email to

[Prev in Thread] Current Thread [Next in Thread]