On Wed, Oct 26, 2011 at 03:59:36PM +0200, Bernd Schmidt wrote: > On 10/26/11 15:54, Alan Modra wrote: > > I guess the tradeoff between the classic shrink-wrap epilogue scheme > > and my duplicate tail idea is whether duplicating tail blocks adds > > more code than duplicating epilogues. From what I've seen, the > > duplicate tails are generally very small. I guess I should dump out > > some info so we can get a better idea. > > I suppose if one wanted to avoid inserting more than one epilogue for > code-size reasons, one could make a new basic block containing the > epilogue, and redirect edges as appropriate.
Suppose you have a function that returns r3=0 in one tail block and r3=1 in another, and these blocks are reached both by paths needing a prologue and by paths not needing a prologue. Which seems a likely common case. I'm fairly certain that would require two copies of the normal epilogue, or duplicating the tail blocks. (But it's late here and I'm ready to nod off so may not be thinking straight.) -- Alan Modra Australia Development Lab, IBM