Merging identical functions in GCC
Michael Popov
pmike2001@mail.ru
Sat Sep 16 07:22:00 GMT 2006
Mark Mitchell wrote:
> Anyhow, I think that a combination of compiler/linker help and
> programmer help are useful. There are some cases where you can do this
> automatically, and others where you might need programmer help. Just as
> -ffast-math is useful, so might -fmerge-functions or
> __attribute__((mergeable)), even if that resulted in non-standard
> handling of function pointers.
Maybe combination of -fmerge-functions and __attribute__((unmergeable))
could be better? If programmer decide to use -fmerge-functions, he would
only like to mark functions that should not be touched by this optimization.
Otherwise, marking only mergeable functions in large project become a trouble.
More information about the Gcc
mailing list