This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Merging identical functions in GCC
- From: Gabriel Dos Reis <gdr at integrable-solutions dot net>
- To: Ross Ridge <rridge at csclub dot uwaterloo dot ca>
- Cc: gcc at gcc dot gnu dot org
- Date: 16 Sep 2006 22:46:31 +0200
- Subject: Re: Merging identical functions in GCC
- References: <E1GOgTC-0002h2-Q9@caffeine.csclub.uwaterloo.ca>
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