On Thu, Feb 06, 2014 at 11:00:14AM +0100, Richard Biener wrote: > Then __builtin_setjmp_setup is?
No, it never returns twice through the fallthru edge. It only returns second time through the abnormal edge virtually to the ABNORMAL_DISPATCHER and from that through another abnormal edge to __builtin_setjmp_receiver. So, among other things, we don't want abnormal edge to the start of __builtin_setjmp_setup. Perhaps we could stop this lowering of __builtin_setjmp into two special builtins now, but such changes look too big for me for stage4. At expansion time we'd need to make sure to have the abnormal edges (which right now expansion recreates from scratch) point to the middle of __builtin_setjmp expansion (the non-local label we insert there). Then __builtin_setjmp would be a normal returns_twice function. But then there is Eric's argument that we also need to revisit all cfun->calls_setjmp inhibiting optimizations, at least at the tree level, and for RTL need to keep abnormal edges and kill the rest of the optimization inhibitions. Jakub