On 09/13/2011 08:36 AM, Bernd Schmidt wrote: > On 09/13/11 15:05, Richard Sandiford wrote: >> It just feels like checking for trap_if or turning off cross-jumping >> are working around problems in the representation of shrink-wrapped >> functions. There should be something in the IL to say that those >> two blocks cannot be merged for CFI reasons. > > There is - JUMP_LABELs and such, and the simple_return vs return > distinction. This works for essentially all the interesting cases. The > problem here is that we don't have a jump as the last insn. So how about > the solution in crossjumping as below? > >> Maybe two flags on >> the basic block to say whether they start (resp. end) with the >> "wrapped" version of the CFI? (Which unfortunately would need >> to be checked explicitly.) > > I think that's overdesigning it, and it breaks as soon as something > discards the bb info (reorg...) or puts a label in the middle of a > prologue or epilogue. Keeping that up-to-date would be much more > fragile than just manually dealing with the few cases where we can't > tell what's going on. > >> OTOH, if another reviewer thinks that's unreasnable, I'll happily >> defer to them. > > Cc'ing rth for a second opinion...
It feels hacky, but I don't have anything better to suggest. I think the patch is ok. r~