Ross Ridge writes:
>No, and I can't see how how you've came up with such an abusurd
>misintepretation of what I said.  As I said clearly and explicity,
>the example I gave was where you'd want to use function merging.

Daniel Berlin writes:
>Whatever.  Why would you turn on function merging if you are trying to
>specifically get the compiler to produce different code for your
>functions than it did before?

Because I as already said, you want to merge the funtions that happen
to be same.  You don't want to merge the ones that aren't the same.
Sometimes using different compiler options (eg. for CPU architecture)
generates different code, sometimes it doesn't.  If you could always
predict what the exact code the compiler was going generate you'd might
as well write your code in assembly.

>As an FYI, you already have this situation with linkonce functions.

No, linkonce functions get merged because they have same name.

>>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. 

                                        Ross Ridge

Reply via email to