Re: [PATCH] Generic dead function optimisation

From: Jesse Pollard (pollard@tomcat.admin.navo.hpc.mil)
Date: Wed Apr 26 2000 - 09:40:12 EST


> > The static functions are effectively called from outside. Who cares if
> > it is symbolic or via a pointer? - the end effect counts: another unit does
> > a function call and your static function is invoked. If you ignore that
> > you miss a significant part of the program flow. If you trust static
> > to guarantee that this does not happen you will lose.
>
> You don't miss the reference because the static symbol _is_
> referenced. It is referenced by the structure initializer (and in your
> example, where the struct is static itself, the static struct is again
> referenced by the initialization function).

The key is that the symbolic name is referenced ONLY within the compilation
unit.
-------------------------------------------------------------------------
Jesse I Pollard, II
Email: pollard@navo.hpc.mil

Any opinions expressed are solely my own.

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Sun Apr 30 2000 - 21:00:11 EST