This removes the (undocumented) support for SETJMP_VIA_SAVE_AREA from the compiler. This is a trick implemented on the SPARC exclusively to reuse the register save area present in all frames (because of the register windows) for part of the setjmp buffer. The benefit are marginal and dwarfed by the usual drawbacks of using setjmp/longjmp (to implement exceptions for example). This exposed a couple of similar bugs in cse.c and postreload-gcse.c: the code was effectively treating a basic block with a single, abnormal incoming edge as if the edge was normal. Bootstrapped/regtested on x86_64-suse-linux and sparc-sun-solaris2.10. I also verified that ACATS is clean with the SJLJ EH scheme. Applied on the mainline. 2011-06-02 Eric Botcazou * function.h (struct stack_usage): Remove dynamic_alloc_count field. (current_function_dynamic_alloc_count): Delete. * builtins.c (expand_builtin_setjmp_setup): Do not set calls_setjmp. (expand_builtin_nonlocal_goto): Remove obsolete comment. (expand_builtin_update_setjmp_buf): Remove dead code. * cse.c (cse_find_path): Do not follow a single abnormal incoming edge. * explow.c (allocate_dynamic_stack_space): Remove SETJMP_VIA_SAVE_AREA support. * function.c (instantiate_virtual_regs): Likewise. * postreload-gcse.c (bb_has_well_behaved_predecessors): Return false for a block with a single abnormal incoming edge. * config/sparc/sparc.h (STACK_SAVEAREA_MODE): Define. * config/sparc/sparc-protos.h (load_got_register): Declare. * config/sparc/sparc.c (TARGET_BUILTIN_SETJMP_FRAME_VALUE): Define. (load_got_register): Make global. (sparc_frame_pointer_required): Add 'static'. (sparc_can_eliminate): Likewise. Call sparc_frame_pointer_required. (sparc_builtin_setjmp_frame_value): New function. * config/sparc/sparc.md (UNSPECV_SETJMP): Remove. (save_stack_nonlocal): New expander. (restore_stack_nonlocal): Likewise. (nonlocal_goto): Remove modes, adjust predicates and reimplement. (nonlocal_goto_internal): New insn. (goto_handler_and_restore): Delete. (builtin_setjmp_setup): Likewise. (do_builtin_setjmp_setup): Likewise. (setjmp): Likewise. (builtin_setjmp_receiver): New expander. -- Eric Botcazou