Merging identical functions in GCC
Gabriel Dos Reis
gdr@integrable-solutions.net
Sat Sep 16 20:48:00 GMT 2006
Ross Ridge <rridge@csclub.uwaterloo.ca> writes:
[...]
| >>I think this is best done by linker which
| >>can much more reliably compare the contents of functions to see if they
| >>are the same.
| >
| >No it can't. It has no idea what a function consists of other than a
| >bunch of bytes, in pretty much all cases. ... Stupid byte
| >comparisons of functions generally won't save you anything truly
| >interesting.
|
| Microsoft's implementation has proven that "stupid" byte comparions can
| generate significant savings.
Not very logn ago I spoke with the VC++ manager about this, and he
said that their implementation currently is not conforming -- but
they are working on it. The issue has to with f<int> and f<long>
required to have difference addresses -- which is violated by their
implementation.
-- Gaby
More information about the Gcc
mailing list