This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: optimization/902: x86 optimization bug with sibling call and -fomit-frame-pointer


On Tue, Nov 28, 2000 at 05:43:21PM -0800, Richard Henderson wrote:
> On Tue, Nov 28, 2000 at 04:48:25PM -0800, Zack Weinberg wrote:
> > > We recognize that empty does nothing and mark it CONST.
> > 
> > Would it be practical to recognize that empty does nothing, and not
> > call it at all?  This could be as simple as marking it to-be-inlined.
> 
> I'd rather not, since otherwise it'll be neigh impossible to
> write ld.so style breakpoint hooks.

You just have to put them in a separate file and not make them
static.  With the current compiler, you can put them below their call
sites, but that is likely to change in the future.  Or have them
perform some trivial side effect like frobbing a static variable.

This is sort of the same argument as deleting empty loops.  It seems
to me that C++ abstractions could produce empty functions just as
easily as empty loops.

zw

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]