This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Merging identical functions in GCC


On Sep 15, 2006, at 2:32 PM, Ross Ridge wrote:
Also, I don't think it's safe if you merge only functions in COMDAT sections.

Sure it is, one just needs to merge them as:


variant1: nop
variant2: nop
variant3: nop
	[ ... ]

this way important inequalities still work. This requires multiple entry points for a function, which will give some platforms fits, but, oh well. Further, the optimizer can do enough analysis to squeeze out some of the nops, some of the time. This should be slightly better than the jmp scheme Roman proposed.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]