This is the mail archive of the gcc-patches@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]

More of struct function breakup


Hi,
this patch finish the breakup of RTL stuff from struct function to rtl_data.
It moves all the flags that are maintained only during RTL compilation.

I've also removed the obsoletted current_function_*
accestor macros for all the flags. RTL flags are now bools since they
are not memory critical and generate smaller code this way than the
bitfields.

Bootstrapped/regtested i686-linux; ppc-linux and x86_64-linux in testing. OK?

	* function.h (struct rtl_data): Move here fields accesses_prior_frames,
	calls_eh_return, saves_all_registers, has_nonlocal_goto, has_asm_statement,
	is_thunk, all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
	uses_pic_offset_table, uses_eh_lsda, tail_call_emit, arg_pointer_save_area_init
	from struct function; turn into bool.
	(struct function): Move
	calls_eh_return, saves_all_registers, has_nonlocal_goto, has_asm_statement,
	is_thunk, all_throwers_are_sibcalls, limit_stack, profile, uses_const_pool,
	uses_pic_offset_table, uses_eh_lsda, tail_call_emit, arg_pointer_save_area_init
	into struct rtl_data.  Remove recursive_call_emit and gimplified flags.
	(current_function_returns_struct, current_function_returns_pcc_struct,
	current_function_calls_setjmp, current_function_calls_alloca,
	current_function_accesses_prior_frames,
	current_function_calls_eh_return, current_function_is_thunk,
	current_function_stdarg, current_function_profile,
	current_function_limit_stack, current_function_uses_pic_offset_table,
	current_function_uses_const_pool, current_function_has_nonlocal_label,
	current_function_saves_all_registers,
	current_function_has_nonlocal_goto,
	current_function_has_asm_statement): Remove accestor macros.
	* ra-conflict.c (global_conflicts): Update.
	* tree-tailcall.c (suitable_for_tail_opt_p): Update.
	(suitable_for_tail_call_opt_p): Update.
	* builtins.c (expand_builtin_return_addr): Update.
	(expand_builtin_setjmp_setup): Update.
	(expand_builtin_nonlocal_goto): Update.
	* final.c (final_start_function): Update.
	(profile_function): Update.
	(leaf_function_p): Update.
	(only_leaf_regs_used): Update.
	* df-scan.c (df_get_exit_block_use_set): Update.
	* cp/typeck.c (check_return_expr): Update.
	* cp/decl.c (start_preparsed_function): Update.
	* cp/method.c (use_thunk): Update.
	* dojump.c (clear_pending_stack_adjust): Update.
	* tree-stdarg.c (gate_optimize_stdarg): Update.
	* gimple-low.c (lower_function_body): Update.
	* global.c (compute_regsets): Update.
	(global_alloc): Update.
	* dwarf2out.c (dwarf2out_begin_prologue): Update.
	* expr.c (expand_assignment): Update.
	* dse.c (dse_step0): Update.
	(dse_step1): Update.
	* c-decl.c (store_parm_decls): Update.
	* local-alloc.c (combine_regs): Update.
	(find_free_reg): Update.
	* function.c (assign_parms_augmented_arg_list): Update.
	(assign_parm_find_data_types): Update.
	(assign_parms): Update.
	(allocate_struct_function): Update.
	(expand_function_start): Update.
	(expand_function_end): Update.
	(get_arg_pointer_save_area): Update.
	(thread_prologue_and_epilogue_insns): Update.
	(rest_of_match_asm_constraints): Update.
	* stor-layout.c (variable_size): Update.
	* gcse.c (gcse_main): Update.
	(bypass_jumps): Update.
	* gimplify.c (gimplify_function_tree): Update.
	* calls.c (emit_call_1): Update.
	(expand_call): Update.
	* bt-load.c (compute_defs_uses_and_gen): Update.
	* except.c (sjlj_assign_call_site_values): Update.
	(sjlj_emit_function_enter): Update.
	(can_throw_external): Update.
	(set_nothrow_function_flags): Update.
	(expand_builtin_unwind_init): Update.
	(expand_eh_return): Update.
	(convert_to_eh_region_ranges): Update.
	(output_function_exception_table): Update.
	* emit-rtl.c (gen_tmp_stack_mem): Update.
	* cfgexpand.c (expand_used_vars): Update.
	(tree_expand_cfg): Update.
	* cfgcleanup.c (rest_of_handle_jump): Update.
	* explow.c (allocate_dynamic_stack_space): Update.
	* varasm.c (assemble_start_function): Update.
	(force_const_mem): Update.
	(mark_constant_pool): Update.
	* tree-optimize.c (tree_rest_of_compilation): Update.
	* stack-ptr-mod.c (notice_stack_pointer_modification): Update.
	* tree-cfg.c (notice_special_calls): Update.
	(is_ctrl_altering_stmt): Update.
	(tree_can_make_abnormal_goto): Update.
	(tree_purge_dead_abnormal_call_edges): Update.
	* config/alpha/predicates.md: Update.
	* config/alpha/alpha.c (alpha_sa_mask): Update.
	(alpha_sa_size): Update.
	(alpha_does_function_need_gp): Update.
	(alpha_expand_prologue): Update.
	(alpha_start_function): Update.
	(alpha_output_function_end_prologue): Update.
	(alpha_expand_epilogue): Update.
	* config/frv/frv.c (frv_stack_info): Update.
	(frv_expand_epilogue): Update.
	* config/s390/s390.c (s390_regs_ever_clobbered): Update.
	(s390_register_info): Update.
	(s390_frame_info): Update.
	(s390_init_frame_layout): Update.
	(s390_can_eliminate): Update.
	(save_gprs): Update.
	* config/spu/spu.c (spu_split_immediate): Update.
	(need_to_save_reg): Update.
	(spu_expand_prologue): Update.
	(spu_expand_epilogue): Update.
	* config/sparc/sparc.md: Update.
	* config/sparc/sparc.c (eligible_for_return_delay): Update.
	(sparc_tls_got): Update.
	(legitimize_pic_address): Update.
	(sparc_emit_call_insn): Update.
	(sparc_expand_prologue): Update.
	(output_return): Update.
	(print_operand): Update.
	(sparc_function_ok_for_sibcall): Update.
	* config/sparc/sparc.h (EXIT_IGNORE_STACK): Update.
	* config/m32r/m32r.md: Update.
	* config/m32r/m32r.c (MUST_SAVE_RETURN_ADDR): Update.
	(m32r_compute_frame_size): Update.
	(m32r_expand_prologue): Update.
	(m32r_expand_epilogue): Update.
	(m32r_legitimize_pic_address): Update.
	* config/m32r/m32r.h (FRAME_POINTER_REQUIRED): Update.
	* config/i386/linux.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/i386/i386.c (ix86_frame_pointer_required): Update.
	(gen_push): Update.
	(ix86_save_reg): Update.
	(ix86_compute_frame_layout): Update.
	(ix86_expand_prologue): Update.
	(ix86_expand_epilogue): Update.
	* config/sh/sh.c (output_stack_adjust): Update.
	(calc_live_regs): Update.
	(sh5_schedule_saves): Update.
	(sh_expand_prologue): Update.
	(sh_expand_epilogue): Update.
	(sh_setup_incoming_varargs): Update.
	(sh_allocate_initial_value): Update.
	(sh_get_pr_initial_val): Update.
	* config/sh/sh.h (SHMEDIA_REGS_STACK_ADJUST): Update.
	* config/sh/sh.md (label:): Update.
	* config/avr/avr.c (out_movhi_mr_r): Update.
	* config/crx/crx.h (enum): Update.
	* config/xtensa/xtensa.h (along): Update.
	* config/stormy16/stormy16.c Update.
	(xstormy16_compute_stack_layout): Update.
	* config/fr30/fr30.c (MUST_SAVE_RETURN_POINTER): Update.
	(fr30_expand_prologue): Update.
	* config/cris/cris.c (cris_conditional_register_usage): Update.
	(cris_reg_saved_in_regsave_area): Update.
	(cris_initial_frame_pointer_offset): Update.
	(cris_simple_epilogue): Update.
	(cris_expand_prologue): Update.
	(cris_expand_epilogue): Update.
	(cris_expand_pic_call_address): Update.
	(cris_asm_output_symbol_ref): Update.
	(cris_asm_output_label_ref): Update.
	* config/cris/cris.md Update.
	* config/iq2000/iq2000.c (compute_frame_size): Update.
	(iq2000_expand_epilogue): Update.
	* config/mt/mt.h (save_direction): Update.
	* config/mn10300/mn10300.c (mn10300_function_value): Update.
	* config/ia64/ia64.c (ia64_compute_frame_size): Update.
	(ia64_secondary_reload_class): Update.
	* config/m68k/m68k.c (m68k_save_reg): Update.
	(m68k_expand_prologue): Update.
	(m68k_expand_epilogue): Update.
	(legitimize_pic_address): Update.
	* config/rs6000/rs6000.c (rs6000_got_register): Update.
	(first_reg_to_save): Update.
	(first_altivec_reg_to_save): Update.
	(compute_vrsave_mask): Update.
	(compute_save_world_info): Update.
	(rs6000_stack_info): Update.
	(spe_func_has_64bit_regs_p): Update.
	(rs6000_ra_ever_killed): Update.
	(rs6000_emit_eh_reg_restore): Update.
	(rs6000_emit_allocate_stack): Update.
	(rs6000_emit_prologue): Update.
	(rs6000_emit_epilogue): Update.
	(rs6000_output_function_epilogue): Update.
	(output_profile_hook): Update.
	(rs6000_elf_declare_function_name): Update.
	* config/rs6000/rs6000.h (rs6000_args): Update.
	* config/rs6000/rs6000.md: Update.
	* config/mcore/mcore.c (mcore_expand_prolog): Update.
	* config/arc/arc.c (arc_output_function_epilogue): Update.
	* config/arc/arc.h (FRAME_POINTER_REQUIRED): Update.
	* config/darwin.c (machopic_function_base_name): Update.
	* config/score/score3.c (score3_compute_frame_size): Update.
	(rpush): Update.
	(rpop): Update.
	(score3_epilogue): Update.
	* config/score/score7.c (score7_compute_frame_size): Update.
	(score7_prologue): Update.
	(score7_epilogue): Update.
	* config/score/score.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/linux-elf.h (SUBTARGET_FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.c (use_return_insn): Update.
	(require_pic_register): Update.
	(arm_load_pic_register): Update.
	(arm_compute_save_reg0_reg12_mask): Update.
	(arm_compute_save_reg_mask): Update.
	(thumb1_compute_save_reg_mask): Update.
	(output_return_instruction): Update.
	(arm_output_function_prologue): Update.
	(arm_output_epilogue): Update.
	(arm_get_frame_offsets): Update.
	(arm_expand_prologue): Update.
	(thumb_pushpop): Update.
	(thumb_exit): Update.
	(thumb1_expand_prologue): Update.
	(thumb1_expand_epilogue): Update.
	(arm_unwind_emit): Update.
	(arm_output_fn_unwind): Update.
	* config/arm/arm.h (FRAME_POINTER_REQUIRED): Update.
	* config/arm/arm.md: Update.
	* config/pa/pa.md: Update.
	* config/pa/pa.c (legitimize_pic_address): Update.
	(compute_frame_size): Update.
	(hppa_expand_prologue): Update.
	(hppa_expand_epilogue): Update.
	(borx_reg_operand): Update.
	* config/pa/pa.h (FRAME_POINTER_REQUIRED): Update.
	(HARD_REGNO_RENAME_OK): Update.
	* config/mips/mips.c (mips_global_pointer): Update.
	(mips_save_reg_p): Update.
	(mips_compute_frame_info): Update.
	(mips_frame_pointer_required): Update.
	(mips_expand_prologue): Update.
	(mips_expand_epilogue): Update.
	(mips_can_use_return_insn): Update.
	(mips_reorg_process_insns): Update.
	* config/v850/v850.c (compute_register_save_size): Update.
	* config/mmix/mmix.h (FRAME_POINTER_REQUIRED): Update.
	* config/mmix/mmix.c (along): Update.
	(mmix_expand_epilogue): Update.
	* config/bfin/bfin.c (legitimize_pic_address): Update.
	(must_save_p): Update.
	(stack_frame_needed_p): Update.
	(add_to_reg): Update.
	(bfin_expand_prologue): Update.
	* stmt.c (expand_asm_operands): Update.
	* reload1.c (reload): Update.
	(init_elim_table): Update.
Index: function.h
===================================================================
*** function.h	(revision 134640)
--- function.h	(working copy)
*************** struct rtl_data GTY(())
*** 334,339 ****
--- 334,392 ----
    /* If some insns can be deferred to the delay slots of the epilogue, the
       delay list for them is recorded here.  */
    rtx epilogue_delay_list;
+ 
+   /* Nonzero if function being compiled called builtin_return_addr or
+      builtin_frame_address with nonzero count.  */
+   bool accesses_prior_frames;
+ 
+   /* Nonzero if the function calls __builtin_eh_return.  */
+   bool calls_eh_return;
+ 
+   /* Nonzero if function saves all registers, e.g. if it has a nonlocal
+      label that can reach the exit block via non-exceptional paths. */
+   bool saves_all_registers;
+ 
+   /* Nonzero if function being compiled has nonlocal gotos to parent
+      function.  */
+   bool has_nonlocal_goto;
+   
+   /* Nonzero if function being compiled has an asm statement.  */
+   bool has_asm_statement;
+ 
+   /* Nonzero if the current function is a thunk, i.e., a lightweight
+      function implemented by the output_mi_thunk hook) that just
+      adjusts one of its arguments and forwards to another
+      function.  */
+   bool is_thunk;
+ 
+   /* This bit is used by the exception handling logic.  It is set if all
+      calls (if any) are sibling calls.  Such functions do not have to
+      have EH tables generated, as they cannot throw.  A call to such a
+      function, however, should be treated as throwing if any of its callees
+      can throw.  */
+   bool all_throwers_are_sibcalls;
+ 
+   /* Nonzero if stack limit checking should be enabled in the current
+      function.  */
+   bool limit_stack;
+ 
+   /* Nonzero if profiling code should be generated.  */
+   bool profile;
+ 
+   /* Nonzero if the current function uses the constant pool.  */
+   bool uses_const_pool;
+ 
+   /* Nonzero if the current function uses pic_offset_table_rtx.  */
+   bool uses_pic_offset_table;
+ 
+   /* Nonzero if the current function needs an lsda for exception handling.  */
+   bool uses_eh_lsda;
+ 
+   /* Set when the tail call has been produced.  */
+   bool tail_call_emit;
+ 
+   /* Nonzero if code to initialize arg_pointer_save_area has been emitted.  */
+   bool arg_pointer_save_area_init;
  };
  
  #define return_label (crtl->x_return_label)
*************** struct function GTY(())
*** 437,486 ****
       either as a subroutine or builtin.  */
    unsigned int calls_alloca : 1;
  
-   /* Nonzero if function being compiled called builtin_return_addr or
-      builtin_frame_address with nonzero count.  */
-   unsigned int accesses_prior_frames : 1;
- 
-   /* Nonzero if the function calls __builtin_eh_return.  */
-   unsigned int calls_eh_return : 1;
- 
- 
    /* Nonzero if function being compiled receives nonlocal gotos
       from nested functions.  */
    unsigned int has_nonlocal_label : 1;
  
-   /* Nonzero if function saves all registers, e.g. if it has a nonlocal
-      label that can reach the exit block via non-exceptional paths. */
-   unsigned int saves_all_registers : 1;
- 
-   /* Nonzero if function being compiled has nonlocal gotos to parent
-      function.  */
-   unsigned int has_nonlocal_goto : 1;
-   
-   /* Nonzero if function being compiled has an asm statement.  */
-   unsigned int has_asm_statement : 1;
- 
-   /* Nonzero if the current function is a thunk, i.e., a lightweight
-      function implemented by the output_mi_thunk hook) that just
-      adjusts one of its arguments and forwards to another
-      function.  */
-   unsigned int is_thunk : 1;
- 
-   /* This bit is used by the exception handling logic.  It is set if all
-      calls (if any) are sibling calls.  Such functions do not have to
-      have EH tables generated, as they cannot throw.  A call to such a
-      function, however, should be treated as throwing if any of its callees
-      can throw.  */
-   unsigned int all_throwers_are_sibcalls : 1;
- 
-   /* Nonzero if profiling code should be generated.  */
-   unsigned int profile : 1;
- 
-   /* Nonzero if stack limit checking should be enabled in the current
-      function.  */
-   unsigned int limit_stack : 1;
- 
- 
    /* Nonzero if current function uses stdarg.h or equivalent.  */
    unsigned int stdarg : 1;
  
--- 490,499 ----
*************** struct function GTY(())
*** 491,524 ****
       variable-sized type, then the size of the parameter is computed
       when the function body is entered.  However, some front-ends do
       not desire this behavior.  */
!   unsigned int x_dont_save_pending_sizes_p : 1;
! 
!   /* Nonzero if the current function uses the constant pool.  */
!   unsigned int uses_const_pool : 1;
! 
!   /* Nonzero if the current function uses pic_offset_table_rtx.  */
!   unsigned int uses_pic_offset_table : 1;
! 
!   /* Nonzero if the current function needs an lsda for exception handling.  */
!   unsigned int uses_eh_lsda : 1;
! 
!   /* Nonzero if code to initialize arg_pointer_save_area has been emitted.  */
!   unsigned int arg_pointer_save_area_init : 1;
  
    unsigned int after_inlining : 1;
  
-   /* Set when the call to function itself has been emit.  */
-   unsigned int recursive_call_emit : 1;
- 
- 
-   /* Set when the tail call has been produced.  */
-   unsigned int tail_call_emit : 1;
- 
-   /* FIXME tuples: This bit is temporarily here to mark when a
-      function has been gimplified, so we can make sure we're not
-      creating non GIMPLE tuples after gimplification.  */
-   unsigned int gimplified : 1;
- 
    /* Fields below this point are not set for abstract functions; see
       allocate_struct_function.  */
  
--- 504,513 ----
       variable-sized type, then the size of the parameter is computed
       when the function body is entered.  However, some front-ends do
       not desire this behavior.  */
!   unsigned int dont_save_pending_sizes_p : 1;
  
    unsigned int after_inlining : 1;
  
    /* Fields below this point are not set for abstract functions; see
       allocate_struct_function.  */
  
*************** extern void pop_cfun (void);
*** 563,585 ****
  extern void instantiate_decl_rtl (rtx x);
  
  /* For backward compatibility... eventually these should all go away.  */
- #define current_function_returns_struct (cfun->returns_struct)
- #define current_function_returns_pcc_struct (cfun->returns_pcc_struct)
- #define current_function_calls_setjmp (cfun->calls_setjmp)
- #define current_function_calls_alloca (cfun->calls_alloca)
- #define current_function_accesses_prior_frames (cfun->accesses_prior_frames)
- #define current_function_calls_eh_return (cfun->calls_eh_return)
- #define current_function_is_thunk (cfun->is_thunk)
- #define current_function_stdarg (cfun->stdarg)
- #define current_function_profile (cfun->profile)
  #define current_function_funcdef_no (cfun->funcdef_no)
- #define current_function_limit_stack (cfun->limit_stack)
- #define current_function_uses_pic_offset_table (cfun->uses_pic_offset_table)
- #define current_function_uses_const_pool (cfun->uses_const_pool)
- #define current_function_has_nonlocal_label (cfun->has_nonlocal_label)
- #define current_function_saves_all_registers (cfun->saves_all_registers)
- #define current_function_has_nonlocal_goto (cfun->has_nonlocal_goto)
- #define current_function_has_asm_statement (cfun->has_asm_statement)
  
  #define current_loops (cfun->x_current_loops)
  #define dom_computed (cfun->cfg->x_dom_computed)
--- 552,558 ----
Index: ra-conflict.c
===================================================================
*** ra-conflict.c	(revision 134640)
--- ra-conflict.c	(working copy)
*************** global_conflicts (void)
*** 1220,1226 ****
  	  /* No need to record conflicts for call clobbered regs if we have
  	     nonlocal labels around, as we don't ever try to allocate such
  	     regs in this case.  */
! 	  if (! current_function_has_nonlocal_label)
  	    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  	      if (call_used_regs [i])
  		record_one_conflict (allocnos_live, &hard_regs_live, i);
--- 1220,1226 ----
  	  /* No need to record conflicts for call clobbered regs if we have
  	     nonlocal labels around, as we don't ever try to allocate such
  	     regs in this case.  */
! 	  if (! cfun->has_nonlocal_label)
  	    for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
  	      if (call_used_regs [i])
  		record_one_conflict (allocnos_live, &hard_regs_live, i);
Index: tree-tailcall.c
===================================================================
*** tree-tailcall.c	(revision 134640)
--- tree-tailcall.c	(working copy)
*************** suitable_for_tail_opt_p (void)
*** 135,141 ****
    referenced_var_iterator rvi;
    tree var;
  
!   if (current_function_stdarg)
      return false;
  
    /* No local variable nor structure field should be call-clobbered.  We
--- 135,141 ----
    referenced_var_iterator rvi;
    tree var;
  
!   if (cfun->stdarg)
      return false;
  
    /* No local variable nor structure field should be call-clobbered.  We
*************** suitable_for_tail_call_opt_p (void)
*** 164,170 ****
  
    /* alloca (until we have stack slot life analysis) inhibits
       sibling call optimizations, but not tail recursion.  */
!   if (current_function_calls_alloca)
      return false;
  
    /* If we are using sjlj exceptions, we may need to add a call to
--- 164,170 ----
  
    /* alloca (until we have stack slot life analysis) inhibits
       sibling call optimizations, but not tail recursion.  */
!   if (cfun->calls_alloca)
      return false;
  
    /* If we are using sjlj exceptions, we may need to add a call to
*************** suitable_for_tail_call_opt_p (void)
*** 176,182 ****
    /* Any function that calls setjmp might have longjmp called from
       any called function.  ??? We really should represent this
       properly in the CFG so that this needn't be special cased.  */
!   if (current_function_calls_setjmp)
      return false;
  
    /* ??? It is OK if the argument of a function is taken in some cases,
--- 176,182 ----
    /* Any function that calls setjmp might have longjmp called from
       any called function.  ??? We really should represent this
       properly in the CFG so that this needn't be special cased.  */
!   if (cfun->calls_setjmp)
      return false;
  
    /* ??? It is OK if the argument of a function is taken in some cases,
Index: builtins.c
===================================================================
*** builtins.c	(revision 134640)
--- builtins.c	(working copy)
*************** expand_builtin_return_addr (enum built_i
*** 587,593 ****
        tem = hard_frame_pointer_rtx;
  
        /* Tell reload not to eliminate the frame pointer.  */
!       current_function_accesses_prior_frames = 1;
      }
  #endif
  
--- 587,593 ----
        tem = hard_frame_pointer_rtx;
  
        /* Tell reload not to eliminate the frame pointer.  */
!       crtl->accesses_prior_frames = 1;
      }
  #endif
  
*************** expand_builtin_setjmp_setup (rtx buf_add
*** 690,699 ****
  
    /* Tell optimize_save_area_alloca that extra work is going to
       need to go on during alloca.  */
!   current_function_calls_setjmp = 1;
  
    /* We have a nonlocal label.   */
!   current_function_has_nonlocal_label = 1;
  }
  
  /* Construct the trailing part of a __builtin_setjmp call.  This is
--- 690,699 ----
  
    /* Tell optimize_save_area_alloca that extra work is going to
       need to go on during alloca.  */
!   cfun->calls_setjmp = 1;
  
    /* We have a nonlocal label.   */
!   cfun->has_nonlocal_label = 1;
  }
  
  /* Construct the trailing part of a __builtin_setjmp call.  This is
*************** expand_builtin_nonlocal_goto (tree exp)
*** 877,883 ****
    r_sp = gen_rtx_MEM (STACK_SAVEAREA_MODE (SAVE_NONLOCAL),
  		      plus_constant (r_save_area, GET_MODE_SIZE (Pmode)));
  
!   current_function_has_nonlocal_goto = 1;
  
  #ifdef HAVE_nonlocal_goto
    /* ??? We no longer need to pass the static chain value, afaik.  */
--- 877,883 ----
    r_sp = gen_rtx_MEM (STACK_SAVEAREA_MODE (SAVE_NONLOCAL),
  		      plus_constant (r_save_area, GET_MODE_SIZE (Pmode)));
  
!   crtl->has_nonlocal_goto = 1;
  
  #ifdef HAVE_nonlocal_goto
    /* ??? We no longer need to pass the static chain value, afaik.  */
Index: final.c
===================================================================
*** final.c	(revision 134640)
--- final.c	(working copy)
*************** final_start_function (rtx first ATTRIBUT
*** 1505,1511 ****
    /* The Sun386i and perhaps other machines don't work right
       if the profiling code comes after the prologue.  */
  #ifdef PROFILE_BEFORE_PROLOGUE
!   if (current_function_profile)
      profile_function (file);
  #endif /* PROFILE_BEFORE_PROLOGUE */
  
--- 1505,1511 ----
    /* The Sun386i and perhaps other machines don't work right
       if the profiling code comes after the prologue.  */
  #ifdef PROFILE_BEFORE_PROLOGUE
!   if (crtl->profile)
      profile_function (file);
  #endif /* PROFILE_BEFORE_PROLOGUE */
  
*************** static void
*** 1550,1556 ****
  profile_after_prologue (FILE *file ATTRIBUTE_UNUSED)
  {
  #ifndef PROFILE_BEFORE_PROLOGUE
!   if (current_function_profile)
      profile_function (file);
  #endif /* not PROFILE_BEFORE_PROLOGUE */
  }
--- 1550,1556 ----
  profile_after_prologue (FILE *file ATTRIBUTE_UNUSED)
  {
  #ifndef PROFILE_BEFORE_PROLOGUE
!   if (crtl->profile)
      profile_function (file);
  #endif /* not PROFILE_BEFORE_PROLOGUE */
  }
*************** profile_function (FILE *file ATTRIBUTE_U
*** 1562,1568 ****
  # define NO_PROFILE_COUNTERS	0
  #endif
  #if defined(ASM_OUTPUT_REG_PUSH)
!   int sval = current_function_returns_struct;
    rtx svrtx = targetm.calls.struct_value_rtx (TREE_TYPE (current_function_decl), 1);
  #if defined(STATIC_CHAIN_INCOMING_REGNUM) || defined(STATIC_CHAIN_REGNUM)
    int cxt = cfun->static_chain_decl != NULL;
--- 1562,1568 ----
  # define NO_PROFILE_COUNTERS	0
  #endif
  #if defined(ASM_OUTPUT_REG_PUSH)
!   int sval = cfun->returns_struct;
    rtx svrtx = targetm.calls.struct_value_rtx (TREE_TYPE (current_function_decl), 1);
  #if defined(STATIC_CHAIN_INCOMING_REGNUM) || defined(STATIC_CHAIN_REGNUM)
    int cxt = cfun->static_chain_decl != NULL;
*************** leaf_function_p (void)
*** 3813,3819 ****
    rtx insn;
    rtx link;
  
!   if (current_function_profile || profile_arc_flag)
      return 0;
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
--- 3813,3819 ----
    rtx insn;
    rtx link;
  
!   if (crtl->profile || profile_arc_flag)
      return 0;
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
*************** only_leaf_regs_used (void)
*** 3888,3894 ****
  	&& ! permitted_reg_in_leaf_functions[i])
        return 0;
  
!   if (current_function_uses_pic_offset_table
        && pic_offset_table_rtx != 0
        && REG_P (pic_offset_table_rtx)
        && ! permitted_reg_in_leaf_functions[REGNO (pic_offset_table_rtx)])
--- 3888,3894 ----
  	&& ! permitted_reg_in_leaf_functions[i])
        return 0;
  
!   if (crtl->uses_pic_offset_table
        && pic_offset_table_rtx != 0
        && REG_P (pic_offset_table_rtx)
        && ! permitted_reg_in_leaf_functions[REGNO (pic_offset_table_rtx)])
Index: df-scan.c
===================================================================
*** df-scan.c	(revision 134640)
--- df-scan.c	(working copy)
*************** df_get_exit_block_use_set (bitmap exit_b
*** 3871,3877 ****
    
  #ifdef EH_RETURN_DATA_REGNO
    /* Mark the registers that will contain data for the handler.  */
!   if (reload_completed && current_function_calls_eh_return)
      for (i = 0; ; ++i)
        {
  	unsigned regno = EH_RETURN_DATA_REGNO (i);
--- 3871,3877 ----
    
  #ifdef EH_RETURN_DATA_REGNO
    /* Mark the registers that will contain data for the handler.  */
!   if (reload_completed && crtl->calls_eh_return)
      for (i = 0; ; ++i)
        {
  	unsigned regno = EH_RETURN_DATA_REGNO (i);
*************** df_get_exit_block_use_set (bitmap exit_b
*** 3883,3889 ****
  
  #ifdef EH_RETURN_STACKADJ_RTX
    if ((!HAVE_epilogue || ! epilogue_completed)
!       && current_function_calls_eh_return)
      {
        rtx tmp = EH_RETURN_STACKADJ_RTX;
        if (tmp && REG_P (tmp))
--- 3883,3889 ----
  
  #ifdef EH_RETURN_STACKADJ_RTX
    if ((!HAVE_epilogue || ! epilogue_completed)
!       && crtl->calls_eh_return)
      {
        rtx tmp = EH_RETURN_STACKADJ_RTX;
        if (tmp && REG_P (tmp))
*************** df_get_exit_block_use_set (bitmap exit_b
*** 3893,3899 ****
  
  #ifdef EH_RETURN_HANDLER_RTX
    if ((!HAVE_epilogue || ! epilogue_completed)
!       && current_function_calls_eh_return)
      {
        rtx tmp = EH_RETURN_HANDLER_RTX;
        if (tmp && REG_P (tmp))
--- 3893,3899 ----
  
  #ifdef EH_RETURN_HANDLER_RTX
    if ((!HAVE_epilogue || ! epilogue_completed)
!       && crtl->calls_eh_return)
      {
        rtx tmp = EH_RETURN_HANDLER_RTX;
        if (tmp && REG_P (tmp))
Index: cp/typeck.c
===================================================================
*** cp/typeck.c	(revision 134640)
--- cp/typeck.c	(working copy)
*************** check_return_expr (tree retval, bool *no
*** 7138,7144 ****
        if (retval == error_mark_node)
  	return retval;
        /* We can't initialize a register from a AGGR_INIT_EXPR.  */
!       else if (! current_function_returns_struct
  	       && TREE_CODE (retval) == TARGET_EXPR
  	       && TREE_CODE (TREE_OPERAND (retval, 1)) == AGGR_INIT_EXPR)
  	retval = build2 (COMPOUND_EXPR, TREE_TYPE (retval), retval,
--- 7138,7144 ----
        if (retval == error_mark_node)
  	return retval;
        /* We can't initialize a register from a AGGR_INIT_EXPR.  */
!       else if (! cfun->returns_struct
  	       && TREE_CODE (retval) == TARGET_EXPR
  	       && TREE_CODE (TREE_OPERAND (retval, 1)) == AGGR_INIT_EXPR)
  	retval = build2 (COMPOUND_EXPR, TREE_TYPE (retval), retval,
Index: cp/decl.c
===================================================================
*** cp/decl.c	(revision 134640)
--- cp/decl.c	(working copy)
*************** start_preparsed_function (tree decl1, tr
*** 11278,11284 ****
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->x_dont_save_pending_sizes_p = 1;
  
    /* Start the statement-tree, start the tree now.  */
    DECL_SAVED_TREE (decl1) = push_stmt_list ();
--- 11278,11284 ----
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->dont_save_pending_sizes_p = 1;
  
    /* Start the statement-tree, start the tree now.  */
    DECL_SAVED_TREE (decl1) = push_stmt_list ();
Index: cp/method.c
===================================================================
*** cp/method.c	(revision 134640)
--- cp/method.c	(working copy)
*************** use_thunk (tree thunk_fndecl, bool emit_
*** 437,443 ****
        BLOCK_VARS (fn_block) = a;
        DECL_INITIAL (thunk_fndecl) = fn_block;
        init_function_start (thunk_fndecl);
!       current_function_is_thunk = 1;
        assemble_start_function (thunk_fndecl, fnname);
  
        targetm.asm_out.output_mi_thunk (asm_out_file, thunk_fndecl,
--- 437,443 ----
        BLOCK_VARS (fn_block) = a;
        DECL_INITIAL (thunk_fndecl) = fn_block;
        init_function_start (thunk_fndecl);
!       crtl->is_thunk = 1;
        assemble_start_function (thunk_fndecl, fnname);
  
        targetm.asm_out.output_mi_thunk (asm_out_file, thunk_fndecl,
Index: dojump.c
===================================================================
*** dojump.c	(revision 134640)
--- dojump.c	(working copy)
*************** void
*** 70,76 ****
  clear_pending_stack_adjust (void)
  {
    if (optimize > 0
!       && (! flag_omit_frame_pointer || current_function_calls_alloca)
        && EXIT_IGNORE_STACK
        && ! (DECL_INLINE (current_function_decl) && ! flag_no_inline))
      discard_pending_stack_adjust ();
--- 70,76 ----
  clear_pending_stack_adjust (void)
  {
    if (optimize > 0
!       && (! flag_omit_frame_pointer || cfun->calls_alloca)
        && EXIT_IGNORE_STACK
        && ! (DECL_INLINE (current_function_decl) && ! flag_no_inline))
      discard_pending_stack_adjust ();
Index: tree-stdarg.c
===================================================================
*** tree-stdarg.c	(revision 134640)
--- tree-stdarg.c	(working copy)
*************** static bool
*** 595,601 ****
  gate_optimize_stdarg (void)
  {
    /* This optimization is only for stdarg functions.  */
!   return current_function_stdarg != 0;
  }
  
  
--- 595,601 ----
  gate_optimize_stdarg (void)
  {
    /* This optimization is only for stdarg functions.  */
!   return cfun->stdarg != 0;
  }
  
  
Index: gimple-low.c
===================================================================
*** gimple-low.c	(revision 134640)
--- gimple-low.c	(working copy)
*************** lower_function_body (void)
*** 122,128 ****
        disp_label = create_artificial_label ();
        /* This mark will create forward edges from every call site.  */
        DECL_NONLOCAL (disp_label) = 1;
!       current_function_has_nonlocal_label = 1;
        x = build1 (LABEL_EXPR, void_type_node, disp_label);
        tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
  
--- 122,128 ----
        disp_label = create_artificial_label ();
        /* This mark will create forward edges from every call site.  */
        DECL_NONLOCAL (disp_label) = 1;
!       cfun->has_nonlocal_label = 1;
        x = build1 (LABEL_EXPR, void_type_node, disp_label);
        tsi_link_after (&i, x, TSI_CONTINUE_LINKING);
  
Index: global.c
===================================================================
*** global.c	(revision 134640)
--- global.c	(working copy)
*************** compute_regsets (HARD_REG_SET *elim_set,
*** 249,255 ****
  #endif
    int need_fp
      = (! flag_omit_frame_pointer
!        || (current_function_calls_alloca && EXIT_IGNORE_STACK)
         || FRAME_POINTER_REQUIRED);
  
    max_regno = max_reg_num ();
--- 249,255 ----
  #endif
    int need_fp
      = (! flag_omit_frame_pointer
!        || (cfun->calls_alloca && EXIT_IGNORE_STACK)
         || FRAME_POINTER_REQUIRED);
  
    max_regno = max_reg_num ();
*************** global_alloc (void)
*** 378,384 ****
      if (REG_N_REFS (i) != 0 && REG_LIVE_LENGTH (i) != -1
  	/* Don't allocate pseudos that cross calls,
  	   if this function receives a nonlocal goto.  */
! 	&& (! current_function_has_nonlocal_label
  	    || REG_N_CALLS_CROSSED (i) == 0))
        {
  	int blk = regno_basic_block (i);
--- 378,384 ----
      if (REG_N_REFS (i) != 0 && REG_LIVE_LENGTH (i) != -1
  	/* Don't allocate pseudos that cross calls,
  	   if this function receives a nonlocal goto.  */
! 	&& (! cfun->has_nonlocal_label
  	    || REG_N_CALLS_CROSSED (i) == 0))
        {
  	int blk = regno_basic_block (i);
Index: dwarf2out.c
===================================================================
*** dwarf2out.c	(revision 134640)
--- dwarf2out.c	(working copy)
*************** dwarf2out_begin_prologue (unsigned int l
*** 2657,2664 ****
    fde->dw_fde_cfi = NULL;
    fde->funcdef_number = current_function_funcdef_no;
    fde->nothrow = TREE_NOTHROW (current_function_decl);
!   fde->uses_eh_lsda = cfun->uses_eh_lsda;
!   fde->all_throwers_are_sibcalls = cfun->all_throwers_are_sibcalls;
  
    args_size = old_args_size = 0;
  
--- 2657,2664 ----
    fde->dw_fde_cfi = NULL;
    fde->funcdef_number = current_function_funcdef_no;
    fde->nothrow = TREE_NOTHROW (current_function_decl);
!   fde->uses_eh_lsda = crtl->uses_eh_lsda;
!   fde->all_throwers_are_sibcalls = crtl->all_throwers_are_sibcalls;
  
    args_size = old_args_size = 0;
  
Index: expr.c
===================================================================
*** expr.c	(revision 134640)
--- expr.c	(working copy)
*************** expand_assignment (tree to, tree from, b
*** 4339,4346 ****
       the place the value is being stored, use a safe function when copying
       a value through a pointer into a structure value return block.  */
    if (TREE_CODE (to) == RESULT_DECL && TREE_CODE (from) == INDIRECT_REF
!       && current_function_returns_struct
!       && !current_function_returns_pcc_struct)
      {
        rtx from_rtx, size;
  
--- 4339,4346 ----
       the place the value is being stored, use a safe function when copying
       a value through a pointer into a structure value return block.  */
    if (TREE_CODE (to) == RESULT_DECL && TREE_CODE (from) == INDIRECT_REF
!       && cfun->returns_struct
!       && !cfun->returns_pcc_struct)
      {
        rtx from_rtx, size;
  
Index: dse.c
===================================================================
*** dse.c	(revision 134640)
--- dse.c	(working copy)
*************** struct clear_alias_mode_holder
*** 531,537 ****
  
  static alloc_pool clear_alias_mode_pool;
  
! /* This is true except if current_function_stdarg -- i.e. we cannot do
     this for vararg functions because they play games with the frame.  */
  static bool stores_off_frame_dead_at_return;
  
--- 531,537 ----
  
  static alloc_pool clear_alias_mode_pool;
  
! /* This is true except if cfun->stdarg -- i.e. we cannot do
     this for vararg functions because they play games with the frame.  */
  static bool stores_off_frame_dead_at_return;
  
*************** dse_step0 (void)
*** 718,724 ****
    bb_table = XCNEWVEC (bb_info_t, last_basic_block);
    rtx_group_next_id = 0;
  
!   stores_off_frame_dead_at_return = !current_function_stdarg;
  
    init_alias_analysis ();
    
--- 718,724 ----
    bb_table = XCNEWVEC (bb_info_t, last_basic_block);
    rtx_group_next_id = 0;
  
!   stores_off_frame_dead_at_return = !cfun->stdarg;
  
    init_alias_analysis ();
    
*************** dse_step1 (void)
*** 2163,2169 ****
  	      && (EDGE_COUNT (bb->succs) == 0
  		  || (single_succ_p (bb)
  		      && single_succ (bb) == EXIT_BLOCK_PTR
! 		      && ! current_function_calls_eh_return)))
  	    {
  	      insn_info_t i_ptr = active_local_stores;
  	      while (i_ptr)
--- 2163,2169 ----
  	      && (EDGE_COUNT (bb->succs) == 0
  		  || (single_succ_p (bb)
  		      && single_succ (bb) == EXIT_BLOCK_PTR
! 		      && ! crtl->calls_eh_return)))
  	    {
  	      insn_info_t i_ptr = active_local_stores;
  	      while (i_ptr)
Index: c-decl.c
===================================================================
*** c-decl.c	(revision 134640)
--- c-decl.c	(working copy)
*************** store_parm_decls (void)
*** 6637,6643 ****
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->x_dont_save_pending_sizes_p = 1;
  }
  
  /* Emit diagnostics that require gimple input for detection.  Operate on
--- 6637,6643 ----
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->dont_save_pending_sizes_p = 1;
  }
  
  /* Emit diagnostics that require gimple input for detection.  Operate on
Index: local-alloc.c
===================================================================
*** local-alloc.c	(revision 134640)
--- local-alloc.c	(working copy)
*************** combine_regs (rtx usedreg, rtx setreg, i
*** 2008,2014 ****
    if (reg_qty[sreg] >= -1
        /* If we are not going to let any regs live across calls,
  	 don't tie a call-crossing reg to a non-call-crossing reg.  */
!       || (current_function_has_nonlocal_label
  	  && ((REG_N_CALLS_CROSSED (ureg) > 0)
  	      != (REG_N_CALLS_CROSSED (sreg) > 0))))
      return 0;
--- 2008,2014 ----
    if (reg_qty[sreg] >= -1
        /* If we are not going to let any regs live across calls,
  	 don't tie a call-crossing reg to a non-call-crossing reg.  */
!       || (cfun->has_nonlocal_label
  	  && ((REG_N_CALLS_CROSSED (ureg) > 0)
  	      != (REG_N_CALLS_CROSSED (sreg) > 0))))
      return 0;
*************** find_free_reg (enum reg_class class, enu
*** 2229,2235 ****
  
    /* Don't let a pseudo live in a reg across a function call
       if we might get a nonlocal goto.  */
!   if (current_function_has_nonlocal_label
        && qty[qtyno].n_calls_crossed > 0)
      return -1;
  
--- 2229,2235 ----
  
    /* Don't let a pseudo live in a reg across a function call
       if we might get a nonlocal goto.  */
!   if (cfun->has_nonlocal_label
        && qty[qtyno].n_calls_crossed > 0)
      return -1;
  
Index: function.c
===================================================================
*** function.c	(revision 134640)
--- function.c	(working copy)
*************** assign_parms_augmented_arg_list (struct 
*** 1969,1975 ****
  
    /* If struct value address is treated as the first argument, make it so.  */
    if (aggregate_value_p (DECL_RESULT (fndecl), fndecl)
!       && ! current_function_returns_pcc_struct
        && targetm.calls.struct_value_rtx (TREE_TYPE (fndecl), 1) == 0)
      {
        tree type = build_pointer_type (TREE_TYPE (fntype));
--- 1969,1975 ----
  
    /* If struct value address is treated as the first argument, make it so.  */
    if (aggregate_value_p (DECL_RESULT (fndecl), fndecl)
!       && ! cfun->returns_pcc_struct
        && targetm.calls.struct_value_rtx (TREE_TYPE (fndecl), 1) == 0)
      {
        tree type = build_pointer_type (TREE_TYPE (fntype));
*************** assign_parm_find_data_types (struct assi
*** 2008,2014 ****
    memset (data, 0, sizeof (*data));
  
    /* NAMED_ARG is a mis-nomer.  We really mean 'non-varadic'. */
!   if (!current_function_stdarg)
      data->named_arg = 1;  /* No varadic parms.  */
    else if (TREE_CHAIN (parm))
      data->named_arg = 1;  /* Not the last non-varadic parm. */
--- 2008,2014 ----
    memset (data, 0, sizeof (*data));
  
    /* NAMED_ARG is a mis-nomer.  We really mean 'non-varadic'. */
!   if (!cfun->stdarg)
      data->named_arg = 1;  /* No varadic parms.  */
    else if (TREE_CHAIN (parm))
      data->named_arg = 1;  /* Not the last non-varadic parm. */
*************** assign_parms (tree fndecl)
*** 2967,2973 ****
  	  continue;
  	}
  
!       if (current_function_stdarg && !TREE_CHAIN (parm))
  	assign_parms_setup_varargs (&all, &data, false);
  
        /* Find out where the parameter arrives in this function.  */
--- 2967,2973 ----
  	  continue;
  	}
  
!       if (cfun->stdarg && !TREE_CHAIN (parm))
  	assign_parms_setup_varargs (&all, &data, false);
  
        /* Find out where the parameter arrives in this function.  */
*************** allocate_struct_function (tree fndecl, b
*** 3859,3870 ****
        if (!abstract_p && aggregate_value_p (result, fndecl))
  	{
  #ifdef PCC_STATIC_STRUCT_RETURN
! 	  current_function_returns_pcc_struct = 1;
  #endif
! 	  current_function_returns_struct = 1;
  	}
  
!       current_function_stdarg
  	= (fntype
  	   && TYPE_ARG_TYPES (fntype) != 0
  	   && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
--- 3859,3870 ----
        if (!abstract_p && aggregate_value_p (result, fndecl))
  	{
  #ifdef PCC_STATIC_STRUCT_RETURN
! 	  cfun->returns_pcc_struct = 1;
  #endif
! 	  cfun->returns_struct = 1;
  	}
  
!       cfun->stdarg
  	= (fntype
  	   && TYPE_ARG_TYPES (fntype) != 0
  	   && (TREE_VALUE (tree_last (TYPE_ARG_TYPES (fntype)))
*************** expand_function_start (tree subr)
*** 4103,4113 ****
       valid operands of arithmetic insns.  */
    init_recog_no_volatile ();
  
!   current_function_profile
      = (profile_flag
         && ! DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (subr));
  
!   current_function_limit_stack
      = (stack_limit_rtx != NULL_RTX && ! DECL_NO_LIMIT_STACK (subr));
  
    /* Make the label for return statements to jump to.  Do not special
--- 4103,4113 ----
       valid operands of arithmetic insns.  */
    init_recog_no_volatile ();
  
!   crtl->profile
      = (profile_flag
         && ! DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT (subr));
  
!   crtl->limit_stack
      = (stack_limit_rtx != NULL_RTX && ! DECL_NO_LIMIT_STACK (subr));
  
    /* Make the label for return statements to jump to.  Do not special
*************** expand_function_start (tree subr)
*** 4126,4132 ****
        rtx value_address = 0;
  
  #ifdef PCC_STATIC_STRUCT_RETURN
!       if (current_function_returns_pcc_struct)
  	{
  	  int size = int_size_in_bytes (TREE_TYPE (DECL_RESULT (subr)));
  	  value_address = assemble_static_space (size);
--- 4126,4132 ----
        rtx value_address = 0;
  
  #ifdef PCC_STATIC_STRUCT_RETURN
!       if (cfun->returns_pcc_struct)
  	{
  	  int size = int_size_in_bytes (TREE_TYPE (DECL_RESULT (subr)));
  	  value_address = assemble_static_space (size);
*************** expand_function_start (tree subr)
*** 4244,4250 ****
  
    parm_birth_insn = get_last_insn ();
  
!   if (current_function_profile)
      {
  #ifdef PROFILE_HOOK
        PROFILE_HOOK (current_function_funcdef_no);
--- 4244,4250 ----
  
    parm_birth_insn = get_last_insn ();
  
!   if (crtl->profile)
      {
  #ifdef PROFILE_HOOK
        PROFILE_HOOK (current_function_funcdef_no);
*************** expand_function_end (void)
*** 4366,4372 ****
  
    /* If arg_pointer_save_area was referenced only from a nested
       function, we will not have initialized it yet.  Do that now.  */
!   if (arg_pointer_save_area && ! cfun->arg_pointer_save_area_init)
      get_arg_pointer_save_area ();
  
    /* If we are doing stack checking and this function makes calls,
--- 4366,4372 ----
  
    /* If arg_pointer_save_area was referenced only from a nested
       function, we will not have initialized it yet.  Do that now.  */
!   if (arg_pointer_save_area && ! crtl->arg_pointer_save_area_init)
      get_arg_pointer_save_area ();
  
    /* If we are doing stack checking and this function makes calls,
*************** expand_function_end (void)
*** 4523,4531 ****
  
       If returning a structure PCC style,
       the caller also depends on this value.
!      And current_function_returns_pcc_struct is not necessarily set.  */
!   if (current_function_returns_struct
!       || current_function_returns_pcc_struct)
      {
        rtx value_address = DECL_RTL (DECL_RESULT (current_function_decl));
        tree type = TREE_TYPE (DECL_RESULT (current_function_decl));
--- 4523,4531 ----
  
       If returning a structure PCC style,
       the caller also depends on this value.
!      And cfun->returns_pcc_struct is not necessarily set.  */
!   if (cfun->returns_struct
!       || cfun->returns_pcc_struct)
      {
        rtx value_address = DECL_RTL (DECL_RESULT (current_function_decl));
        tree type = TREE_TYPE (DECL_RESULT (current_function_decl));
*************** expand_function_end (void)
*** 4584,4590 ****
       an accurate stack pointer to exit the function,
       insert some code to save and restore the stack pointer.  */
    if (! EXIT_IGNORE_STACK
!       && current_function_calls_alloca)
      {
        rtx tem = 0;
  
--- 4584,4590 ----
       an accurate stack pointer to exit the function,
       insert some code to save and restore the stack pointer.  */
    if (! EXIT_IGNORE_STACK
!       && cfun->calls_alloca)
      {
        rtx tem = 0;
  
*************** get_arg_pointer_save_area (void)
*** 4610,4616 ****
        arg_pointer_save_area = ret;
      }
  
!   if (! cfun->arg_pointer_save_area_init)
      {
        rtx seq;
  
--- 4610,4616 ----
        arg_pointer_save_area = ret;
      }
  
!   if (! crtl->arg_pointer_save_area_init)
      {
        rtx seq;
  
*************** thread_prologue_and_epilogue_insns (void
*** 4737,4743 ****
  
        /* Insert an explicit USE for the frame pointer 
           if the profiling is on and the frame pointer is required.  */
!       if (current_function_profile && frame_pointer_needed)
          emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
  
        /* Retain a map of the prologue insns.  */
--- 4737,4743 ----
  
        /* Insert an explicit USE for the frame pointer 
           if the profiling is on and the frame pointer is required.  */
!       if (crtl->profile && frame_pointer_needed)
          emit_insn (gen_rtx_USE (VOIDmode, hard_frame_pointer_rtx));
  
        /* Retain a map of the prologue insns.  */
*************** thread_prologue_and_epilogue_insns (void
*** 4748,4754 ****
        /* Ensure that instructions are not moved into the prologue when
  	 profiling is on.  The call to the profiling routine can be
  	 emitted within the live range of a call-clobbered register.  */
!       if (current_function_profile)
          emit_insn (gen_blockage ());
  #endif
  
--- 4748,4754 ----
        /* Ensure that instructions are not moved into the prologue when
  	 profiling is on.  The call to the profiling routine can be
  	 emitted within the live range of a call-clobbered register.  */
!       if (crtl->profile)
          emit_insn (gen_blockage ());
  #endif
  
*************** rest_of_match_asm_constraints (void)
*** 5343,5349 ****
    rtx insn, pat, *p_sets;
    int noutputs;
  
!   if (!cfun->has_asm_statement)
      return 0;
  
    df_set_flags (DF_DEFER_INSN_RESCAN);
--- 5343,5349 ----
    rtx insn, pat, *p_sets;
    int noutputs;
  
!   if (!crtl->has_asm_statement)
      return 0;
  
    df_set_flags (DF_DEFER_INSN_RESCAN);
Index: stor-layout.c
===================================================================
*** stor-layout.c	(revision 134640)
--- stor-layout.c	(working copy)
*************** variable_size (tree size)
*** 138,144 ****
       places.  */
    save = skip_simple_arithmetic (size);
  
!   if (cfun && cfun->x_dont_save_pending_sizes_p)
      /* The front-end doesn't want us to keep a list of the expressions
         that determine sizes for variable size objects.  Trust it.  */
      return size;
--- 138,144 ----
       places.  */
    save = skip_simple_arithmetic (size);
  
!   if (cfun && cfun->dont_save_pending_sizes_p)
      /* The front-end doesn't want us to keep a list of the expressions
         that determine sizes for variable size objects.  Trust it.  */
      return size;
Index: gcse.c
===================================================================
*** gcse.c	(revision 134640)
--- gcse.c	(working copy)
*************** gcse_main (rtx f ATTRIBUTE_UNUSED)
*** 658,664 ****
  
    /* We do not construct an accurate cfg in functions which call
       setjmp, so just punt to be safe.  */
!   if (current_function_calls_setjmp)
      return 0;
  
    /* Assume that we do not need to run jump optimizations after gcse.  */
--- 658,664 ----
  
    /* We do not construct an accurate cfg in functions which call
       setjmp, so just punt to be safe.  */
!   if (cfun->calls_setjmp)
      return 0;
  
    /* Assume that we do not need to run jump optimizations after gcse.  */
*************** bypass_jumps (void)
*** 6575,6581 ****
  
    /* We do not construct an accurate cfg in functions which call
       setjmp, so just punt to be safe.  */
!   if (current_function_calls_setjmp)
      return 0;
  
    /* Identify the basic block information for this function, including
--- 6575,6581 ----
  
    /* We do not construct an accurate cfg in functions which call
       setjmp, so just punt to be safe.  */
!   if (cfun->calls_setjmp)
      return 0;
  
    /* Identify the basic block information for this function, including
Index: gimplify.c
===================================================================
*** gimplify.c	(revision 134640)
--- gimplify.c	(working copy)
*************** gimplify_function_tree (tree fndecl)
*** 6603,6609 ****
        DECL_SAVED_TREE (fndecl) = bind;
      }
  
-   cfun->gimplified = true;
    current_function_decl = oldfn;
    pop_cfun ();
  }
--- 6603,6608 ----
Index: calls.c
===================================================================
*** calls.c	(revision 134640)
--- calls.c	(working copy)
*************** emit_call_1 (rtx funexp, tree fntree, tr
*** 399,405 ****
      {
        REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_SETJMP, const0_rtx,
  						 REG_NOTES (call_insn));
!       current_function_calls_setjmp = 1;
      }
  
    SIBLING_CALL_P (call_insn) = ((ecf_flags & ECF_SIBCALL) != 0);
--- 399,405 ----
      {
        REG_NOTES (call_insn) = gen_rtx_EXPR_LIST (REG_SETJMP, const0_rtx,
  						 REG_NOTES (call_insn));
!       cfun->calls_setjmp = 1;
      }
  
    SIBLING_CALL_P (call_insn) = ((ecf_flags & ECF_SIBCALL) != 0);
*************** expand_call (tree exp, rtx target, int i
*** 2122,2128 ****
      type_arg_types = TYPE_ARG_TYPES (funtype);
  
    if (flags & ECF_MAY_BE_ALLOCA)
!     current_function_calls_alloca = 1;
  
    /* If struct_value_rtx is 0, it means pass the address
       as if it were an extra parameter.  Put the argument expression
--- 2122,2128 ----
      type_arg_types = TYPE_ARG_TYPES (funtype);
  
    if (flags & ECF_MAY_BE_ALLOCA)
!     cfun->calls_alloca = 1;
  
    /* If struct_value_rtx is 0, it means pass the address
       as if it were an extra parameter.  Put the argument expression
*************** expand_call (tree exp, rtx target, int i
*** 2299,2306 ****
    if (crtl->preferred_stack_boundary < preferred_stack_boundary
        && fndecl != current_function_decl)
      crtl->preferred_stack_boundary = preferred_stack_boundary;
-   if (fndecl == current_function_decl)
-     cfun->recursive_call_emit = true;
  
    preferred_unit_stack_boundary = preferred_stack_boundary / BITS_PER_UNIT;
  
--- 2299,2304 ----
*************** expand_call (tree exp, rtx target, int i
*** 3160,3166 ****
    if (tail_call_insns)
      {
        emit_insn (tail_call_insns);
!       cfun->tail_call_emit = true;
      }
    else
      emit_insn (normal_call_insns);
--- 3158,3164 ----
    if (tail_call_insns)
      {
        emit_insn (tail_call_insns);
!       crtl->tail_call_emit = true;
      }
    else
      emit_insn (normal_call_insns);
Index: bt-load.c
===================================================================
*** bt-load.c	(revision 134640)
--- bt-load.c	(working copy)
*************** compute_defs_uses_and_gen (fibheap_t all
*** 508,514 ****
  		  note_other_use_this_block (regno, info.users_this_bb);
  		}
  	      /* Check for the blockage emitted by expand_nl_goto_receiver.  */
! 	      else if (current_function_has_nonlocal_label
  		       && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE)
  		{
  		  btr_user user;
--- 508,514 ----
  		  note_other_use_this_block (regno, info.users_this_bb);
  		}
  	      /* Check for the blockage emitted by expand_nl_goto_receiver.  */
! 	      else if (cfun->has_nonlocal_label
  		       && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE)
  		{
  		  btr_user user;
Index: except.c
===================================================================
*** except.c	(revision 134640)
--- except.c	(working copy)
*************** sjlj_assign_call_site_values (rtx dispat
*** 1691,1697 ****
  	r->landing_pad = dispatch_label;
  	lp_info[i].action_index = collect_one_action_chain (ar_hash, r);
  	if (lp_info[i].action_index != -1)
! 	  cfun->uses_eh_lsda = 1;
        }
  
    htab_delete (ar_hash);
--- 1691,1697 ----
  	r->landing_pad = dispatch_label;
  	lp_info[i].action_index = collect_one_action_chain (ar_hash, r);
  	if (lp_info[i].action_index != -1)
! 	  crtl->uses_eh_lsda = 1;
        }
  
    htab_delete (ar_hash);
*************** sjlj_emit_function_enter (rtx dispatch_l
*** 1817,1823 ****
    emit_move_insn (mem, eh_personality_libfunc);
  
    mem = adjust_address (fc, Pmode, sjlj_fc_lsda_ofs);
!   if (cfun->uses_eh_lsda)
      {
        char buf[20];
        rtx sym;
--- 1817,1823 ----
    emit_move_insn (mem, eh_personality_libfunc);
  
    mem = adjust_address (fc, Pmode, sjlj_fc_lsda_ofs);
!   if (crtl->uses_eh_lsda)
      {
        char buf[20];
        rtx sym;
*************** can_throw_external (const_rtx insn)
*** 2746,2752 ****
    return can_throw_external_1 (INTVAL (XEXP (note, 0)), false);
  }
  
! /* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls.  */
  
  unsigned int
  set_nothrow_function_flags (void)
--- 2746,2752 ----
    return can_throw_external_1 (INTVAL (XEXP (note, 0)), false);
  }
  
! /* Set TREE_NOTHROW and crtl->all_throwers_are_sibcalls.  */
  
  unsigned int
  set_nothrow_function_flags (void)
*************** set_nothrow_function_flags (void)
*** 2761,2773 ****
  
    TREE_NOTHROW (current_function_decl) = 1;
  
!   /* Assume cfun->all_throwers_are_sibcalls until we encounter
       something that can throw an exception.  We specifically exempt
       CALL_INSNs that are SIBLING_CALL_P, as these are really jumps,
       and can't throw.  Most CALL_INSNs are not SIBLING_CALL_P, so this
       is optimistic.  */
  
!   cfun->all_throwers_are_sibcalls = 1;
  
    if (! flag_exceptions)
      return 0;
--- 2761,2773 ----
  
    TREE_NOTHROW (current_function_decl) = 1;
  
!   /* Assume crtl->all_throwers_are_sibcalls until we encounter
       something that can throw an exception.  We specifically exempt
       CALL_INSNs that are SIBLING_CALL_P, as these are really jumps,
       and can't throw.  Most CALL_INSNs are not SIBLING_CALL_P, so this
       is optimistic.  */
  
!   crtl->all_throwers_are_sibcalls = 1;
  
    if (! flag_exceptions)
      return 0;
*************** set_nothrow_function_flags (void)
*** 2779,2785 ****
  
  	if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
  	  {
! 	    cfun->all_throwers_are_sibcalls = 0;
  	    return 0;
  	  }
        }
--- 2779,2785 ----
  
  	if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
  	  {
! 	    crtl->all_throwers_are_sibcalls = 0;
  	    return 0;
  	  }
        }
*************** set_nothrow_function_flags (void)
*** 2792,2798 ****
  
  	if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
  	  {
! 	    cfun->all_throwers_are_sibcalls = 0;
  	    return 0;
  	  }
        }
--- 2792,2798 ----
  
  	if (!CALL_P (insn) || !SIBLING_CALL_P (insn))
  	  {
! 	    crtl->all_throwers_are_sibcalls = 0;
  	    return 0;
  	  }
        }
*************** expand_builtin_unwind_init (void)
*** 2829,2835 ****
  {
    /* Set this so all the registers get saved in our frame; we need to be
       able to copy the saved values for any registers from frames we unwind.  */
!   current_function_saves_all_registers = 1;
  
  #ifdef SETUP_FRAME_ADDRESSES
    SETUP_FRAME_ADDRESSES ();
--- 2829,2835 ----
  {
    /* Set this so all the registers get saved in our frame; we need to be
       able to copy the saved values for any registers from frames we unwind.  */
!   crtl->saves_all_registers = 1;
  
  #ifdef SETUP_FRAME_ADDRESSES
    SETUP_FRAME_ADDRESSES ();
*************** expand_eh_return (void)
*** 2952,2958 ****
    if (! crtl->eh.ehr_label)
      return;
  
!   current_function_calls_eh_return = 1;
  
  #ifdef EH_RETURN_STACKADJ_RTX
    emit_move_insn (EH_RETURN_STACKADJ_RTX, const0_rtx);
--- 2952,2958 ----
    if (! crtl->eh.ehr_label)
      return;
  
!   crtl->calls_eh_return = 1;
  
  #ifdef EH_RETURN_STACKADJ_RTX
    emit_move_insn (EH_RETURN_STACKADJ_RTX, const0_rtx);
*************** convert_to_eh_region_ranges (void)
*** 3248,3254 ****
  	/* Existence of catch handlers, or must-not-throw regions
  	   implies that an lsda is needed (even if empty).  */
  	if (this_action != -1)
! 	  cfun->uses_eh_lsda = 1;
  
  	/* Delay creation of region notes for no-action regions
  	   until we're sure that an lsda will be required.  */
--- 3248,3254 ----
  	/* Existence of catch handlers, or must-not-throw regions
  	   implies that an lsda is needed (even if empty).  */
  	if (this_action != -1)
! 	  crtl->uses_eh_lsda = 1;
  
  	/* Delay creation of region notes for no-action regions
  	   until we're sure that an lsda will be required.  */
*************** output_function_exception_table (const c
*** 3599,3605 ****
    int tt_format_size = 0;
  
    /* Not all functions need anything.  */
!   if (! cfun->uses_eh_lsda)
      return;
  
    if (eh_personality_libfunc)
--- 3599,3605 ----
    int tt_format_size = 0;
  
    /* Not all functions need anything.  */
!   if (! crtl->uses_eh_lsda)
      return;
  
    if (eh_personality_libfunc)
Index: emit-rtl.c
===================================================================
*** emit-rtl.c	(revision 134640)
--- emit-rtl.c	(working copy)
*************** gen_tmp_stack_mem (enum machine_mode mod
*** 678,684 ****
  {
    rtx mem = gen_rtx_MEM (mode, addr);
    MEM_NOTRAP_P (mem) = 1;
!   if (!current_function_calls_alloca)
      set_mem_alias_set (mem, get_frame_alias_set ());
    return mem;
  }
--- 678,684 ----
  {
    rtx mem = gen_rtx_MEM (mode, addr);
    MEM_NOTRAP_P (mem) = 1;
!   if (!cfun->calls_alloca)
      set_mem_alias_set (mem, get_frame_alias_set ());
    return mem;
  }
Index: cfgexpand.c
===================================================================
*** cfgexpand.c	(revision 134640)
--- cfgexpand.c	(working copy)
*************** expand_used_vars (void)
*** 1177,1183 ****
       stack guard: protect-all, alloca used, protected decls present.  */
    if (flag_stack_protect == 2
        || (flag_stack_protect
! 	  && (current_function_calls_alloca || has_protected_decls)))
      create_stack_guard ();
  
    /* Assign rtl to each variable based on these partitions.  */
--- 1177,1183 ----
       stack guard: protect-all, alloca used, protected decls present.  */
    if (flag_stack_protect == 2
        || (flag_stack_protect
! 	  && (cfun->calls_alloca || has_protected_decls)))
      create_stack_guard ();
  
    /* Assign rtl to each variable based on these partitions.  */
*************** tree_expand_cfg (void)
*** 1874,1880 ****
    /* Honor stack protection warnings.  */
    if (warn_stack_protect)
      {
!       if (current_function_calls_alloca)
  	warning (OPT_Wstack_protector, 
  		 "not protecting local variables: variable length buffer");
        if (has_short_buffer && !crtl->stack_protect_guard)
--- 1874,1880 ----
    /* Honor stack protection warnings.  */
    if (warn_stack_protect)
      {
!       if (cfun->calls_alloca)
  	warning (OPT_Wstack_protector, 
  		 "not protecting local variables: variable length buffer");
        if (has_short_buffer && !crtl->stack_protect_guard)
Index: cfgcleanup.c
===================================================================
*** cfgcleanup.c	(revision 134640)
--- cfgcleanup.c	(working copy)
*************** rest_of_handle_jump (void)
*** 2176,2182 ****
  {
    delete_unreachable_blocks ();
  
!   if (cfun->tail_call_emit)
      fixup_tail_calls ();
    return 0;
  }
--- 2176,2182 ----
  {
    delete_unreachable_blocks ();
  
!   if (crtl->tail_call_emit)
      fixup_tail_calls ();
    return 0;
  }
Index: explow.c
===================================================================
*** explow.c	(revision 134640)
--- explow.c	(working copy)
*************** allocate_dynamic_stack_space (rtx size, 
*** 1081,1087 ****
      return virtual_stack_dynamic_rtx;
  
    /* Otherwise, show we're calling alloca or equivalent.  */
!   current_function_calls_alloca = 1;
  
    /* Ensure the size is in the proper mode.  */
    if (GET_MODE (size) != VOIDmode && GET_MODE (size) != Pmode)
--- 1081,1087 ----
      return virtual_stack_dynamic_rtx;
  
    /* Otherwise, show we're calling alloca or equivalent.  */
!   cfun->calls_alloca = 1;
  
    /* Ensure the size is in the proper mode.  */
    if (GET_MODE (size) != VOIDmode && GET_MODE (size) != Pmode)
*************** allocate_dynamic_stack_space (rtx size, 
*** 1129,1135 ****
       would use reg notes to store the "optimized" size and fix things
       up later.  These days we know this information before we ever
       start building RTL so the reg notes are unnecessary.  */
!   if (!current_function_calls_setjmp)
      {
        int align = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT;
  
--- 1129,1135 ----
       would use reg notes to store the "optimized" size and fix things
       up later.  These days we know this information before we ever
       start building RTL so the reg notes are unnecessary.  */
!   if (!cfun->calls_setjmp)
      {
        int align = PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT;
  
*************** allocate_dynamic_stack_space (rtx size, 
*** 1236,1242 ****
  #endif
  
        /* Check stack bounds if necessary.  */
!       if (current_function_limit_stack)
  	{
  	  rtx available;
  	  rtx space_available = gen_label_rtx ();
--- 1236,1242 ----
  #endif
  
        /* Check stack bounds if necessary.  */
!       if (crtl->limit_stack)
  	{
  	  rtx available;
  	  rtx space_available = gen_label_rtx ();
Index: varasm.c
===================================================================
*** varasm.c	(revision 134640)
--- varasm.c	(working copy)
*************** assemble_start_function (tree decl, cons
*** 1633,1639 ****
        /* When the function starts with a cold section, we need to explicitly
  	 align the hot section and write out the hot section label.
  	 But if the current function is a thunk, we do not have a CFG.  */
!       if (!current_function_is_thunk
  	  && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
  	{
  	  switch_to_section (text_section);
--- 1633,1639 ----
        /* When the function starts with a cold section, we need to explicitly
  	 align the hot section and write out the hot section label.
  	 But if the current function is a thunk, we do not have a CFG.  */
!       if (!crtl->is_thunk
  	  && BB_PARTITION (ENTRY_BLOCK_PTR->next_bb) == BB_COLD_PARTITION)
  	{
  	  switch_to_section (text_section);
*************** force_const_mem (enum machine_mode mode,
*** 3486,3492 ****
      return NULL_RTX;
  
    /* Record that this function has used a constant pool entry.  */
!   current_function_uses_const_pool = 1;
  
    /* Decide which pool to use.  */
    pool = (targetm.use_blocks_for_constant_p (mode, x)
--- 3486,3492 ----
      return NULL_RTX;
  
    /* Record that this function has used a constant pool entry.  */
!   crtl->uses_const_pool = 1;
  
    /* Decide which pool to use.  */
    pool = (targetm.use_blocks_for_constant_p (mode, x)
*************** mark_constant_pool (void)
*** 3800,3806 ****
  {
    rtx insn, link;
  
!   if (!current_function_uses_const_pool && n_deferred_constants == 0)
      return;
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
--- 3800,3806 ----
  {
    rtx insn, link;
  
!   if (!crtl->uses_const_pool && n_deferred_constants == 0)
      return;
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
Index: tree-optimize.c
===================================================================
*** tree-optimize.c	(revision 134640)
--- tree-optimize.c	(working copy)
*************** tree_rest_of_compilation (tree fndecl)
*** 411,417 ****
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->x_dont_save_pending_sizes_p = 1;
    
    tree_register_cfg_hooks ();
  
--- 411,417 ----
       call expand_expr to calculate the size of a variable-sized array.
       We haven't necessarily assigned RTL to all variables yet, so it's
       not safe to try to expand expressions involving them.  */
!   cfun->dont_save_pending_sizes_p = 1;
    
    tree_register_cfg_hooks ();
  
Index: stack-ptr-mod.c
===================================================================
*** stack-ptr-mod.c	(revision 134640)
--- stack-ptr-mod.c	(working copy)
*************** notice_stack_pointer_modification (void)
*** 57,63 ****
  
    /* Assume that the stack pointer is unchanging if alloca hasn't
       been used.  */
!   current_function_sp_is_unchanging = !current_function_calls_alloca;
    if (current_function_sp_is_unchanging)
      FOR_EACH_BB (bb)
        FOR_BB_INSNS (bb, insn)
--- 57,63 ----
  
    /* Assume that the stack pointer is unchanging if alloca hasn't
       been used.  */
!   current_function_sp_is_unchanging = !cfun->calls_alloca;
    if (current_function_sp_is_unchanging)
      FOR_EACH_BB (bb)
        FOR_BB_INSNS (bb, insn)
Index: tree-cfg.c
===================================================================
*** tree-cfg.c	(revision 134640)
--- tree-cfg.c	(working copy)
*************** notice_special_calls (tree t)
*** 1808,1816 ****
    int flags = call_expr_flags (t);
  
    if (flags & ECF_MAY_BE_ALLOCA)
!     current_function_calls_alloca = true;
    if (flags & ECF_RETURNS_TWICE)
!     current_function_calls_setjmp = true;
  }
  
  
--- 1808,1816 ----
    int flags = call_expr_flags (t);
  
    if (flags & ECF_MAY_BE_ALLOCA)
!     cfun->calls_alloca = true;
    if (flags & ECF_RETURNS_TWICE)
!     cfun->calls_setjmp = true;
  }
  
  
*************** notice_special_calls (tree t)
*** 1820,1827 ****
  void
  clear_special_calls (void)
  {
!   current_function_calls_alloca = false;
!   current_function_calls_setjmp = false;
  }
  
  
--- 1820,1827 ----
  void
  clear_special_calls (void)
  {
!   cfun->calls_alloca = false;
!   cfun->calls_setjmp = false;
  }
  
  
*************** is_ctrl_altering_stmt (const_tree t)
*** 2495,2501 ****
      {
        /* A non-pure/const CALL_EXPR alters flow control if the current
  	 function has nonlocal labels.  */
!       if (TREE_SIDE_EFFECTS (call) && current_function_has_nonlocal_label)
  	return true;
  
        /* A CALL_EXPR also alters control flow if it does not return.  */
--- 2495,2501 ----
      {
        /* A non-pure/const CALL_EXPR alters flow control if the current
  	 function has nonlocal labels.  */
!       if (TREE_SIDE_EFFECTS (call) && cfun->has_nonlocal_label)
  	return true;
  
        /* A CALL_EXPR also alters control flow if it does not return.  */
*************** tree_can_make_abnormal_goto (const_tree 
*** 2545,2551 ****
    if (TREE_CODE (t) == WITH_SIZE_EXPR)
      t = TREE_OPERAND (t, 0);
    if (TREE_CODE (t) == CALL_EXPR)
!     return TREE_SIDE_EFFECTS (t) && current_function_has_nonlocal_label;
    return false;
  }
  
--- 2545,2551 ----
    if (TREE_CODE (t) == WITH_SIZE_EXPR)
      t = TREE_OPERAND (t, 0);
    if (TREE_CODE (t) == CALL_EXPR)
!     return TREE_SIDE_EFFECTS (t) && cfun->has_nonlocal_label;
    return false;
  }
  
*************** tree_purge_dead_abnormal_call_edges (bas
*** 6580,6586 ****
  {
    bool changed = tree_purge_dead_eh_edges (bb);
  
!   if (current_function_has_nonlocal_label)
      {
        tree stmt = last_stmt (bb);
        edge_iterator ei;
--- 6580,6586 ----
  {
    bool changed = tree_purge_dead_eh_edges (bb);
  
!   if (cfun->has_nonlocal_label)
      {
        tree stmt = last_stmt (bb);
        edge_iterator ei;
Index: config/alpha/predicates.md
===================================================================
*** config/alpha/predicates.md	(revision 134640)
--- config/alpha/predicates.md	(working copy)
***************
*** 268,274 ****
    tree op_decl, cfun_sec, op_sec;
  
    /* If profiling is implemented via linker tricks, we can't jump
!      to the nogp alternate entry point.  Note that current_function_profile
       would not be correct, since that doesn't indicate if the target
       function uses profiling.  */
    /* ??? TARGET_PROFILING_NEEDS_GP isn't really the right test,
--- 268,274 ----
    tree op_decl, cfun_sec, op_sec;
  
    /* If profiling is implemented via linker tricks, we can't jump
!      to the nogp alternate entry point.  Note that crtl->profile
       would not be correct, since that doesn't indicate if the target
       function uses profiling.  */
    /* ??? TARGET_PROFILING_NEEDS_GP isn't really the right test,
Index: config/alpha/alpha.c
===================================================================
*** config/alpha/alpha.c	(revision 134640)
--- config/alpha/alpha.c	(working copy)
*************** alpha_sa_mask (unsigned long *imaskP, un
*** 7072,7078 ****
    /* When outputting a thunk, we don't have valid register life info,
       but assemble_start_function wants to output .frame and .mask
       directives.  */
!   if (current_function_is_thunk)
      {
        *imaskP = 0;
        *fmaskP = 0;
--- 7072,7078 ----
    /* When outputting a thunk, we don't have valid register life info,
       but assemble_start_function wants to output .frame and .mask
       directives.  */
!   if (crtl->is_thunk)
      {
        *imaskP = 0;
        *fmaskP = 0;
*************** alpha_sa_mask (unsigned long *imaskP, un
*** 7095,7101 ****
        }
  
    /* We need to restore these for the handler.  */
!   if (current_function_calls_eh_return)
      {
        for (i = 0; ; ++i)
  	{
--- 7095,7101 ----
        }
  
    /* We need to restore these for the handler.  */
!   if (crtl->calls_eh_return)
      {
        for (i = 0; ; ++i)
  	{
*************** alpha_sa_size (void)
*** 7149,7155 ****
        alpha_procedure_type
  	= (sa_size || get_frame_size() != 0
  	   || crtl->outgoing_args_size
! 	   || current_function_stdarg || current_function_calls_alloca
  	   || frame_pointer_needed)
  	  ? PT_STACK : PT_REGISTER;
  
--- 7149,7155 ----
        alpha_procedure_type
  	= (sa_size || get_frame_size() != 0
  	   || crtl->outgoing_args_size
! 	   || cfun->stdarg || cfun->calls_alloca
  	   || frame_pointer_needed)
  	  ? PT_STACK : PT_REGISTER;
  
*************** alpha_sa_size (void)
*** 7182,7188 ****
  
        vms_base_regno
  	= (frame_pointer_needed
! 	   || current_function_has_nonlocal_label
  	   || alpha_procedure_type == PT_STACK
  	   || crtl->outgoing_args_size)
  	  ? REG_PV : HARD_FRAME_POINTER_REGNUM;
--- 7182,7188 ----
  
        vms_base_regno
  	= (frame_pointer_needed
! 	   || cfun->has_nonlocal_label
  	   || alpha_procedure_type == PT_STACK
  	   || crtl->outgoing_args_size)
  	  ? REG_PV : HARD_FRAME_POINTER_REGNUM;
*************** alpha_does_function_need_gp (void)
*** 7298,7315 ****
      return 0;
  
    /* We need the gp to load the address of __mcount.  */
!   if (TARGET_PROFILING_NEEDS_GP && current_function_profile)
      return 1;
  
    /* The code emitted by alpha_output_mi_thunk_osf uses the gp.  */
!   if (current_function_is_thunk)
      return 1;
  
    /* The nonlocal receiver pattern assumes that the gp is valid for
       the nested function.  Reasonable because it's almost always set
       correctly already.  For the cases where that's wrong, make sure
       the nested function loads its gp on entry.  */
!   if (current_function_has_nonlocal_goto)
      return 1;
  
    /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first.
--- 7298,7315 ----
      return 0;
  
    /* We need the gp to load the address of __mcount.  */
!   if (TARGET_PROFILING_NEEDS_GP && crtl->profile)
      return 1;
  
    /* The code emitted by alpha_output_mi_thunk_osf uses the gp.  */
!   if (crtl->is_thunk)
      return 1;
  
    /* The nonlocal receiver pattern assumes that the gp is valid for
       the nested function.  Reasonable because it's almost always set
       correctly already.  For the cases where that's wrong, make sure
       the nested function loads its gp on entry.  */
!   if (crtl->has_nonlocal_goto)
      return 1;
  
    /* If we need a GP (we have a LDSYM insn or a CALL_INSN), load it first.
*************** alpha_expand_prologue (void)
*** 7479,7485 ****
       the call to mcount ourselves, rather than having the linker do it
       magically in response to -pg.  Since _mcount has special linkage,
       don't represent the call as a call.  */
!   if (TARGET_PROFILING_NEEDS_GP && current_function_profile)
      emit_insn (gen_prologue_mcount ());
  
    if (TARGET_ABI_UNICOSMK)
--- 7479,7485 ----
       the call to mcount ourselves, rather than having the linker do it
       magically in response to -pg.  Since _mcount has special linkage,
       don't represent the call as a call.  */
!   if (TARGET_PROFILING_NEEDS_GP && crtl->profile)
      emit_insn (gen_prologue_mcount ());
  
    if (TARGET_ABI_UNICOSMK)
*************** alpha_start_function (FILE *file, const 
*** 7825,7831 ****
  	 Otherwise, do it here.  */
        if (TARGET_ABI_OSF
            && ! alpha_function_needs_gp
! 	  && ! current_function_is_thunk)
  	{
  	  putc ('$', file);
  	  assemble_name (file, fnname);
--- 7825,7831 ----
  	 Otherwise, do it here.  */
        if (TARGET_ABI_OSF
            && ! alpha_function_needs_gp
! 	  && ! crtl->is_thunk)
  	{
  	  putc ('$', file);
  	  assemble_name (file, fnname);
*************** alpha_output_function_end_prologue (FILE
*** 7936,7942 ****
      fputs ("\t.prologue 0\n", file);
    else if (!flag_inhibit_size_directive)
      fprintf (file, "\t.prologue %d\n",
! 	     alpha_function_needs_gp || current_function_is_thunk);
  }
  
  /* Write function epilogue.  */
--- 7936,7942 ----
      fputs ("\t.prologue 0\n", file);
    else if (!flag_inhibit_size_directive)
      fprintf (file, "\t.prologue %d\n",
! 	     alpha_function_needs_gp || crtl->is_thunk);
  }
  
  /* Write function epilogue.  */
*************** alpha_expand_epilogue (void)
*** 8002,8008 ****
    fp_offset = 0;
    sa_reg = stack_pointer_rtx;
  
!   if (current_function_calls_eh_return)
      eh_ofs = EH_RETURN_STACKADJ_RTX;
    else
      eh_ofs = NULL_RTX;
--- 8002,8008 ----
    fp_offset = 0;
    sa_reg = stack_pointer_rtx;
  
!   if (crtl->calls_eh_return)
      eh_ofs = EH_RETURN_STACKADJ_RTX;
    else
      eh_ofs = NULL_RTX;
*************** alpha_expand_epilogue (void)
*** 8113,8119 ****
  	 register so as not to interfere with a potential fp restore,
  	 which must be consecutive with an SP restore.  */
        if (frame_size < 32768
! 	  && ! (TARGET_ABI_UNICOSMK && current_function_calls_alloca))
  	sp_adj2 = GEN_INT (frame_size);
        else if (TARGET_ABI_UNICOSMK)
  	{
--- 8113,8119 ----
  	 register so as not to interfere with a potential fp restore,
  	 which must be consecutive with an SP restore.  */
        if (frame_size < 32768
! 	  && ! (TARGET_ABI_UNICOSMK && cfun->calls_alloca))
  	sp_adj2 = GEN_INT (frame_size);
        else if (TARGET_ABI_UNICOSMK)
  	{
Index: config/frv/frv.c
===================================================================
*** config/frv/frv.c	(revision 134640)
--- config/frv/frv.c	(working copy)
*************** frv_stack_info (void)
*** 1172,1178 ****
  	  for (regno = first; regno <= last; regno++)
  	    {
  	      if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
! 		  || (current_function_calls_eh_return
  		      && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM))
  		  || (!TARGET_FDPIC && flag_pic
  		      && cfun->uses_pic_offset_table && regno == PIC_REGNO))
--- 1172,1178 ----
  	  for (regno = first; regno <= last; regno++)
  	    {
  	      if ((df_regs_ever_live_p (regno) && !call_used_regs[regno])
! 		  || (crtl->calls_eh_return
  		      && (regno >= FIRST_EH_REGNUM && regno <= LAST_EH_REGNUM))
  		  || (!TARGET_FDPIC && flag_pic
  		      && cfun->uses_pic_offset_table && regno == PIC_REGNO))
*************** frv_expand_epilogue (bool emit_return)
*** 1957,1963 ****
      }
  
    /* If this function uses eh_return, add the final stack adjustment now.  */
!   if (current_function_calls_eh_return)
      emit_insn (gen_stack_adjust (sp, sp, EH_RETURN_STACKADJ_RTX));
  
    if (emit_return)
--- 1957,1963 ----
      }
  
    /* If this function uses eh_return, add the final stack adjustment now.  */
!   if (crtl->calls_eh_return)
      emit_insn (gen_stack_adjust (sp, sp, EH_RETURN_STACKADJ_RTX));
  
    if (emit_return)
Index: config/s390/s390.c
===================================================================
*** config/s390/s390.c	(revision 134640)
--- config/s390/s390.c	(working copy)
*************** s390_regs_ever_clobbered (int *regs_ever
*** 6438,6446 ****
       may use the eh registers, but the code which sets these registers is not
       contained in that function.  Hence s390_regs_ever_clobbered is not able to
       deal with this automatically.  */
!   if (current_function_calls_eh_return || cfun->machine->has_landing_pad_p)
      for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM ; i++)
!       if (current_function_calls_eh_return 
  	  || (cfun->machine->has_landing_pad_p 
  	      && df_regs_ever_live_p (EH_RETURN_DATA_REGNO (i))))
  	regs_ever_clobbered[EH_RETURN_DATA_REGNO (i)] = 1;
--- 6438,6446 ----
       may use the eh registers, but the code which sets these registers is not
       contained in that function.  Hence s390_regs_ever_clobbered is not able to
       deal with this automatically.  */
!   if (crtl->calls_eh_return || cfun->machine->has_landing_pad_p)
      for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM ; i++)
!       if (crtl->calls_eh_return 
  	  || (cfun->machine->has_landing_pad_p 
  	      && df_regs_ever_live_p (EH_RETURN_DATA_REGNO (i))))
  	regs_ever_clobbered[EH_RETURN_DATA_REGNO (i)] = 1;
*************** s390_regs_ever_clobbered (int *regs_ever
*** 6449,6455 ****
       This flag is also set for the unwinding code in libgcc.
       See expand_builtin_unwind_init.  For regs_ever_live this is done by
       reload.  */
!   if (current_function_has_nonlocal_label)
      for (i = 0; i < 16; i++)
        if (!call_really_used_regs[i])
  	regs_ever_clobbered[i] = 1;
--- 6449,6455 ----
       This flag is also set for the unwinding code in libgcc.
       See expand_builtin_unwind_init.  For regs_ever_live this is done by
       reload.  */
!   if (cfun->has_nonlocal_label)
      for (i = 0; i < 16; i++)
        if (!call_really_used_regs[i])
  	regs_ever_clobbered[i] = 1;
*************** s390_register_info (int clobbered_regs[]
*** 6554,6569 ****
  	|| TARGET_TPF_PROFILING
  	|| cfun->machine->split_branches_pending_p
  	|| cfun_frame_layout.save_return_addr_p
! 	|| current_function_calls_eh_return
! 	|| current_function_stdarg);
  
    clobbered_regs[STACK_POINTER_REGNUM]
      |= (!current_function_is_leaf
  	|| TARGET_TPF_PROFILING
  	|| cfun_save_high_fprs_p
  	|| get_frame_size () > 0
! 	|| current_function_calls_alloca
! 	|| current_function_stdarg);
  
    for (i = 6; i < 16; i++)
      if (df_regs_ever_live_p (i) || clobbered_regs[i])
--- 6554,6569 ----
  	|| TARGET_TPF_PROFILING
  	|| cfun->machine->split_branches_pending_p
  	|| cfun_frame_layout.save_return_addr_p
! 	|| crtl->calls_eh_return
! 	|| cfun->stdarg);
  
    clobbered_regs[STACK_POINTER_REGNUM]
      |= (!current_function_is_leaf
  	|| TARGET_TPF_PROFILING
  	|| cfun_save_high_fprs_p
  	|| get_frame_size () > 0
! 	|| cfun->calls_alloca
! 	|| cfun->stdarg);
  
    for (i = 6; i < 16; i++)
      if (df_regs_ever_live_p (i) || clobbered_regs[i])
*************** s390_register_info (int clobbered_regs[]
*** 6616,6622 ****
  	}
      }
  
!   if (current_function_stdarg)
      {
        /* Varargs functions need to save gprs 2 to 6.  */
        if (cfun->va_list_gpr_size
--- 6616,6622 ----
  	}
      }
  
!   if (cfun->stdarg)
      {
        /* Varargs functions need to save gprs 2 to 6.  */
        if (cfun->va_list_gpr_size
*************** s390_frame_info (void)
*** 6738,6745 ****
        && !TARGET_TPF_PROFILING
        && cfun_frame_layout.frame_size == 0
        && !cfun_save_high_fprs_p
!       && !current_function_calls_alloca
!       && !current_function_stdarg)
      return;
  
    if (!TARGET_PACKED_STACK)
--- 6738,6745 ----
        && !TARGET_TPF_PROFILING
        && cfun_frame_layout.frame_size == 0
        && !cfun_save_high_fprs_p
!       && !cfun->calls_alloca
!       && !cfun->stdarg)
      return;
  
    if (!TARGET_PACKED_STACK)
*************** s390_init_frame_layout (void)
*** 6800,6806 ****
  
        /* Try to predict whether we'll need the base register.  */
        base_used = cfun->machine->split_branches_pending_p
! 		  || current_function_uses_const_pool
  		  || (!DISP_IN_RANGE (frame_size)
  		      && !CONST_OK_FOR_K (frame_size));
  
--- 6800,6806 ----
  
        /* Try to predict whether we'll need the base register.  */
        base_used = cfun->machine->split_branches_pending_p
! 		  || crtl->uses_const_pool
  		  || (!DISP_IN_RANGE (frame_size)
  		      && !CONST_OK_FOR_K (frame_size));
  
*************** s390_can_eliminate (int from, int to)
*** 6961,6968 ****
  
    /* Make sure we actually saved the return address.  */
    if (from == RETURN_ADDRESS_POINTER_REGNUM)
!     if (!current_function_calls_eh_return
! 	&& !current_function_stdarg
  	&& !cfun_frame_layout.save_return_addr_p)
        return false;
  
--- 6961,6968 ----
  
    /* Make sure we actually saved the return address.  */
    if (from == RETURN_ADDRESS_POINTER_REGNUM)
!     if (!crtl->calls_eh_return
! 	&& !cfun->stdarg
  	&& !cfun_frame_layout.save_return_addr_p)
        return false;
  
*************** save_gprs (rtx base, int offset, int fir
*** 7075,7081 ****
  			     gen_rtx_REG (Pmode, first),
  			     GEN_INT (last - first + 1));
  
!   if (first <= 6 && current_function_stdarg)
      for (i = 0; i < XVECLEN (PATTERN (insn), 0); i++)
        {
  	rtx mem = XEXP (XVECEXP (PATTERN (insn), 0, i), 0);
--- 7075,7081 ----
  			     gen_rtx_REG (Pmode, first),
  			     GEN_INT (last - first + 1));
  
!   if (first <= 6 && cfun->stdarg)
      for (i = 0; i < XVECLEN (PATTERN (insn), 0); i++)
        {
  	rtx mem = XEXP (XVECEXP (PATTERN (insn), 0, i), 0);
Index: config/spu/spu.c
===================================================================
*** config/spu/spu.c	(revision 134640)
--- config/spu/spu.c	(working copy)
*************** spu_split_immediate (rtx * ops)
*** 1592,1598 ****
  	    {
  	      rtx pic_reg = get_pic_reg ();
  	      emit_insn (gen_addsi3 (ops[0], ops[0], pic_reg));
! 	      current_function_uses_pic_offset_table = 1;
  	    }
  	  return flag_pic || c == IC_IL2s;
  	}
--- 1592,1598 ----
  	    {
  	      rtx pic_reg = get_pic_reg ();
  	      emit_insn (gen_addsi3 (ops[0], ops[0], pic_reg));
! 	      crtl->uses_pic_offset_table = 1;
  	    }
  	  return flag_pic || c == IC_IL2s;
  	}
*************** need_to_save_reg (int regno, int saving)
*** 1618,1624 ****
      return 1;
    if (flag_pic
        && regno == PIC_OFFSET_TABLE_REGNUM
!       && (!saving || current_function_uses_pic_offset_table)
        && (!saving
  	  || !current_function_is_leaf || df_regs_ever_live_p (LAST_ARG_REGNUM)))
      return 1;
--- 1618,1624 ----
      return 1;
    if (flag_pic
        && regno == PIC_OFFSET_TABLE_REGNUM
!       && (!saving || crtl->uses_pic_offset_table)
        && (!saving
  	  || !current_function_is_leaf || df_regs_ever_live_p (LAST_ARG_REGNUM)))
      return 1;
*************** spu_expand_prologue (void)
*** 1739,1745 ****
    emit_note (NOTE_INSN_DELETED);
  
    if (flag_pic && optimize == 0)
!     current_function_uses_pic_offset_table = 1;
  
    if (spu_naked_function_p (current_function_decl))
      return;
--- 1739,1745 ----
    emit_note (NOTE_INSN_DELETED);
  
    if (flag_pic && optimize == 0)
!     crtl->uses_pic_offset_table = 1;
  
    if (spu_naked_function_p (current_function_decl))
      return;
*************** spu_expand_prologue (void)
*** 1753,1759 ****
      + crtl->args.pretend_args_size;
  
    if (!current_function_is_leaf
!       || current_function_calls_alloca || total_size > 0)
      total_size += STACK_POINTER_OFFSET;
  
    /* Save this first because code after this might use the link
--- 1753,1759 ----
      + crtl->args.pretend_args_size;
  
    if (!current_function_is_leaf
!       || cfun->calls_alloca || total_size > 0)
      total_size += STACK_POINTER_OFFSET;
  
    /* Save this first because code after this might use the link
*************** spu_expand_prologue (void)
*** 1776,1782 ****
  	  }
      }
  
!   if (flag_pic && current_function_uses_pic_offset_table)
      {
        rtx pic_reg = get_pic_reg ();
        insn = emit_insn (gen_load_pic_offset (pic_reg, scratch_reg_0));
--- 1776,1782 ----
  	  }
      }
  
!   if (flag_pic && crtl->uses_pic_offset_table)
      {
        rtx pic_reg = get_pic_reg ();
        insn = emit_insn (gen_load_pic_offset (pic_reg, scratch_reg_0));
*************** spu_expand_epilogue (bool sibcall_p)
*** 1878,1889 ****
      + crtl->args.pretend_args_size;
  
    if (!current_function_is_leaf
!       || current_function_calls_alloca || total_size > 0)
      total_size += STACK_POINTER_OFFSET;
  
    if (total_size > 0)
      {
!       if (current_function_calls_alloca)
  	frame_emit_load (STACK_POINTER_REGNUM, sp_reg, 0);
        else
  	frame_emit_add_imm (sp_reg, sp_reg, total_size, scratch_reg_0);
--- 1878,1889 ----
      + crtl->args.pretend_args_size;
  
    if (!current_function_is_leaf
!       || cfun->calls_alloca || total_size > 0)
      total_size += STACK_POINTER_OFFSET;
  
    if (total_size > 0)
      {
!       if (cfun->calls_alloca)
  	frame_emit_load (STACK_POINTER_REGNUM, sp_reg, 0);
        else
  	frame_emit_add_imm (sp_reg, sp_reg, total_size, scratch_reg_0);
Index: config/sparc/sparc.md
===================================================================
*** config/sparc/sparc.md	(revision 134640)
--- config/sparc/sparc.md	(working copy)
***************
*** 137,146 ****
    (symbol_ref "flag_pic != 0"))
  
  (define_attr "calls_alloca" "false,true"
!   (symbol_ref "current_function_calls_alloca != 0"))
  
  (define_attr "calls_eh_return" "false,true"
!    (symbol_ref "current_function_calls_eh_return !=0 "))
     
  (define_attr "leaf_function" "false,true"
    (symbol_ref "current_function_uses_only_leaf_regs != 0"))
--- 137,146 ----
    (symbol_ref "flag_pic != 0"))
  
  (define_attr "calls_alloca" "false,true"
!   (symbol_ref "cfun->calls_alloca != 0"))
  
  (define_attr "calls_eh_return" "false,true"
!    (symbol_ref "crtl->calls_eh_return !=0 "))
     
  (define_attr "leaf_function" "false,true"
    (symbol_ref "current_function_uses_only_leaf_regs != 0"))
***************
*** 1844,1850 ****
  	(minus:SI (match_dup 5) (match_dup 4)))]
    "flag_pic"
  {
!   current_function_uses_pic_offset_table = 1;
    operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
    if (!can_create_pseudo_p ())
      {
--- 1844,1850 ----
  	(minus:SI (match_dup 5) (match_dup 4)))]
    "flag_pic"
  {
!   crtl->uses_pic_offset_table = 1;
    operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
    if (!can_create_pseudo_p ())
      {
***************
*** 1993,1999 ****
          (minus:DI (match_dup 5) (match_dup 4)))]
    "TARGET_ARCH64 && flag_pic"
  {
!   current_function_uses_pic_offset_table = 1;
    operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
    if (!can_create_pseudo_p ())
      {
--- 1993,1999 ----
          (minus:DI (match_dup 5) (match_dup 4)))]
    "TARGET_ARCH64 && flag_pic"
  {
!   crtl->uses_pic_offset_table = 1;
    operands[2] = gen_rtx_SYMBOL_REF (Pmode, "_GLOBAL_OFFSET_TABLE_");
    if (!can_create_pseudo_p ())
      {
***************
*** 7237,7243 ****
    [(unspec_volatile [(const_int 0)] UNSPECV_SETJMP)]
    ""
  {
!   if (! current_function_calls_alloca)
      return "";
    if (! TARGET_V9)
      return "\tta\t3\n";
--- 7237,7243 ----
    [(unspec_volatile [(const_int 0)] UNSPECV_SETJMP)]
    ""
  {
!   if (! cfun->calls_alloca)
      return "";
    if (! TARGET_V9)
      return "\tta\t3\n";
Index: config/sparc/sparc.c
===================================================================
*** config/sparc/sparc.c	(revision 134640)
--- config/sparc/sparc.c	(working copy)
*************** eligible_for_return_delay (rtx trial)
*** 2639,2645 ****
  
    /* If the function uses __builtin_eh_return, the eh_return machinery
       occupies the delay slot.  */
!   if (current_function_calls_eh_return)
      return 0;
  
    /* In the case of a true leaf function, anything can go into the slot.  */
--- 2639,2645 ----
  
    /* If the function uses __builtin_eh_return, the eh_return machinery
       occupies the delay slot.  */
!   if (crtl->calls_eh_return)
      return 0;
  
    /* In the case of a true leaf function, anything can go into the slot.  */
*************** sparc_tls_got (void)
*** 3084,3090 ****
    rtx temp;
    if (flag_pic)
      {
!       current_function_uses_pic_offset_table = 1;
        return pic_offset_table_rtx;
      }
  
--- 3084,3090 ----
    rtx temp;
    if (flag_pic)
      {
!       crtl->uses_pic_offset_table = 1;
        return pic_offset_table_rtx;
      }
  
*************** legitimize_pic_address (rtx orig, enum m
*** 3300,3306 ****
        pic_ref = gen_const_mem (Pmode,
  			       gen_rtx_PLUS (Pmode,
  					     pic_offset_table_rtx, address));
!       current_function_uses_pic_offset_table = 1;
        insn = emit_move_insn (reg, pic_ref);
        /* Put a REG_EQUAL note on this insn, so that it can be optimized
  	 by loop.  */
--- 3300,3306 ----
        pic_ref = gen_const_mem (Pmode,
  			       gen_rtx_PLUS (Pmode,
  					     pic_offset_table_rtx, address));
!       crtl->uses_pic_offset_table = 1;
        insn = emit_move_insn (reg, pic_ref);
        /* Put a REG_EQUAL note on this insn, so that it can be optimized
  	 by loop.  */
*************** legitimize_pic_address (rtx orig, enum m
*** 3342,3348 ****
      /* ??? Why do we do this?  */
      /* Now movsi_pic_label_ref uses it, but we ought to be checking that
         the register is live instead, in case it is eliminated.  */
!     current_function_uses_pic_offset_table = 1;
  
    return orig;
  }
--- 3342,3348 ----
      /* ??? Why do we do this?  */
      /* Now movsi_pic_label_ref uses it, but we ought to be checking that
         the register is live instead, in case it is eliminated.  */
!     crtl->uses_pic_offset_table = 1;
  
    return orig;
  }
*************** sparc_emit_call_insn (rtx pat, rtx addr)
*** 3479,3485 ****
  	  : !SYMBOL_REF_LOCAL_P (addr)))
      {
        use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx);
!       current_function_uses_pic_offset_table = 1;
      }
  }
  
--- 3479,3485 ----
  	  : !SYMBOL_REF_LOCAL_P (addr)))
      {
        use_reg (&CALL_INSN_FUNCTION_USAGE (insn), pic_offset_table_rtx);
!       crtl->uses_pic_offset_table = 1;
      }
  }
  
*************** sparc_expand_prologue (void)
*** 4099,4105 ****
      emit_save_or_restore_regs (SORR_SAVE);
  
    /* Load the PIC register if needed.  */
!   if (flag_pic && current_function_uses_pic_offset_table)
      load_pic_register (false);
  }
   
--- 4099,4105 ----
      emit_save_or_restore_regs (SORR_SAVE);
  
    /* Load the PIC register if needed.  */
!   if (flag_pic && crtl->uses_pic_offset_table)
      load_pic_register (false);
  }
   
*************** output_return (rtx insn)
*** 4235,4241 ****
  	 semantics of restore/return.  We simply output the jump to the
  	 return address and the insn in the delay slot (if any).  */
  
!       gcc_assert (! current_function_calls_eh_return);
  
        return "jmp\t%%o7+%)%#";
      }
--- 4235,4241 ----
  	 semantics of restore/return.  We simply output the jump to the
  	 return address and the insn in the delay slot (if any).  */
  
!       gcc_assert (! crtl->calls_eh_return);
  
        return "jmp\t%%o7+%)%#";
      }
*************** output_return (rtx insn)
*** 4246,4252 ****
  	 combined with the 'restore' instruction or put in the delay slot of
  	 the 'return' instruction.  */
  
!       if (current_function_calls_eh_return)
  	{
  	  /* If the function uses __builtin_eh_return, the eh_return
  	     machinery occupies the delay slot.  */
--- 4246,4252 ----
  	 combined with the 'restore' instruction or put in the delay slot of
  	 the 'return' instruction.  */
  
!       if (crtl->calls_eh_return)
  	{
  	  /* If the function uses __builtin_eh_return, the eh_return
  	     machinery occupies the delay slot.  */
*************** print_operand (FILE *file, rtx x, int co
*** 6780,6786 ****
  	 The call emitted is the same when sparc_std_struct_return is 
  	 present. */
       if (! TARGET_ARCH64
! 	 && current_function_returns_struct
  	 && ! sparc_std_struct_return
  	 && (TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))
  	     == INTEGER_CST)
--- 6780,6786 ----
  	 The call emitted is the same when sparc_std_struct_return is 
  	 present. */
       if (! TARGET_ARCH64
! 	 && cfun->returns_struct
  	 && ! sparc_std_struct_return
  	 && (TREE_CODE (DECL_SIZE (DECL_RESULT (current_function_decl)))
  	     == INTEGER_CST)
*************** sparc_function_ok_for_sibcall (tree decl
*** 7863,7869 ****
  {
    return (decl
  	  && flag_delayed_branch
! 	  && (TARGET_ARCH64 || ! current_function_returns_struct)
  	  && !(TARGET_VXWORKS_RTP
  	       && flag_pic
  	       && !targetm.binds_local_p (decl)));
--- 7863,7869 ----
  {
    return (decl
  	  && flag_delayed_branch
! 	  && (TARGET_ARCH64 || ! cfun->returns_struct)
  	  && !(TARGET_VXWORKS_RTP
  	       && flag_pic
  	       && !targetm.binds_local_p (decl)));
Index: config/sparc/sparc.h
===================================================================
*** config/sparc/sparc.h	(revision 134640)
--- config/sparc/sparc.h	(working copy)
*************** do {									\
*** 1678,1688 ****
  
  #define EXIT_IGNORE_STACK	\
   (get_frame_size () != 0	\
!   || current_function_calls_alloca || crtl->outgoing_args_size)
  
  /* Define registers used by the epilogue and return instruction.  */
  #define EPILOGUE_USES(REGNO) ((REGNO) == 31 \
!   || (current_function_calls_eh_return && (REGNO) == 1))
  
  /* Length in units of the trampoline for entering a nested function.  */
  
--- 1678,1688 ----
  
  #define EXIT_IGNORE_STACK	\
   (get_frame_size () != 0	\
!   || cfun->calls_alloca || crtl->outgoing_args_size)
  
  /* Define registers used by the epilogue and return instruction.  */
  #define EPILOGUE_USES(REGNO) ((REGNO) == 31 \
!   || (crtl->calls_eh_return && (REGNO) == 1))
  
  /* Length in units of the trampoline for entering a nested function.  */
  
*************** do {									\
*** 1724,1730 ****
  /* This is the offset of the return address to the true next instruction to be
     executed for the current function.  */
  #define RETURN_ADDR_OFFSET \
!   (8 + 4 * (! TARGET_ARCH64 && current_function_returns_struct))
  
  /* The current return address is in %i7.  The return address of anything
     farther back is in the register window save area at [%fp+60].  */
--- 1724,1730 ----
  /* This is the offset of the return address to the true next instruction to be
     executed for the current function.  */
  #define RETURN_ADDR_OFFSET \
!   (8 + 4 * (! TARGET_ARCH64 && cfun->returns_struct))
  
  /* The current return address is in %i7.  The return address of anything
     farther back is in the register window save area at [%fp+60].  */
Index: config/m32r/m32r.md
===================================================================
*** config/m32r/m32r.md	(revision 134640)
--- config/m32r/m32r.md	(working copy)
***************
*** 2354,2360 ****
    "
  {
    if (flag_pic)
!     current_function_uses_pic_offset_table = 1;
  }")
  
  (define_insn "*call_via_reg"
--- 2354,2360 ----
    "
  {
    if (flag_pic)
!     crtl->uses_pic_offset_table = 1;
  }")
  
  (define_insn "*call_via_reg"
***************
*** 2409,2415 ****
    "
  {
    if (flag_pic)
!     current_function_uses_pic_offset_table = 1;
  }")
  
  (define_insn "*call_value_via_reg"
--- 2409,2415 ----
    "
  {
    if (flag_pic)
!     crtl->uses_pic_offset_table = 1;
  }")
  
  (define_insn "*call_value_via_reg"
***************
*** 2433,2439 ****
    int call26_p = call26_operand (operands[1], FUNCTION_MODE);
  
    if (flag_pic)
!     current_function_uses_pic_offset_table = 1;
  
    if (! call26_p)
      {
--- 2433,2439 ----
    int call26_p = call26_operand (operands[1], FUNCTION_MODE);
  
    if (flag_pic)
!     crtl->uses_pic_offset_table = 1;
  
    if (! call26_p)
      {
Index: config/m32r/m32r.c
===================================================================
*** config/m32r/m32r.c	(revision 134640)
--- config/m32r/m32r.c	(working copy)
*************** static struct m32r_frame_info zero_frame
*** 1253,1259 ****
     && (df_regs_ever_live_p (regno) && (!call_really_used_regs[regno] || interrupt_p)))
  
  #define MUST_SAVE_FRAME_POINTER (df_regs_ever_live_p (FRAME_POINTER_REGNUM))
! #define MUST_SAVE_RETURN_ADDR   (df_regs_ever_live_p (RETURN_ADDR_REGNUM) || current_function_profile)
  
  #define SHORT_INSN_SIZE 2	/* Size of small instructions.  */
  #define LONG_INSN_SIZE 4	/* Size of long instructions.  */
--- 1253,1259 ----
     && (df_regs_ever_live_p (regno) && (!call_really_used_regs[regno] || interrupt_p)))
  
  #define MUST_SAVE_FRAME_POINTER (df_regs_ever_live_p (FRAME_POINTER_REGNUM))
! #define MUST_SAVE_RETURN_ADDR   (df_regs_ever_live_p (RETURN_ADDR_REGNUM) || crtl->profile)
  
  #define SHORT_INSN_SIZE 2	/* Size of small instructions.  */
  #define LONG_INSN_SIZE 4	/* Size of long instructions.  */
*************** m32r_compute_frame_size (int size)	/* # 
*** 1272,1279 ****
    unsigned int gmask;
    enum m32r_function_type fn_type;
    int interrupt_p;
!   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
!                                   | current_function_profile);
  
    var_size	= M32R_STACK_ALIGN (size);
    args_size	= M32R_STACK_ALIGN (crtl->outgoing_args_size);
--- 1272,1279 ----
    unsigned int gmask;
    enum m32r_function_type fn_type;
    int interrupt_p;
!   int pic_reg_used = flag_pic && (crtl->uses_pic_offset_table
!                                   | crtl->profile);
  
    var_size	= M32R_STACK_ALIGN (size);
    args_size	= M32R_STACK_ALIGN (crtl->outgoing_args_size);
*************** m32r_expand_prologue (void)
*** 1372,1379 ****
    int regno;
    int frame_size;
    unsigned int gmask;
!   int pic_reg_used = flag_pic && (current_function_uses_pic_offset_table
!                                   | current_function_profile);
  
    if (! current_frame_info.initialized)
      m32r_compute_frame_size (get_frame_size ());
--- 1372,1379 ----
    int regno;
    int frame_size;
    unsigned int gmask;
!   int pic_reg_used = flag_pic && (crtl->uses_pic_offset_table
!                                   | crtl->profile);
  
    if (! current_frame_info.initialized)
      m32r_compute_frame_size (get_frame_size ());
*************** m32r_expand_prologue (void)
*** 1434,1440 ****
    if (frame_pointer_needed)
      emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx));
  
!   if (current_function_profile)
      /* Push lr for mcount (form_pc, x).  */
      emit_insn (gen_movsi_push (stack_pointer_rtx,
                                 gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM)));
--- 1434,1440 ----
    if (frame_pointer_needed)
      emit_insn (gen_movsi (frame_pointer_rtx, stack_pointer_rtx));
  
!   if (crtl->profile)
      /* Push lr for mcount (form_pc, x).  */
      emit_insn (gen_movsi_push (stack_pointer_rtx,
                                 gen_rtx_REG (Pmode, RETURN_ADDR_REGNUM)));
*************** m32r_expand_prologue (void)
*** 1443,1452 ****
      {
        m32r_load_pic_register ();
        m32r_reload_lr (stack_pointer_rtx,
!                       (current_function_profile ? 0 : frame_size));
      }
  
!   if (current_function_profile && !pic_reg_used)
      emit_insn (gen_blockage ());
  }
  
--- 1443,1452 ----
      {
        m32r_load_pic_register ();
        m32r_reload_lr (stack_pointer_rtx,
!                       (crtl->profile ? 0 : frame_size));
      }
  
!   if (crtl->profile && !pic_reg_used)
      emit_insn (gen_blockage ());
  }
  
*************** m32r_expand_epilogue (void)
*** 1519,1525 ****
        unsigned int var_size = current_frame_info.var_size;
        unsigned int args_size = current_frame_info.args_size;
        unsigned int gmask = current_frame_info.gmask;
!       int can_trust_sp_p = !current_function_calls_alloca;
  
        if (flag_exceptions)
          emit_insn (gen_blockage ());
--- 1519,1525 ----
        unsigned int var_size = current_frame_info.var_size;
        unsigned int args_size = current_frame_info.args_size;
        unsigned int gmask = current_frame_info.gmask;
!       int can_trust_sp_p = !cfun->calls_alloca;
  
        if (flag_exceptions)
          emit_insn (gen_blockage ());
*************** m32r_legitimize_pic_address (rtx orig, r
*** 1664,1670 ****
        else
          address = reg;
  
!       current_function_uses_pic_offset_table = 1;
  
        if (GET_CODE (orig) == LABEL_REF
            || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
--- 1664,1670 ----
        else
          address = reg;
  
!       crtl->uses_pic_offset_table = 1;
  
        if (GET_CODE (orig) == LABEL_REF
            || (GET_CODE (orig) == SYMBOL_REF && SYMBOL_REF_LOCAL_P (orig)))
Index: config/m32r/m32r.h
===================================================================
*** config/m32r/m32r.h	(revision 134640)
--- config/m32r/m32r.h	(working copy)
*************** extern enum reg_class m32r_regno_reg_cla
*** 768,774 ****
  /* A C expression which is nonzero if a function must have and use a
     frame pointer.  This expression is evaluated in the reload pass.
     If its value is nonzero the function will have a frame pointer.  */
! #define FRAME_POINTER_REQUIRED current_function_calls_alloca
  
  #if 0
  /* C statement to store the difference between the frame pointer
--- 768,774 ----
  /* A C expression which is nonzero if a function must have and use a
     frame pointer.  This expression is evaluated in the reload pass.
     If its value is nonzero the function will have a frame pointer.  */
! #define FRAME_POINTER_REQUIRED cfun->calls_alloca
  
  #if 0
  /* C statement to store the difference between the frame pointer
Index: config/i386/linux.h
===================================================================
*** config/i386/linux.h	(revision 134640)
--- config/i386/linux.h	(working copy)
*************** along with GCC; see the file COPYING3.  
*** 55,61 ****
     frame, so we cannot allow profiling without a frame pointer.  */
  
  #undef SUBTARGET_FRAME_POINTER_REQUIRED
! #define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
--- 55,61 ----
     frame, so we cannot allow profiling without a frame pointer.  */
  
  #undef SUBTARGET_FRAME_POINTER_REQUIRED
! #define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
  
  #undef SIZE_TYPE
  #define SIZE_TYPE "unsigned int"
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 134640)
--- config/i386/i386.c	(working copy)
*************** ix86_frame_pointer_required (void)
*** 5783,5789 ****
  	  || ix86_current_function_calls_tls_descriptor))
      return 1;
  
!   if (current_function_profile)
      return 1;
  
    return 0;
--- 5783,5789 ----
  	  || ix86_current_function_calls_tls_descriptor))
      return 1;
  
!   if (crtl->profile)
      return 1;
  
    return 0;
*************** gen_push (rtx arg)
*** 5993,5999 ****
  static unsigned int
  ix86_select_alt_pic_regnum (void)
  {
!   if (current_function_is_leaf && !current_function_profile
        && !ix86_current_function_calls_tls_descriptor)
      {
        int i;
--- 5993,5999 ----
  static unsigned int
  ix86_select_alt_pic_regnum (void)
  {
!   if (current_function_is_leaf && !crtl->profile
        && !ix86_current_function_calls_tls_descriptor)
      {
        int i;
*************** ix86_save_reg (unsigned int regno, int m
*** 6012,6027 ****
    if (pic_offset_table_rtx
        && regno == REAL_PIC_OFFSET_TABLE_REGNUM
        && (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
! 	  || current_function_profile
! 	  || current_function_calls_eh_return
! 	  || current_function_uses_const_pool))
      {
        if (ix86_select_alt_pic_regnum () != INVALID_REGNUM)
  	return 0;
        return 1;
      }
  
!   if (current_function_calls_eh_return && maybe_eh_return)
      {
        unsigned i;
        for (i = 0; ; i++)
--- 6012,6027 ----
    if (pic_offset_table_rtx
        && regno == REAL_PIC_OFFSET_TABLE_REGNUM
        && (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
! 	  || crtl->profile
! 	  || crtl->calls_eh_return
! 	  || crtl->uses_const_pool))
      {
        if (ix86_select_alt_pic_regnum () != INVALID_REGNUM)
  	return 0;
        return 1;
      }
  
!   if (crtl->calls_eh_return && maybe_eh_return)
      {
        unsigned i;
        for (i = 0; ; i++)
*************** ix86_compute_frame_layout (struct ix86_f
*** 6185,6191 ****
       expander assumes that last crtl->outgoing_args_size
       of stack frame are unused.  */
    if (ACCUMULATE_OUTGOING_ARGS
!       && (!current_function_is_leaf || current_function_calls_alloca
  	  || ix86_current_function_calls_tls_descriptor))
      {
        offset += crtl->outgoing_args_size;
--- 6185,6191 ----
       expander assumes that last crtl->outgoing_args_size
       of stack frame are unused.  */
    if (ACCUMULATE_OUTGOING_ARGS
!       && (!current_function_is_leaf || cfun->calls_alloca
  	  || ix86_current_function_calls_tls_descriptor))
      {
        offset += crtl->outgoing_args_size;
*************** ix86_compute_frame_layout (struct ix86_f
*** 6196,6202 ****
  
    /* Align stack boundary.  Only needed if we're calling another function
       or using alloca.  */
!   if (!current_function_is_leaf || current_function_calls_alloca
        || ix86_current_function_calls_tls_descriptor)
      frame->padding2 = ((offset + preferred_alignment - 1)
  		       & -preferred_alignment) - offset;
--- 6196,6202 ----
  
    /* Align stack boundary.  Only needed if we're calling another function
       or using alloca.  */
!   if (!current_function_is_leaf || cfun->calls_alloca
        || ix86_current_function_calls_tls_descriptor)
      frame->padding2 = ((offset + preferred_alignment - 1)
  		       & -preferred_alignment) - offset;
*************** ix86_compute_frame_layout (struct ix86_f
*** 6246,6252 ****
  	   (long)frame->hard_frame_pointer_offset);
    fprintf (stderr, "stack_pointer_offset: %ld\n", (long)frame->stack_pointer_offset);
    fprintf (stderr, "current_function_is_leaf: %ld\n", (long)current_function_is_leaf);
!   fprintf (stderr, "current_function_calls_alloca: %ld\n", (long)current_function_calls_alloca);
    fprintf (stderr, "x86_current_function_calls_tls_descriptor: %ld\n", (long)ix86_current_function_calls_tls_descriptor);
  #endif
  }
--- 6246,6252 ----
  	   (long)frame->hard_frame_pointer_offset);
    fprintf (stderr, "stack_pointer_offset: %ld\n", (long)frame->stack_pointer_offset);
    fprintf (stderr, "current_function_is_leaf: %ld\n", (long)current_function_is_leaf);
!   fprintf (stderr, "cfun->calls_alloca: %ld\n", (long)cfun->calls_alloca);
    fprintf (stderr, "x86_current_function_calls_tls_descriptor: %ld\n", (long)ix86_current_function_calls_tls_descriptor);
  #endif
  }
*************** ix86_expand_prologue (void)
*** 6531,6537 ****
    pic_reg_used = false;
    if (pic_offset_table_rtx
        && (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
! 	  || current_function_profile))
      {
        unsigned int alt_pic_reg_used = ix86_select_alt_pic_regnum ();
  
--- 6531,6537 ----
    pic_reg_used = false;
    if (pic_offset_table_rtx
        && (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
! 	  || crtl->profile))
      {
        unsigned int alt_pic_reg_used = ix86_select_alt_pic_regnum ();
  
*************** ix86_expand_prologue (void)
*** 6566,6572 ****
  
    /* Prevent function calls from being scheduled before the call to mcount.
       In the pic_reg_used case, make sure that the got load isn't deleted.  */
!   if (current_function_profile)
      {
        if (pic_reg_used)
  	emit_insn (gen_prologue_use (pic_offset_table_rtx));
--- 6566,6572 ----
  
    /* Prevent function calls from being scheduled before the call to mcount.
       In the pic_reg_used case, make sure that the got load isn't deleted.  */
!   if (crtl->profile)
      {
        if (pic_reg_used)
  	emit_insn (gen_prologue_use (pic_offset_table_rtx));
*************** ix86_expand_epilogue (int style)
*** 6621,6627 ****
       eh_return: the eax and edx registers are marked as saved, but not
       restored along this path.  */
    offset = frame.nregs;
!   if (current_function_calls_eh_return && style != 2)
      offset -= 2;
    offset *= -UNITS_PER_WORD;
  
--- 6621,6627 ----
       eh_return: the eax and edx registers are marked as saved, but not
       restored along this path.  */
    offset = frame.nregs;
!   if (crtl->calls_eh_return && style != 2)
      offset -= 2;
    offset *= -UNITS_PER_WORD;
  
*************** ix86_expand_epilogue (int style)
*** 6643,6649 ****
        || (frame_pointer_needed && TARGET_USE_LEAVE
  	  && cfun->machine->use_fast_prologue_epilogue
  	  && frame.nregs == 1)
!       || current_function_calls_eh_return)
      {
        /* Restore registers.  We can use ebp or esp to address the memory
  	 locations.  If both are available, default to ebp, since offsets
--- 6643,6649 ----
        || (frame_pointer_needed && TARGET_USE_LEAVE
  	  && cfun->machine->use_fast_prologue_epilogue
  	  && frame.nregs == 1)
!       || crtl->calls_eh_return)
      {
        /* Restore registers.  We can use ebp or esp to address the memory
  	 locations.  If both are available, default to ebp, since offsets
Index: config/sh/sh.c
===================================================================
*** config/sh/sh.c	(revision 134640)
--- config/sh/sh.c	(working copy)
*************** output_stack_adjust (int size, rtx reg, 
*** 5646,5652 ****
  		    }
  		  for (i = 0; i < nreg; i++)
  		    CLEAR_HARD_REG_BIT (temps, FIRST_RET_REG + i);
! 		  if (current_function_calls_eh_return)
  		    {
  		      CLEAR_HARD_REG_BIT (temps, EH_RETURN_STACKADJ_REGNO);
  		      for (i = 0; i <= 3; i++)
--- 5646,5652 ----
  		    }
  		  for (i = 0; i < nreg; i++)
  		    CLEAR_HARD_REG_BIT (temps, FIRST_RET_REG + i);
! 		  if (crtl->calls_eh_return)
  		    {
  		      CLEAR_HARD_REG_BIT (temps, EH_RETURN_STACKADJ_REGNO);
  		      for (i = 0; i <= 3; i++)
*************** calc_live_regs (HARD_REG_SET *live_regs_
*** 5980,5986 ****
    if (TARGET_SHCOMPACT
        && ((crtl->args.info.call_cookie
  	   & ~ CALL_COOKIE_RET_TRAMP (1))
! 	  || current_function_saves_all_registers))
      pr_live = 1;
    has_call = TARGET_SHMEDIA ? ! leaf_function_p () : pr_live;
    for (count = 0, reg = FIRST_PSEUDO_REGISTER; reg-- != 0; )
--- 5980,5986 ----
    if (TARGET_SHCOMPACT
        && ((crtl->args.info.call_cookie
  	   & ~ CALL_COOKIE_RET_TRAMP (1))
! 	  || crtl->saves_all_registers))
      pr_live = 1;
    has_call = TARGET_SHMEDIA ? ! leaf_function_p () : pr_live;
    for (count = 0, reg = FIRST_PSEUDO_REGISTER; reg-- != 0; )
*************** calc_live_regs (HARD_REG_SET *live_regs_
*** 6010,6016 ****
  	     || (df_regs_ever_live_p (reg)
  		 && (!call_really_used_regs[reg]
  		     || (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY)))
! 	     || (current_function_calls_eh_return
  		 && (reg == EH_RETURN_DATA_REGNO (0)
  		     || reg == EH_RETURN_DATA_REGNO (1)
  		     || reg == EH_RETURN_DATA_REGNO (2)
--- 6010,6016 ----
  	     || (df_regs_ever_live_p (reg)
  		 && (!call_really_used_regs[reg]
  		     || (trapa_handler && reg == FPSCR_REG && TARGET_FPU_ANY)))
! 	     || (crtl->calls_eh_return
  		 && (reg == EH_RETURN_DATA_REGNO (0)
  		     || reg == EH_RETURN_DATA_REGNO (1)
  		     || reg == EH_RETURN_DATA_REGNO (2)
*************** sh5_schedule_saves (HARD_REG_SET *live_r
*** 6160,6166 ****
  	  && ! FUNCTION_ARG_REGNO_P (i)
  	  && i != FIRST_RET_REG
  	  && ! (cfun->static_chain_decl != NULL && i == STATIC_CHAIN_REGNUM)
! 	  && ! (current_function_calls_eh_return
  		&& (i == EH_RETURN_STACKADJ_REGNO
  		    || ((unsigned) i >= EH_RETURN_DATA_REGNO (0)
  			&& (unsigned) i <= EH_RETURN_DATA_REGNO (3)))))
--- 6160,6166 ----
  	  && ! FUNCTION_ARG_REGNO_P (i)
  	  && i != FIRST_RET_REG
  	  && ! (cfun->static_chain_decl != NULL && i == STATIC_CHAIN_REGNUM)
! 	  && ! (crtl->calls_eh_return
  		&& (i == EH_RETURN_STACKADJ_REGNO
  		    || ((unsigned) i >= EH_RETURN_DATA_REGNO (0)
  			&& (unsigned) i <= EH_RETURN_DATA_REGNO (3)))))
*************** sh_expand_prologue (void)
*** 6305,6311 ****
      }
  
    /* Emit the code for SETUP_VARARGS.  */
!   if (current_function_stdarg)
      {
        if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl))
  	{
--- 6305,6311 ----
      }
  
    /* Emit the code for SETUP_VARARGS.  */
!   if (cfun->stdarg)
      {
        if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl))
  	{
*************** sh_expand_epilogue (bool sibcall_p)
*** 6850,6856 ****
  		       + crtl->args.info.stack_regs * 8,
  		       stack_pointer_rtx, e, NULL);
  
!   if (current_function_calls_eh_return)
      emit_insn (GEN_ADD3 (stack_pointer_rtx, stack_pointer_rtx,
  			 EH_RETURN_STACKADJ_RTX));
  
--- 6850,6856 ----
  		       + crtl->args.info.stack_regs * 8,
  		       stack_pointer_rtx, e, NULL);
  
!   if (crtl->calls_eh_return)
      emit_insn (GEN_ADD3 (stack_pointer_rtx, stack_pointer_rtx,
  			 EH_RETURN_STACKADJ_RTX));
  
*************** sh_setup_incoming_varargs (CUMULATIVE_AR
*** 7864,7870 ****
  			   int *pretend_arg_size,
  			   int second_time ATTRIBUTE_UNUSED)
  {
!   gcc_assert (current_function_stdarg);
    if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl))
      {
        int named_parm_regs, anon_parm_regs;
--- 7864,7870 ----
  			   int *pretend_arg_size,
  			   int second_time ATTRIBUTE_UNUSED)
  {
!   gcc_assert (cfun->stdarg);
    if (TARGET_VARARGS_PRETEND_ARGS (current_function_decl))
      {
        int named_parm_regs, anon_parm_regs;
*************** sh_allocate_initial_value (rtx hard_reg)
*** 9216,9222 ****
  	  && ! (TARGET_SHCOMPACT
  		&& ((crtl->args.info.call_cookie
  		     & ~ CALL_COOKIE_RET_TRAMP (1))
! 		    || current_function_saves_all_registers)))
  	x = hard_reg;
        else
  	x = gen_frame_mem (Pmode, return_address_pointer_rtx);
--- 9216,9222 ----
  	  && ! (TARGET_SHCOMPACT
  		&& ((crtl->args.info.call_cookie
  		     & ~ CALL_COOKIE_RET_TRAMP (1))
! 		    || crtl->saves_all_registers)))
  	x = hard_reg;
        else
  	x = gen_frame_mem (Pmode, return_address_pointer_rtx);
*************** sh_get_pr_initial_val (void)
*** 10612,10618 ****
    if (TARGET_SHCOMPACT
        && ((crtl->args.info.call_cookie
  	   & ~ CALL_COOKIE_RET_TRAMP (1))
! 	  || current_function_saves_all_registers))
      return gen_frame_mem (SImode, return_address_pointer_rtx);
  
    /* If we haven't finished rtl generation, there might be a nonlocal label
--- 10612,10618 ----
    if (TARGET_SHCOMPACT
        && ((crtl->args.info.call_cookie
  	   & ~ CALL_COOKIE_RET_TRAMP (1))
! 	  || crtl->saves_all_registers))
      return gen_frame_mem (SImode, return_address_pointer_rtx);
  
    /* If we haven't finished rtl generation, there might be a nonlocal label
Index: config/sh/sh.h
===================================================================
*** config/sh/sh.h	(revision 134640)
--- config/sh/sh.h	(working copy)
*************** extern char sh_additional_register_names
*** 1359,1365 ****
  #define DEFAULT_PCC_STRUCT_RETURN 0
  
  #define SHMEDIA_REGS_STACK_ADJUST() \
!   (TARGET_SHCOMPACT && current_function_saves_all_registers \
     ? (8 * (/* r28-r35 */ 8 + /* r44-r59 */ 16 + /* tr5-tr7 */ 3) \
        + (TARGET_FPU_ANY ? 4 * (/* fr36 - fr63 */ 28) : 0)) \
     : 0)
--- 1359,1365 ----
  #define DEFAULT_PCC_STRUCT_RETURN 0
  
  #define SHMEDIA_REGS_STACK_ADJUST() \
!   (TARGET_SHCOMPACT && crtl->saves_all_registers \
     ? (8 * (/* r28-r35 */ 8 + /* r44-r59 */ 16 + /* tr5-tr7 */ 3) \
        + (TARGET_FPU_ANY ? 4 * (/* fr36 - fr63 */ 28) : 0)) \
     : 0)
Index: config/sh/sh.md
===================================================================
*** config/sh/sh.md	(revision 134640)
--- config/sh/sh.md	(working copy)
*************** label:
*** 5067,5073 ****
    [(set (match_dup 0) (match_dup 1))]
    "
  {
!   if (TARGET_SHCOMPACT && current_function_saves_all_registers)
      operands[1] = gen_frame_mem (SImode, return_address_pointer_rtx);
  }")
  
--- 5067,5073 ----
    [(set (match_dup 0) (match_dup 1))]
    "
  {
!   if (TARGET_SHCOMPACT && crtl->saves_all_registers)
      operands[1] = gen_frame_mem (SImode, return_address_pointer_rtx);
  }")
  
Index: config/avr/avr.c
===================================================================
*** config/avr/avr.c	(revision 134640)
--- config/avr/avr.c	(working copy)
*************** out_movhi_mr_r (rtx insn, rtx op[], int 
*** 2735,2741 ****
  int
  frame_pointer_required_p (void)
  {
!   return (current_function_calls_alloca
  	  || crtl->args.info.nregs == 0
    	  || get_frame_size () > 0);
  }
--- 2735,2741 ----
  int
  frame_pointer_required_p (void)
  {
!   return (cfun->calls_alloca
  	  || crtl->args.info.nregs == 0
    	  || get_frame_size () > 0);
  }
Index: config/crx/crx.h
===================================================================
*** config/crx/crx.h	(revision 134640)
--- config/crx/crx.h	(working copy)
*************** enum reg_class
*** 277,283 ****
  
  #define FIRST_PARM_OFFSET(FNDECL)  0
  
! #define FRAME_POINTER_REQUIRED (current_function_calls_alloca)
  
  #define ELIMINABLE_REGS \
    { \
--- 277,283 ----
  
  #define FIRST_PARM_OFFSET(FNDECL)  0
  
! #define FRAME_POINTER_REQUIRED (cfun->calls_alloca)
  
  #define ELIMINABLE_REGS \
    { \
Index: config/xtensa/xtensa.h
===================================================================
*** config/xtensa/xtensa.h	(revision 134640)
--- config/xtensa/xtensa.h	(working copy)
*************** along with GCC; see the file COPYING3.  
*** 23,29 ****
  #include "xtensa-config.h"
  
  /* Standard GCC variables that we reference.  */
! extern int current_function_calls_alloca;
  extern int optimize;
  
  /* External variables defined in xtensa.c.  */
--- 23,29 ----
  #include "xtensa-config.h"
  
  /* Standard GCC variables that we reference.  */
! extern int cfun->calls_alloca;
  extern int optimize;
  
  /* External variables defined in xtensa.c.  */
Index: config/stormy16/stormy16.c
===================================================================
*** config/stormy16/stormy16.c	(revision 134640)
--- config/stormy16/stormy16.c	(working copy)
*************** xstormy16_compute_stack_layout (void)
*** 996,1002 ****
      if (REG_NEEDS_SAVE (regno, ifun))
        layout.register_save_size += UNITS_PER_WORD;
    
!   if (current_function_stdarg)
      layout.stdarg_save_size = NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD;
    else
      layout.stdarg_save_size = 0;
--- 996,1002 ----
      if (REG_NEEDS_SAVE (regno, ifun))
        layout.register_save_size += UNITS_PER_WORD;
    
!   if (cfun->stdarg)
      layout.stdarg_save_size = NUM_ARGUMENT_REGISTERS * UNITS_PER_WORD;
    else
      layout.stdarg_save_size = 0;
Index: config/fr30/fr30.c
===================================================================
*** config/fr30/fr30.c	(revision 134640)
--- config/fr30/fr30.c	(working copy)
*************** static int fr30_arg_partial_bytes (CUMUL
*** 140,146 ****
     && ! call_used_regs [regno]         )
  
  #define MUST_SAVE_FRAME_POINTER	 (df_regs_ever_live_p (FRAME_POINTER_REGNUM)  || frame_pointer_needed)
! #define MUST_SAVE_RETURN_POINTER (df_regs_ever_live_p (RETURN_POINTER_REGNUM) || current_function_profile)
  
  #if UNITS_PER_WORD == 4
  #define WORD_ALIGN(SIZE) (((SIZE) + 3) & ~3)
--- 140,146 ----
     && ! call_used_regs [regno]         )
  
  #define MUST_SAVE_FRAME_POINTER	 (df_regs_ever_live_p (FRAME_POINTER_REGNUM)  || frame_pointer_needed)
! #define MUST_SAVE_RETURN_POINTER (df_regs_ever_live_p (RETURN_POINTER_REGNUM) || crtl->profile)
  
  #if UNITS_PER_WORD == 4
  #define WORD_ALIGN(SIZE) (((SIZE) + 3) & ~3)
*************** fr30_expand_prologue (void)
*** 349,355 ****
        RTX_FRAME_RELATED_P (insn) = 1;
      }
  
!   if (current_function_profile)
      emit_insn (gen_blockage ());
  }
  
--- 349,355 ----
        RTX_FRAME_RELATED_P (insn) = 1;
      }
  
!   if (crtl->profile)
      emit_insn (gen_blockage ());
  }
  
Index: config/cris/cris.c
===================================================================
*** config/cris/cris.c	(revision 134640)
--- config/cris/cris.c	(working copy)
*************** cris_conditional_register_usage (void)
*** 412,424 ****
      reg_names[CRIS_CC0_REGNUM] = "ccr";
  }
  
! /* Return current_function_uses_pic_offset_table.  For use in cris.md,
     since some generated files do not include function.h.  */
  
  int
  cris_cfun_uses_pic_table (void)
  {
!   return current_function_uses_pic_offset_table;
  }
  
  /* Given an rtx, return the text string corresponding to the CODE of X.
--- 412,424 ----
      reg_names[CRIS_CC0_REGNUM] = "ccr";
  }
  
! /* Return crtl->uses_pic_offset_table.  For use in cris.md,
     since some generated files do not include function.h.  */
  
  int
  cris_cfun_uses_pic_table (void)
  {
!   return crtl->uses_pic_offset_table;
  }
  
  /* Given an rtx, return the text string corresponding to the CODE of X.
*************** cris_reg_saved_in_regsave_area (unsigned
*** 604,610 ****
  		  && !call_used_regs[regno + 1]))))
       && (regno != FRAME_POINTER_REGNUM || !frame_pointer_needed)
       && regno != CRIS_SRP_REGNUM)
!     || (current_function_calls_eh_return
  	&& (regno == EH_RETURN_DATA_REGNO (0)
  	    || regno == EH_RETURN_DATA_REGNO (1)
  	    || regno == EH_RETURN_DATA_REGNO (2)
--- 604,610 ----
  		  && !call_used_regs[regno + 1]))))
       && (regno != FRAME_POINTER_REGNUM || !frame_pointer_needed)
       && regno != CRIS_SRP_REGNUM)
!     || (crtl->calls_eh_return
  	&& (regno == EH_RETURN_DATA_REGNO (0)
  	    || regno == EH_RETURN_DATA_REGNO (1)
  	    || regno == EH_RETURN_DATA_REGNO (2)
*************** cris_initial_frame_pointer_offset (void)
*** 1188,1194 ****
    int offs = 0;
    bool got_really_used = false;
  
!   if (current_function_uses_pic_offset_table)
      {
        push_topmost_sequence ();
        got_really_used
--- 1188,1194 ----
    int offs = 0;
    bool got_really_used = false;
  
!   if (crtl->uses_pic_offset_table)
      {
        push_topmost_sequence ();
        got_really_used
*************** cris_simple_epilogue (void)
*** 1703,1709 ****
        || crtl->args.pretend_args_size
        || crtl->args.size
        || crtl->outgoing_args_size
!       || current_function_calls_eh_return
  
        /* If we're not supposed to emit prologue and epilogue, we must
  	 not emit return-type instructions.  */
--- 1703,1709 ----
        || crtl->args.pretend_args_size
        || crtl->args.size
        || crtl->outgoing_args_size
!       || crtl->calls_eh_return
  
        /* If we're not supposed to emit prologue and epilogue, we must
  	 not emit return-type instructions.  */
*************** cris_simple_epilogue (void)
*** 1714,1720 ****
    if (TARGET_V32 && cris_return_address_on_stack ())
      return false;
  
!   if (current_function_uses_pic_offset_table)
      {
        push_topmost_sequence ();
        got_really_used
--- 1714,1720 ----
    if (TARGET_V32 && cris_return_address_on_stack ())
      return false;
  
!   if (crtl->uses_pic_offset_table)
      {
        push_topmost_sequence ();
        got_really_used
*************** cris_expand_prologue (void)
*** 2751,2757 ****
  
    CRIS_ASSERT (size >= 0);
  
!   if (current_function_uses_pic_offset_table)
      {
        /* A reference may have been optimized out (like the abort () in
  	 fde_split in unwind-dw2-fde.c, at least 3.2.1) so check that
--- 2751,2757 ----
  
    CRIS_ASSERT (size >= 0);
  
!   if (crtl->uses_pic_offset_table)
      {
        /* A reference may have been optimized out (like the abort () in
  	 fde_split in unwind-dw2-fde.c, at least 3.2.1) so check that
*************** cris_expand_epilogue (void)
*** 3030,3036 ****
    if (!TARGET_PROLOGUE_EPILOGUE)
      return;
  
!   if (current_function_uses_pic_offset_table)
      {
        /* A reference may have been optimized out (like the abort () in
  	 fde_split in unwind-dw2-fde.c, at least 3.2.1) so check that
--- 3030,3036 ----
    if (!TARGET_PROLOGUE_EPILOGUE)
      return;
  
!   if (crtl->uses_pic_offset_table)
      {
        /* A reference may have been optimized out (like the abort () in
  	 fde_split in unwind-dw2-fde.c, at least 3.2.1) so check that
*************** cris_expand_epilogue (void)
*** 3173,3179 ****
       the return address on the stack.  */
    if (return_address_on_stack && pretend == 0)
      {
!       if (TARGET_V32 || current_function_calls_eh_return)
  	{
  	  rtx mem;
  	  rtx insn;
--- 3173,3179 ----
       the return address on the stack.  */
    if (return_address_on_stack && pretend == 0)
      {
!       if (TARGET_V32 || crtl->calls_eh_return)
  	{
  	  rtx mem;
  	  rtx insn;
*************** cris_expand_epilogue (void)
*** 3189,3195 ****
  	  REG_NOTES (insn)
  	    = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn));
  
! 	  if (current_function_calls_eh_return)
  	    emit_insn (gen_addsi3 (stack_pointer_rtx,
  				   stack_pointer_rtx,
  				   gen_rtx_raw_REG (SImode,
--- 3189,3195 ----
  	  REG_NOTES (insn)
  	    = alloc_EXPR_LIST (REG_INC, stack_pointer_rtx, REG_NOTES (insn));
  
! 	  if (crtl->calls_eh_return)
  	    emit_insn (gen_addsi3 (stack_pointer_rtx,
  				   stack_pointer_rtx,
  				   gen_rtx_raw_REG (SImode,
*************** cris_expand_epilogue (void)
*** 3231,3237 ****
      }
  
    /* Perform the "physical" unwinding that the EH machinery calculated.  */
!   if (current_function_calls_eh_return)
      emit_insn (gen_addsi3 (stack_pointer_rtx,
  			   stack_pointer_rtx,
  			   gen_rtx_raw_REG (SImode,
--- 3231,3237 ----
      }
  
    /* Perform the "physical" unwinding that the EH machinery calculated.  */
!   if (crtl->calls_eh_return)
      emit_insn (gen_addsi3 (stack_pointer_rtx,
  			   stack_pointer_rtx,
  			   gen_rtx_raw_REG (SImode,
*************** cris_expand_pic_call_address (rtx *opp)
*** 3484,3490 ****
  		 for v32.  */
  	      rtx tem, rm, ro;
  	      gcc_assert (can_create_pseudo_p ());
! 	      current_function_uses_pic_offset_table = 1;
  	      tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
  				    TARGET_V32
  				    ? CRIS_UNSPEC_PLT_PCREL
--- 3484,3490 ----
  		 for v32.  */
  	      rtx tem, rm, ro;
  	      gcc_assert (can_create_pseudo_p ());
! 	      crtl->uses_pic_offset_table = 1;
  	      tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
  				    TARGET_V32
  				    ? CRIS_UNSPEC_PLT_PCREL
*************** cris_expand_pic_call_address (rtx *opp)
*** 3519,3525 ****
  	      rtx tem, mem, rm, ro;
  
  	      gcc_assert (can_create_pseudo_p ());
! 	      current_function_uses_pic_offset_table = 1;
  	      tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
  				    CRIS_UNSPEC_PLTGOTREAD);
  	      rm = gen_reg_rtx (Pmode);
--- 3519,3525 ----
  	      rtx tem, mem, rm, ro;
  
  	      gcc_assert (can_create_pseudo_p ());
! 	      crtl->uses_pic_offset_table = 1;
  	      tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, op),
  				    CRIS_UNSPEC_PLTGOTREAD);
  	      rm = gen_reg_rtx (Pmode);
*************** cris_asm_output_symbol_ref (FILE *file, 
*** 3591,3597 ****
       assemble_name (file, str);
  
       /* Sanity check.  */
!      if (!TARGET_V32 && !current_function_uses_pic_offset_table)
         output_operand_lossage ("PIC register isn't set up");
      }
    else
--- 3591,3597 ----
       assemble_name (file, str);
  
       /* Sanity check.  */
!      if (!TARGET_V32 && !crtl->uses_pic_offset_table)
         output_operand_lossage ("PIC register isn't set up");
      }
    else
*************** cris_asm_output_label_ref (FILE *file, c
*** 3608,3614 ****
        assemble_name (file, buf);
  
        /* Sanity check.  */
!       if (!TARGET_V32 && !current_function_uses_pic_offset_table)
  	internal_error ("emitting PIC operand, but PIC register isn't set up");
      }
    else
--- 3608,3614 ----
        assemble_name (file, buf);
  
        /* Sanity check.  */
!       if (!TARGET_V32 && !crtl->uses_pic_offset_table)
  	internal_error ("emitting PIC operand, but PIC register isn't set up");
      }
    else
Index: config/cris/cris.md
===================================================================
*** config/cris/cris.md	(revision 134640)
--- config/cris/cris.md	(working copy)
***************
*** 995,1001 ****
  	    /* FIXME: add a REG_EQUAL (or is it REG_EQUIV) note to the
  	       destination register for the symbol.  It might not be
  	       worth it.  Measure.  */
! 	    current_function_uses_pic_offset_table = 1;
  	    if (t == cris_rel_symbol)
  	      {
  		/* Change a "move.d sym(+offs),rN" into (allocate register rM)
--- 995,1001 ----
  	    /* FIXME: add a REG_EQUAL (or is it REG_EQUIV) note to the
  	       destination register for the symbol.  It might not be
  	       worth it.  Measure.  */
! 	    crtl->uses_pic_offset_table = 1;
  	    if (t == cris_rel_symbol)
  	      {
  		/* Change a "move.d sym(+offs),rN" into (allocate register rM)
***************
*** 1025,1031 ****
  		  {
  		    /* We still uses GOT-relative addressing for
  		       pre-v32.	 */
! 		    current_function_uses_pic_offset_table = 1;
  		    tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, sym),
  					  CRIS_UNSPEC_GOTREL);
  		    if (offs != 0)
--- 1025,1031 ----
  		  {
  		    /* We still uses GOT-relative addressing for
  		       pre-v32.	 */
! 		    crtl->uses_pic_offset_table = 1;
  		    tem = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, sym),
  					  CRIS_UNSPEC_GOTREL);
  		    if (offs != 0)
Index: config/iq2000/iq2000.c
===================================================================
*** config/iq2000/iq2000.c	(revision 134640)
--- config/iq2000/iq2000.c	(working copy)
*************** compute_frame_size (HOST_WIDE_INT size)
*** 1619,1625 ****
  
    /* If a function dynamically allocates the stack and
       has 0 for STACK_DYNAMIC_OFFSET then allocate some stack space.  */
!   if (args_size == 0 && current_function_calls_alloca)
      args_size = 4 * UNITS_PER_WORD;
  
    total_size = var_size + args_size + extra_size;
--- 1619,1625 ----
  
    /* If a function dynamically allocates the stack and
       has 0 for STACK_DYNAMIC_OFFSET then allocate some stack space.  */
!   if (args_size == 0 && cfun->calls_alloca)
      args_size = 4 * UNITS_PER_WORD;
  
    total_size = var_size + args_size + extra_size;
*************** compute_frame_size (HOST_WIDE_INT size)
*** 1635,1641 ****
      }
  
    /* We need to restore these for the handler.  */
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
  
--- 1635,1641 ----
      }
  
    /* We need to restore these for the handler.  */
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
  
*************** iq2000_expand_epilogue (void)
*** 2064,2070 ****
  
        save_restore_insns (0);
  
!       if (current_function_calls_eh_return)
  	{
  	  rtx eh_ofs = EH_RETURN_STACKADJ_RTX;
  	  emit_insn (gen_addsi3 (eh_ofs, eh_ofs, tsize_rtx));
--- 2064,2070 ----
  
        save_restore_insns (0);
  
!       if (crtl->calls_eh_return)
  	{
  	  rtx eh_ofs = EH_RETURN_STACKADJ_RTX;
  	  emit_insn (gen_addsi3 (eh_ofs, eh_ofs, tsize_rtx));
*************** iq2000_expand_epilogue (void)
*** 2073,2086 ****
  
        emit_insn (gen_blockage ());
  
!       if (tsize != 0 || current_function_calls_eh_return)
  	{
  	  emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
  				 tsize_rtx));
  	}
      }
  
!   if (current_function_calls_eh_return)
      {
        /* Perform the additional bump for __throw.  */
        emit_move_insn (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM),
--- 2073,2086 ----
  
        emit_insn (gen_blockage ());
  
!       if (tsize != 0 || crtl->calls_eh_return)
  	{
  	  emit_insn (gen_addsi3 (stack_pointer_rtx, stack_pointer_rtx,
  				 tsize_rtx));
  	}
      }
  
!   if (crtl->calls_eh_return)
      {
        /* Perform the additional bump for __throw.  */
        emit_move_insn (gen_rtx_REG (Pmode, HARD_FRAME_POINTER_REGNUM),
Index: config/mt/mt.h
===================================================================
*** config/mt/mt.h	(revision 134640)
--- config/mt/mt.h	(working copy)
*************** enum save_direction
*** 422,428 ****
  	  handlers.  */						\
  	|| (interrupt_handler && call_used_regs[regno] 		\
  	   && !current_function_is_leaf)			\
! 	||(current_function_calls_eh_return			\
  	   && (regno == GPR_R7 || regno == GPR_R8))		\
  	)							\
    )
--- 422,428 ----
  	  handlers.  */						\
  	|| (interrupt_handler && call_used_regs[regno] 		\
  	   && !current_function_is_leaf)			\
! 	||(crtl->calls_eh_return			\
  	   && (regno == GPR_R7 || regno == GPR_R8))		\
  	)							\
    )
Index: config/mn10300/mn10300.c
===================================================================
*** config/mn10300/mn10300.c	(revision 134640)
--- config/mn10300/mn10300.c	(working copy)
*************** mn10300_function_value (const_tree valty
*** 1599,1605 ****
    if (! POINTER_TYPE_P (valtype))
      return gen_rtx_REG (mode, FIRST_DATA_REGNUM);
    else if (! TARGET_PTR_A0D0 || ! outgoing
! 	   || current_function_returns_struct)
      return gen_rtx_REG (mode, FIRST_ADDRESS_REGNUM);
  
    rv = gen_rtx_PARALLEL (mode, rtvec_alloc (2));
--- 1599,1605 ----
    if (! POINTER_TYPE_P (valtype))
      return gen_rtx_REG (mode, FIRST_DATA_REGNUM);
    else if (! TARGET_PTR_A0D0 || ! outgoing
! 	   || cfun->returns_struct)
      return gen_rtx_REG (mode, FIRST_ADDRESS_REGNUM);
  
    rv = gen_rtx_PARALLEL (mode, rtvec_alloc (2));
Index: config/ia64/ia64.c
===================================================================
*** config/ia64/ia64.c	(revision 134640)
--- config/ia64/ia64.c	(working copy)
*************** ia64_compute_frame_size (HOST_WIDE_INT s
*** 2379,2385 ****
       Likewise for -a profiling for the bb_init_func argument.  For -ax
       profiling, we need two output registers for the two bb_init_trace_func
       arguments.  */
!   if (current_function_profile)
      i = MAX (i, 1);
  #endif
    current_frame_info.n_output_regs = i;
--- 2379,2385 ----
       Likewise for -a profiling for the bb_init_func argument.  For -ax
       profiling, we need two output registers for the two bb_init_trace_func
       arguments.  */
!   if (crtl->profile)
      i = MAX (i, 1);
  #endif
    current_frame_info.n_output_regs = i;
*************** ia64_compute_frame_size (HOST_WIDE_INT s
*** 2460,2466 ****
        /* Similarly for gp.  Note that if we're calling setjmp, the stacked
  	 registers are clobbered, so we fall back to the stack.  */
        current_frame_info.r[reg_save_gp]
! 	= (current_function_calls_setjmp ? 0 : find_gr_spill (reg_save_gp, 1));
        if (current_frame_info.r[reg_save_gp] == 0)
  	{
  	  SET_HARD_REG_BIT (mask, GR_REG (1));
--- 2460,2466 ----
        /* Similarly for gp.  Note that if we're calling setjmp, the stacked
  	 registers are clobbered, so we fall back to the stack.  */
        current_frame_info.r[reg_save_gp]
! 	= (cfun->calls_setjmp ? 0 : find_gr_spill (reg_save_gp, 1));
        if (current_frame_info.r[reg_save_gp] == 0)
  	{
  	  SET_HARD_REG_BIT (mask, GR_REG (1));
*************** ia64_secondary_reload_class (enum reg_cl
*** 5058,5064 ****
        /* ??? This happens if we cse/gcse a BImode value across a call,
  	 and the function has a nonlocal goto.  This is because global
  	 does not allocate call crossing pseudos to hard registers when
! 	 current_function_has_nonlocal_goto is true.  This is relatively
  	 common for C++ programs that use exceptions.  To reproduce,
  	 return NO_REGS and compile libstdc++.  */
        if (GET_CODE (x) == MEM)
--- 5058,5064 ----
        /* ??? This happens if we cse/gcse a BImode value across a call,
  	 and the function has a nonlocal goto.  This is because global
  	 does not allocate call crossing pseudos to hard registers when
! 	 crtl->has_nonlocal_goto is true.  This is relatively
  	 common for C++ programs that use exceptions.  To reproduce,
  	 return NO_REGS and compile libstdc++.  */
        if (GET_CODE (x) == MEM)
Index: config/m68k/m68k.c
===================================================================
*** config/m68k/m68k.c	(revision 134640)
--- config/m68k/m68k.c	(working copy)
*************** m68k_save_reg (unsigned int regno, bool 
*** 863,882 ****
  {
    if (flag_pic && regno == PIC_REG)
      {
!       if (current_function_saves_all_registers)
  	return true;
!       if (current_function_uses_pic_offset_table)
  	return true;
        /* Reload may introduce constant pool references into a function
  	 that thitherto didn't need a PIC register.  Note that the test
  	 above will not catch that case because we will only set
! 	 current_function_uses_pic_offset_table when emitting
  	 the address reloads.  */
!       if (current_function_uses_const_pool)
  	return true;
      }
  
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
        for (i = 0; ; i++)
--- 863,882 ----
  {
    if (flag_pic && regno == PIC_REG)
      {
!       if (crtl->saves_all_registers)
  	return true;
!       if (crtl->uses_pic_offset_table)
  	return true;
        /* Reload may introduce constant pool references into a function
  	 that thitherto didn't need a PIC register.  Note that the test
  	 above will not catch that case because we will only set
! 	 crtl->uses_pic_offset_table when emitting
  	 the address reloads.  */
!       if (crtl->uses_const_pool)
  	return true;
      }
  
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
        for (i = 0; ; i++)
*************** m68k_expand_prologue (void)
*** 986,992 ****
  
    /* If the stack limit is a symbol, we can check it here,
       before actually allocating the space.  */
!   if (current_function_limit_stack
        && GET_CODE (stack_limit_rtx) == SYMBOL_REF)
      {
        limit = plus_constant (stack_limit_rtx, current_frame.size + 4);
--- 986,992 ----
  
    /* If the stack limit is a symbol, we can check it here,
       before actually allocating the space.  */
!   if (crtl->limit_stack
        && GET_CODE (stack_limit_rtx) == SYMBOL_REF)
      {
        limit = plus_constant (stack_limit_rtx, current_frame.size + 4);
*************** m68k_expand_prologue (void)
*** 1073,1079 ****
  
    /* If the stack limit is not a symbol, check it here.
       This has the disadvantage that it may be too late...  */
!   if (current_function_limit_stack)
      {
        if (REG_P (stack_limit_rtx))
  	{
--- 1073,1079 ----
  
    /* If the stack limit is not a symbol, check it here.
       This has the disadvantage that it may be too late...  */
!   if (crtl->limit_stack)
      {
        if (REG_P (stack_limit_rtx))
  	{
*************** m68k_expand_prologue (void)
*** 1119,1125 ****
  
    if (flag_pic
        && !TARGET_SEP_DATA
!       && current_function_uses_pic_offset_table)
      insn = emit_insn (gen_load_got (pic_offset_table_rtx));
  }
  
--- 1119,1125 ----
  
    if (flag_pic
        && !TARGET_SEP_DATA
!       && crtl->uses_pic_offset_table)
      insn = emit_insn (gen_load_got (pic_offset_table_rtx));
  }
  
*************** m68k_expand_epilogue (bool sibcall_p)
*** 1160,1166 ****
       What we really need to know there is if there could be pending
       stack adjustment needed at that point.  */
    restore_from_sp = (!frame_pointer_needed
! 		     || (!current_function_calls_alloca
  			 && current_function_is_leaf));
  
    /* fsize_with_regs is the size we need to adjust the sp when
--- 1160,1166 ----
       What we really need to know there is if there could be pending
       stack adjustment needed at that point.  */
    restore_from_sp = (!frame_pointer_needed
! 		     || (!cfun->calls_alloca
  			 && current_function_is_leaf));
  
    /* fsize_with_regs is the size we need to adjust the sp when
*************** m68k_expand_epilogue (bool sibcall_p)
*** 1298,1304 ****
  			   stack_pointer_rtx,
  			   GEN_INT (fsize_with_regs)));
  
!   if (current_function_calls_eh_return)
      emit_insn (gen_addsi3 (stack_pointer_rtx,
  			   stack_pointer_rtx,
  			   EH_RETURN_STACKADJ_RTX));
--- 1298,1304 ----
  			   stack_pointer_rtx,
  			   GEN_INT (fsize_with_regs)));
  
!   if (crtl->calls_eh_return)
      emit_insn (gen_addsi3 (stack_pointer_rtx,
  			   stack_pointer_rtx,
  			   EH_RETURN_STACKADJ_RTX));
*************** legitimize_pic_address (rtx orig, enum m
*** 2046,2052 ****
        pic_ref = gen_rtx_MEM (Pmode,
  			     gen_rtx_PLUS (Pmode,
  					   pic_offset_table_rtx, orig));
!       current_function_uses_pic_offset_table = 1;
        MEM_READONLY_P (pic_ref) = 1;
        emit_move_insn (reg, pic_ref);
        return reg;
--- 2046,2052 ----
        pic_ref = gen_rtx_MEM (Pmode,
  			     gen_rtx_PLUS (Pmode,
  					   pic_offset_table_rtx, orig));
!       crtl->uses_pic_offset_table = 1;
        MEM_READONLY_P (pic_ref) = 1;
        emit_move_insn (reg, pic_ref);
        return reg;
Index: config/rs6000/rs6000.c
===================================================================
*** config/rs6000/rs6000.c	(revision 134640)
--- config/rs6000/rs6000.c	(working copy)
*************** rs6000_got_register (rtx value ATTRIBUTE
*** 11449,11455 ****
        && !df_regs_ever_live_p (RS6000_PIC_OFFSET_TABLE_REGNUM))
      df_set_regs_ever_live (RS6000_PIC_OFFSET_TABLE_REGNUM, true);
  
!   current_function_uses_pic_offset_table = 1;
  
    return pic_offset_table_rtx;
  }
--- 11449,11455 ----
        && !df_regs_ever_live_p (RS6000_PIC_OFFSET_TABLE_REGNUM))
      df_set_regs_ever_live (RS6000_PIC_OFFSET_TABLE_REGNUM, true);
  
!   crtl->uses_pic_offset_table = 1;
  
    return pic_offset_table_rtx;
  }
*************** first_reg_to_save (void)
*** 14128,14134 ****
  
  #if TARGET_MACHO
    if (flag_pic
!       && current_function_uses_pic_offset_table
        && first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)
      return RS6000_PIC_OFFSET_TABLE_REGNUM;
  #endif
--- 14128,14134 ----
  
  #if TARGET_MACHO
    if (flag_pic
!       && crtl->uses_pic_offset_table
        && first_reg > RS6000_PIC_OFFSET_TABLE_REGNUM)
      return RS6000_PIC_OFFSET_TABLE_REGNUM;
  #endif
*************** first_altivec_reg_to_save (void)
*** 14165,14171 ****
    /* On Darwin, the unwind routines are compiled without
       TARGET_ALTIVEC, and use save_world to save/restore the
       altivec registers when necessary.  */
!   if (DEFAULT_ABI == ABI_DARWIN && current_function_calls_eh_return
        && ! TARGET_ALTIVEC)
      return FIRST_ALTIVEC_REGNO + 20;
  
--- 14165,14171 ----
    /* On Darwin, the unwind routines are compiled without
       TARGET_ALTIVEC, and use save_world to save/restore the
       altivec registers when necessary.  */
!   if (DEFAULT_ABI == ABI_DARWIN && crtl->calls_eh_return
        && ! TARGET_ALTIVEC)
      return FIRST_ALTIVEC_REGNO + 20;
  
*************** compute_vrsave_mask (void)
*** 14189,14195 ****
    /* On Darwin, the unwind routines are compiled without
       TARGET_ALTIVEC, and use save_world to save/restore the
       call-saved altivec registers when necessary.  */
!   if (DEFAULT_ABI == ABI_DARWIN && current_function_calls_eh_return
        && ! TARGET_ALTIVEC)
      mask |= 0xFFF;
  
--- 14189,14195 ----
    /* On Darwin, the unwind routines are compiled without
       TARGET_ALTIVEC, and use save_world to save/restore the
       call-saved altivec registers when necessary.  */
!   if (DEFAULT_ABI == ABI_DARWIN && crtl->calls_eh_return
        && ! TARGET_ALTIVEC)
      mask |= 0xFFF;
  
*************** compute_save_world_info (rs6000_stack_t 
*** 14231,14237 ****
    info_ptr->world_save_p
      = (WORLD_SAVE_P (info_ptr)
         && DEFAULT_ABI == ABI_DARWIN
!        && ! (current_function_calls_setjmp && flag_exceptions)
         && info_ptr->first_fp_reg_save == FIRST_SAVED_FP_REGNO
         && info_ptr->first_gp_reg_save == FIRST_SAVED_GP_REGNO
         && info_ptr->first_altivec_reg_save == FIRST_SAVED_ALTIVEC_REGNO
--- 14231,14237 ----
    info_ptr->world_save_p
      = (WORLD_SAVE_P (info_ptr)
         && DEFAULT_ABI == ABI_DARWIN
!        && ! (cfun->calls_setjmp && flag_exceptions)
         && info_ptr->first_fp_reg_save == FIRST_SAVED_FP_REGNO
         && info_ptr->first_gp_reg_save == FIRST_SAVED_GP_REGNO
         && info_ptr->first_altivec_reg_save == FIRST_SAVED_ALTIVEC_REGNO
*************** rs6000_stack_info (void)
*** 14416,14422 ****
    if (((TARGET_TOC && TARGET_MINIMAL_TOC)
         || (flag_pic == 1 && DEFAULT_ABI == ABI_V4)
         || (flag_pic && DEFAULT_ABI == ABI_DARWIN))
!       && current_function_uses_const_pool
        && info_ptr->first_gp_reg_save > RS6000_PIC_OFFSET_TABLE_REGNUM)
      first_gp = RS6000_PIC_OFFSET_TABLE_REGNUM;
    else
--- 14416,14422 ----
    if (((TARGET_TOC && TARGET_MINIMAL_TOC)
         || (flag_pic == 1 && DEFAULT_ABI == ABI_V4)
         || (flag_pic && DEFAULT_ABI == ABI_DARWIN))
!       && crtl->uses_const_pool
        && info_ptr->first_gp_reg_save > RS6000_PIC_OFFSET_TABLE_REGNUM)
      first_gp = RS6000_PIC_OFFSET_TABLE_REGNUM;
    else
*************** rs6000_stack_info (void)
*** 14452,14465 ****
  
    /* Determine if we need to save the link register.  */
    if ((DEFAULT_ABI == ABI_AIX
!        && current_function_profile
         && !TARGET_PROFILE_KERNEL)
  #ifdef TARGET_RELOCATABLE
        || (TARGET_RELOCATABLE && (get_pool_size () != 0))
  #endif
        || (info_ptr->first_fp_reg_save != 64
  	  && !FP_SAVE_INLINE (info_ptr->first_fp_reg_save))
!       || (DEFAULT_ABI == ABI_V4 && current_function_calls_alloca)
        || info_ptr->calls_p
        || rs6000_ra_ever_killed ())
      {
--- 14452,14465 ----
  
    /* Determine if we need to save the link register.  */
    if ((DEFAULT_ABI == ABI_AIX
!        && crtl->profile
         && !TARGET_PROFILE_KERNEL)
  #ifdef TARGET_RELOCATABLE
        || (TARGET_RELOCATABLE && (get_pool_size () != 0))
  #endif
        || (info_ptr->first_fp_reg_save != 64
  	  && !FP_SAVE_INLINE (info_ptr->first_fp_reg_save))
!       || (DEFAULT_ABI == ABI_V4 && cfun->calls_alloca)
        || info_ptr->calls_p
        || rs6000_ra_ever_killed ())
      {
*************** rs6000_stack_info (void)
*** 14480,14486 ****
    /* If the current function calls __builtin_eh_return, then we need
       to allocate stack space for registers that will hold data for
       the exception handler.  */
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
        for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; ++i)
--- 14480,14486 ----
    /* If the current function calls __builtin_eh_return, then we need
       to allocate stack space for registers that will hold data for
       the exception handler.  */
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
        for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; ++i)
*************** spe_func_has_64bit_regs_p (void)
*** 14699,14707 ****
  
    /* Functions that save and restore all the call-saved registers will
       need to save/restore the registers in 64-bits.  */
!   if (current_function_calls_eh_return
!       || current_function_calls_setjmp
!       || current_function_has_nonlocal_goto)
      return true;
  
    insns = get_insns ();
--- 14699,14707 ----
  
    /* Functions that save and restore all the call-saved registers will
       need to save/restore the registers in 64-bits.  */
!   if (crtl->calls_eh_return
!       || cfun->calls_setjmp
!       || crtl->has_nonlocal_goto)
      return true;
  
    insns = get_insns ();
*************** rs6000_ra_ever_killed (void)
*** 14953,14959 ****
    rtx reg;
    rtx insn;
  
!   if (current_function_is_thunk)
      return 0;
  
    /* regs_ever_live has LR marked as used if any sibcalls are present,
--- 14953,14959 ----
    rtx reg;
    rtx insn;
  
!   if (crtl->is_thunk)
      return 0;
  
    /* regs_ever_live has LR marked as used if any sibcalls are present,
*************** rs6000_emit_eh_reg_restore (rtx source, 
*** 15109,15115 ****
        rtx tmp;
  
        if (frame_pointer_needed
! 	  || current_function_calls_alloca
  	  || info->total_size > 32767)
  	{
  	  tmp = gen_frame_mem (Pmode, frame_rtx);
--- 15109,15115 ----
        rtx tmp;
  
        if (frame_pointer_needed
! 	  || cfun->calls_alloca
  	  || info->total_size > 32767)
  	{
  	  tmp = gen_frame_mem (Pmode, frame_rtx);
*************** rs6000_emit_allocate_stack (HOST_WIDE_IN
*** 15248,15254 ****
        return;
      }
  
!   if (current_function_limit_stack)
      {
        if (REG_P (stack_limit_rtx)
  	  && REGNO (stack_limit_rtx) > 1
--- 15248,15254 ----
        return;
      }
  
!   if (crtl->limit_stack)
      {
        if (REG_P (stack_limit_rtx)
  	  && REGNO (stack_limit_rtx) > 1
*************** rs6000_emit_prologue (void)
*** 15604,15617 ****
  			  && no_global_regs_above (info->first_gp_reg_save));
    saving_FPRs_inline = (info->first_fp_reg_save == 64
  			|| FP_SAVE_INLINE (info->first_fp_reg_save)
! 			|| current_function_calls_eh_return
  			|| cfun->machine->ra_need_lr);
  
    /* For V.4, update stack before we do any saving and set back pointer.  */
    if (! WORLD_SAVE_P (info)
        && info->push_p
        && (DEFAULT_ABI == ABI_V4
! 	  || current_function_calls_eh_return))
      {
        if (info->total_size < 32767)
  	sp_offset = info->total_size;
--- 15604,15617 ----
  			  && no_global_regs_above (info->first_gp_reg_save));
    saving_FPRs_inline = (info->first_fp_reg_save == 64
  			|| FP_SAVE_INLINE (info->first_fp_reg_save)
! 			|| crtl->calls_eh_return
  			|| cfun->machine->ra_need_lr);
  
    /* For V.4, update stack before we do any saving and set back pointer.  */
    if (! WORLD_SAVE_P (info)
        && info->push_p
        && (DEFAULT_ABI == ABI_V4
! 	  || crtl->calls_eh_return))
      {
        if (info->total_size < 32767)
  	sp_offset = info->total_size;
*************** rs6000_emit_prologue (void)
*** 15654,15660 ****
  		  && info->cr_save_offset == 4
  		  && info->push_p
  		  && info->lr_save_p
! 		  && (!current_function_calls_eh_return
  		       || info->ehrd_offset == -432)
  		  && info->vrsave_save_offset == -224
  		  && info->altivec_save_offset == -416);
--- 15654,15660 ----
  		  && info->cr_save_offset == 4
  		  && info->push_p
  		  && info->lr_save_p
! 		  && (!crtl->calls_eh_return
  		       || info->ehrd_offset == -432)
  		  && info->vrsave_save_offset == -224
  		  && info->altivec_save_offset == -416);
*************** rs6000_emit_prologue (void)
*** 15951,15957 ****
  
    /* ??? There's no need to emit actual instructions here, but it's the
       easiest way to get the frame unwind information emitted.  */
!   if (current_function_calls_eh_return)
      {
        unsigned int i, regno;
  
--- 15951,15957 ----
  
    /* ??? There's no need to emit actual instructions here, but it's the
       easiest way to get the frame unwind information emitted.  */
!   if (crtl->calls_eh_return)
      {
        unsigned int i, regno;
  
*************** rs6000_emit_prologue (void)
*** 16017,16023 ****
    /* Update stack and set back pointer unless this is V.4,
       for which it was done previously.  */
    if (!WORLD_SAVE_P (info) && info->push_p
!       && !(DEFAULT_ABI == ABI_V4 || current_function_calls_eh_return))
      {
        if (info->total_size < 32767)
        sp_offset = info->total_size;
--- 16017,16023 ----
    /* Update stack and set back pointer unless this is V.4,
       for which it was done previously.  */
    if (!WORLD_SAVE_P (info) && info->push_p
!       && !(DEFAULT_ABI == ABI_V4 || crtl->calls_eh_return))
      {
        if (info->total_size < 32767)
        sp_offset = info->total_size;
*************** rs6000_emit_prologue (void)
*** 16145,16151 ****
  
  #if TARGET_MACHO
    if (DEFAULT_ABI == ABI_DARWIN
!       && flag_pic && current_function_uses_pic_offset_table)
      {
        rtx lr = gen_rtx_REG (Pmode, LR_REGNO);
        rtx src = machopic_function_base_sym ();
--- 16145,16151 ----
  
  #if TARGET_MACHO
    if (DEFAULT_ABI == ABI_DARWIN
!       && flag_pic && crtl->uses_pic_offset_table)
      {
        rtx lr = gen_rtx_REG (Pmode, LR_REGNO);
        rtx src = machopic_function_base_sym ();
*************** rs6000_emit_epilogue (int sibcall)
*** 16264,16274 ****
  			 && info->first_gp_reg_save < 31
  			 && no_global_regs_above (info->first_gp_reg_save));
    restoring_FPRs_inline = (sibcall
! 			   || current_function_calls_eh_return
  			   || info->first_fp_reg_save == 64
  			   || FP_SAVE_INLINE (info->first_fp_reg_save));
    use_backchain_to_restore_sp = (frame_pointer_needed
! 				 || current_function_calls_alloca
  				 || info->total_size > 32767);
    using_mtcr_multiple = (rs6000_cpu == PROCESSOR_PPC601
  			 || rs6000_cpu == PROCESSOR_PPC603
--- 16264,16274 ----
  			 && info->first_gp_reg_save < 31
  			 && no_global_regs_above (info->first_gp_reg_save));
    restoring_FPRs_inline = (sibcall
! 			   || crtl->calls_eh_return
  			   || info->first_fp_reg_save == 64
  			   || FP_SAVE_INLINE (info->first_fp_reg_save));
    use_backchain_to_restore_sp = (frame_pointer_needed
! 				 || cfun->calls_alloca
  				 || info->total_size > 32767);
    using_mtcr_multiple = (rs6000_cpu == PROCESSOR_PPC601
  			 || rs6000_cpu == PROCESSOR_PPC603
*************** rs6000_emit_epilogue (int sibcall)
*** 16295,16301 ****
  		       + LAST_ALTIVEC_REGNO + 1 - info->first_altivec_reg_save
  		       + 63 + 1 - info->first_fp_reg_save);
  
!       strcpy (rname, ((current_function_calls_eh_return) ?
  		      "*eh_rest_world_r10" : "*rest_world"));
        alloc_rname = ggc_strdup (rname);
  
--- 16295,16301 ----
  		       + LAST_ALTIVEC_REGNO + 1 - info->first_altivec_reg_save
  		       + 63 + 1 - info->first_fp_reg_save);
  
!       strcpy (rname, ((crtl->calls_eh_return) ?
  		      "*eh_rest_world_r10" : "*rest_world"));
        alloc_rname = ggc_strdup (rname);
  
*************** rs6000_emit_epilogue (int sibcall)
*** 16457,16463 ****
      }
    else if (info->push_p
  	   && DEFAULT_ABI != ABI_V4
! 	   && !current_function_calls_eh_return)
      {
        emit_insn (TARGET_32BIT
  		 ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx,
--- 16457,16463 ----
      }
    else if (info->push_p
  	   && DEFAULT_ABI != ABI_V4
! 	   && !crtl->calls_eh_return)
      {
        emit_insn (TARGET_32BIT
  		 ? gen_addsi3 (sp_reg_rtx, sp_reg_rtx,
*************** rs6000_emit_epilogue (int sibcall)
*** 16537,16543 ****
  		    gen_rtx_REG (Pmode, 0));
  
    /* Load exception handler data registers, if needed.  */
!   if (current_function_calls_eh_return)
      {
        unsigned int i, regno;
  
--- 16537,16543 ----
  		    gen_rtx_REG (Pmode, 0));
  
    /* Load exception handler data registers, if needed.  */
!   if (crtl->calls_eh_return)
      {
        unsigned int i, regno;
  
*************** rs6000_emit_epilogue (int sibcall)
*** 16734,16740 ****
  	       : gen_adddi3 (sp_reg_rtx, sp_reg_rtx,
  			     GEN_INT (sp_offset)));
  
!   if (current_function_calls_eh_return)
      {
        rtx sa = EH_RETURN_STACKADJ_RTX;
        emit_insn (TARGET_32BIT
--- 16734,16740 ----
  	       : gen_adddi3 (sp_reg_rtx, sp_reg_rtx,
  			     GEN_INT (sp_offset)));
  
!   if (crtl->calls_eh_return)
      {
        rtx sa = EH_RETURN_STACKADJ_RTX;
        emit_insn (TARGET_32BIT
*************** rs6000_output_function_epilogue (FILE *f
*** 16864,16870 ****
       System V.4 Powerpc's (and the embedded ABI derived from it) use a
       different traceback table.  */
    if (DEFAULT_ABI == ABI_AIX && ! flag_inhibit_size_directive
!       && rs6000_traceback != traceback_none && !current_function_is_thunk)
      {
        const char *fname = NULL;
        const char *language_string = lang_hooks.name;
--- 16864,16870 ----
       System V.4 Powerpc's (and the embedded ABI derived from it) use a
       different traceback table.  */
    if (DEFAULT_ABI == ABI_AIX && ! flag_inhibit_size_directive
!       && rs6000_traceback != traceback_none && !crtl->is_thunk)
      {
        const char *fname = NULL;
        const char *language_string = lang_hooks.name;
*************** output_profile_hook (int labelno ATTRIBU
*** 17848,17860 ****
        int caller_addr_regno = LR_REGNO;
  
        /* Be conservative and always set this, at least for now.  */
!       current_function_uses_pic_offset_table = 1;
  
  #if TARGET_MACHO
        /* For PIC code, set up a stub and collect the caller's address
  	 from r0, which is where the prologue puts it.  */
        if (MACHOPIC_INDIRECT
! 	  && current_function_uses_pic_offset_table)
  	caller_addr_regno = 0;
  #endif
        emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name),
--- 17848,17860 ----
        int caller_addr_regno = LR_REGNO;
  
        /* Be conservative and always set this, at least for now.  */
!       crtl->uses_pic_offset_table = 1;
  
  #if TARGET_MACHO
        /* For PIC code, set up a stub and collect the caller's address
  	 from r0, which is where the prologue puts it.  */
        if (MACHOPIC_INDIRECT
! 	  && crtl->uses_pic_offset_table)
  	caller_addr_regno = 0;
  #endif
        emit_library_call (gen_rtx_SYMBOL_REF (Pmode, mcount_name),
*************** rs6000_elf_declare_function_name (FILE *
*** 20630,20636 ****
  
    if (TARGET_RELOCATABLE
        && !TARGET_SECURE_PLT
!       && (get_pool_size () != 0 || current_function_profile)
        && uses_TOC ())
      {
        char buf[256];
--- 20630,20636 ----
  
    if (TARGET_RELOCATABLE
        && !TARGET_SECURE_PLT
!       && (get_pool_size () != 0 || crtl->profile)
        && uses_TOC ())
      {
        char buf[256];
Index: config/rs6000/rs6000.h
===================================================================
*** config/rs6000/rs6000.h	(revision 134640)
--- config/rs6000/rs6000.h	(working copy)
*************** typedef struct rs6000_args
*** 1550,1556 ****
  #define	EPILOGUE_USES(REGNO)					\
    ((reload_completed && (REGNO) == LR_REGNO)			\
     || (TARGET_ALTIVEC && (REGNO) == VRSAVE_REGNO)		\
!    || (current_function_calls_eh_return				\
         && TARGET_AIX						\
         && (REGNO) == 2))
  
--- 1550,1556 ----
  #define	EPILOGUE_USES(REGNO)					\
    ((reload_completed && (REGNO) == LR_REGNO)			\
     || (TARGET_ALTIVEC && (REGNO) == VRSAVE_REGNO)		\
!    || (crtl->calls_eh_return				\
         && TARGET_AIX						\
         && (REGNO) == 2))
  
Index: config/rs6000/rs6000.md
===================================================================
*** config/rs6000/rs6000.md	(revision 134640)
--- config/rs6000/rs6000.md	(working copy)
***************
*** 10396,10402 ****
    emit_move_insn (chain, stack_bot);
  
    /* Check stack bounds if necessary.  */
!   if (current_function_limit_stack)
      {
        rtx available;
        available = expand_binop (Pmode, sub_optab,
--- 10396,10402 ----
    emit_move_insn (chain, stack_bot);
  
    /* Check stack bounds if necessary.  */
!   if (crtl->limit_stack)
      {
        rtx available;
        available = expand_binop (Pmode, sub_optab,
Index: config/mcore/mcore.c
===================================================================
*** config/mcore/mcore.c	(revision 134640)
--- config/mcore/mcore.c	(working copy)
*************** mcore_expand_prolog (void)
*** 1938,1944 ****
        
        ASM_OUTPUT_CG_NODE (asm_out_file, mcore_current_function_name, space_allocated);
  
!       if (current_function_calls_alloca)
  	ASM_OUTPUT_CG_EDGE (asm_out_file, mcore_current_function_name, "alloca", 1);
  
        /* 970425: RBE:
--- 1938,1944 ----
        
        ASM_OUTPUT_CG_NODE (asm_out_file, mcore_current_function_name, space_allocated);
  
!       if (cfun->calls_alloca)
  	ASM_OUTPUT_CG_EDGE (asm_out_file, mcore_current_function_name, "alloca", 1);
  
        /* 970425: RBE:
Index: config/arc/arc.c
===================================================================
*** config/arc/arc.c	(revision 134640)
--- config/arc/arc.c	(working copy)
*************** arc_output_function_epilogue (FILE *file
*** 1283,1289 ****
        unsigned int pretend_size = current_frame_info.pretend_size;
        unsigned int frame_size = size - pretend_size;
        int restored, fp_restored_p;
!       int can_trust_sp_p = !current_function_calls_alloca;
        const char *sp_str = reg_names[STACK_POINTER_REGNUM];
        const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
  
--- 1283,1289 ----
        unsigned int pretend_size = current_frame_info.pretend_size;
        unsigned int frame_size = size - pretend_size;
        int restored, fp_restored_p;
!       int can_trust_sp_p = !cfun->calls_alloca;
        const char *sp_str = reg_names[STACK_POINTER_REGNUM];
        const char *fp_str = reg_names[FRAME_POINTER_REGNUM];
  
Index: config/arc/arc.h
===================================================================
*** config/arc/arc.h	(revision 134640)
--- config/arc/arc.h	(working copy)
*************** extern enum reg_class arc_regno_reg_clas
*** 520,526 ****
     frame pointer.  This expression is evaluated in the reload pass.
     If its value is nonzero the function will have a frame pointer.  */
  #define FRAME_POINTER_REQUIRED \
! (current_function_calls_alloca)
  
  /* C statement to store the difference between the frame pointer
     and the stack pointer values immediately after the function prologue.  */
--- 520,526 ----
     frame pointer.  This expression is evaluated in the reload pass.
     If its value is nonzero the function will have a frame pointer.  */
  #define FRAME_POINTER_REQUIRED \
! (cfun->calls_alloca)
  
  /* C statement to store the difference between the frame pointer
     and the stack pointer values immediately after the function prologue.  */
Index: config/darwin.c
===================================================================
*** config/darwin.c	(revision 134640)
--- config/darwin.c	(working copy)
*************** machopic_function_base_name (void)
*** 278,284 ****
    if (function_base == NULL)
      function_base = ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));
  
!   current_function_uses_pic_offset_table = 1;
  
    return function_base;
  }
--- 278,284 ----
    if (function_base == NULL)
      function_base = ggc_alloc_string ("<pic base>", sizeof ("<pic base>"));
  
!   crtl->uses_pic_offset_table = 1;
  
    return function_base;
  }
Index: config/score/score3.c
===================================================================
*** config/score/score3.c	(revision 134640)
--- config/score/score3.c	(working copy)
*************** score3_compute_frame_size (HOST_WIDE_INT
*** 189,195 ****
    if (f->var_size == 0 && current_function_is_leaf)
      f->args_size = f->cprestore_size = 0;
  
!   if (f->args_size == 0 && current_function_calls_alloca)
      f->args_size = UNITS_PER_WORD;
  
    f->total_size = f->var_size + f->args_size + f->cprestore_size;
--- 189,195 ----
    if (f->var_size == 0 && current_function_is_leaf)
      f->args_size = f->cprestore_size = 0;
  
!   if (f->args_size == 0 && cfun->calls_alloca)
      f->args_size = UNITS_PER_WORD;
  
    f->total_size = f->var_size + f->args_size + f->cprestore_size;
*************** score3_compute_frame_size (HOST_WIDE_INT
*** 202,208 ****
          }
      }
  
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
        for (i = 0;; ++i)
--- 202,208 ----
          }
      }
  
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
        for (i = 0;; ++i)
*************** rpush (int rd, int cnt)
*** 1467,1473 ****
    rtx mem = gen_rtx_MEM (SImode, gen_rtx_PRE_DEC (SImode, stack_pointer_rtx));
    rtx reg = gen_rtx_REG (SImode, rd);
  
!   if (!current_function_calls_eh_return)
      MEM_READONLY_P (mem) = 1;
  
    if (cnt == 1)
--- 1467,1473 ----
    rtx mem = gen_rtx_MEM (SImode, gen_rtx_PRE_DEC (SImode, stack_pointer_rtx));
    rtx reg = gen_rtx_REG (SImode, rd);
  
!   if (!crtl->calls_eh_return)
      MEM_READONLY_P (mem) = 1;
  
    if (cnt == 1)
*************** rpop (int rd, int cnt)
*** 1581,1587 ****
    rtx mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx));
    rtx reg = gen_rtx_REG (SImode, rd);
  
!   if (!current_function_calls_eh_return)
      MEM_READONLY_P (mem) = 1;
  
    if (cnt == 1)
--- 1581,1587 ----
    rtx mem = gen_rtx_MEM (SImode, gen_rtx_POST_INC (SImode, stack_pointer_rtx));
    rtx reg = gen_rtx_REG (SImode, rd);
  
!   if (!crtl->calls_eh_return)
      MEM_READONLY_P (mem) = 1;
  
    if (cnt == 1)
*************** score3_epilogue (int sibcall_p)
*** 1625,1631 ****
    if (base != stack_pointer_rtx)
      emit_move_insn (stack_pointer_rtx, base);
  
!   if (current_function_calls_eh_return)
      emit_insn (gen_add3_insn (stack_pointer_rtx,
                                stack_pointer_rtx,
                                EH_RETURN_STACKADJ_RTX));
--- 1625,1631 ----
    if (base != stack_pointer_rtx)
      emit_move_insn (stack_pointer_rtx, base);
  
!   if (crtl->calls_eh_return)
      emit_insn (gen_add3_insn (stack_pointer_rtx,
                                stack_pointer_rtx,
                                EH_RETURN_STACKADJ_RTX));
Index: config/score/score7.c
===================================================================
*** config/score/score7.c	(revision 134640)
--- config/score/score7.c	(working copy)
*************** score7_compute_frame_size (HOST_WIDE_INT
*** 188,194 ****
    if (f->var_size == 0 && current_function_is_leaf)
      f->args_size = f->cprestore_size = 0;
  
!   if (f->args_size == 0 && current_function_calls_alloca)
      f->args_size = UNITS_PER_WORD;
  
    f->total_size = f->var_size + f->args_size + f->cprestore_size;
--- 188,194 ----
    if (f->var_size == 0 && current_function_is_leaf)
      f->args_size = f->cprestore_size = 0;
  
!   if (f->args_size == 0 && cfun->calls_alloca)
      f->args_size = UNITS_PER_WORD;
  
    f->total_size = f->var_size + f->args_size + f->cprestore_size;
*************** score7_compute_frame_size (HOST_WIDE_INT
*** 201,207 ****
          }
      }
  
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
        for (i = 0;; ++i)
--- 201,207 ----
          }
      }
  
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
        for (i = 0;; ++i)
*************** score7_prologue (void)
*** 1428,1434 ****
            rtx mem = gen_rtx_MEM (SImode,
                                   gen_rtx_PRE_DEC (SImode, stack_pointer_rtx));
            rtx reg = gen_rtx_REG (SImode, regno);
!           if (!current_function_calls_eh_return)
              MEM_READONLY_P (mem) = 1;
            EMIT_PL (emit_insn (gen_pushsi_score7 (mem, reg)));
          }
--- 1428,1434 ----
            rtx mem = gen_rtx_MEM (SImode,
                                   gen_rtx_PRE_DEC (SImode, stack_pointer_rtx));
            rtx reg = gen_rtx_REG (SImode, regno);
!           if (!crtl->calls_eh_return)
              MEM_READONLY_P (mem) = 1;
            EMIT_PL (emit_insn (gen_pushsi_score7 (mem, reg)));
          }
*************** score7_epilogue (int sibcall_p)
*** 1508,1514 ****
    if (base != stack_pointer_rtx)
      emit_move_insn (stack_pointer_rtx, base);
  
!   if (current_function_calls_eh_return)
      emit_insn (gen_add3_insn (stack_pointer_rtx,
                                stack_pointer_rtx,
                                EH_RETURN_STACKADJ_RTX));
--- 1508,1514 ----
    if (base != stack_pointer_rtx)
      emit_move_insn (stack_pointer_rtx, base);
  
!   if (crtl->calls_eh_return)
      emit_insn (gen_add3_insn (stack_pointer_rtx,
                                stack_pointer_rtx,
                                EH_RETURN_STACKADJ_RTX));
*************** score7_epilogue (int sibcall_p)
*** 1521,1527 ****
                                   gen_rtx_POST_INC (SImode, stack_pointer_rtx));
            rtx reg = gen_rtx_REG (SImode, regno);
  
!           if (!current_function_calls_eh_return)
              MEM_READONLY_P (mem) = 1;
  
            emit_insn (gen_popsi_score7 (reg, mem));
--- 1521,1527 ----
                                   gen_rtx_POST_INC (SImode, stack_pointer_rtx));
            rtx reg = gen_rtx_REG (SImode, regno);
  
!           if (!crtl->calls_eh_return)
              MEM_READONLY_P (mem) = 1;
  
            emit_insn (gen_popsi_score7 (reg, mem));
Index: config/score/score.h
===================================================================
*** config/score/score.h	(revision 134640)
--- config/score/score.h	(working copy)
*************** extern enum reg_class score_char_to_clas
*** 549,555 ****
     Zero means the frame pointer need not be set up (and parms
     may be accessed via the stack pointer) in functions that seem suitable.
     This is computed in `reload', in reload1.c.  */
! #define FRAME_POINTER_REQUIRED          current_function_calls_alloca
  
  #define ELIMINABLE_REGS                                \
    {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},        \
--- 549,555 ----
     Zero means the frame pointer need not be set up (and parms
     may be accessed via the stack pointer) in functions that seem suitable.
     This is computed in `reload', in reload1.c.  */
! #define FRAME_POINTER_REQUIRED          cfun->calls_alloca
  
  #define ELIMINABLE_REGS                                \
    {{ ARG_POINTER_REGNUM, STACK_POINTER_REGNUM},        \
Index: config/arm/linux-elf.h
===================================================================
*** config/arm/linux-elf.h	(revision 134640)
--- config/arm/linux-elf.h	(working copy)
***************
*** 114,120 ****
    emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)))
  
  /* The GNU/Linux profiler needs a frame pointer.  */
! #define SUBTARGET_FRAME_POINTER_REQUIRED current_function_profile
  
  /* Add .note.GNU-stack.  */
  #undef NEED_INDICATE_EXEC_STACK
--- 114,120 ----
    emit_insn (gen_rtx_CLOBBER (VOIDmode, gen_rtx_REG (SImode, LR_REGNUM)))
  
  /* The GNU/Linux profiler needs a frame pointer.  */
! #define SUBTARGET_FRAME_POINTER_REQUIRED crtl->profile
  
  /* Add .note.GNU-stack.  */
  #undef NEED_INDICATE_EXEC_STACK
Index: config/arm/arm.c
===================================================================
*** config/arm/arm.c	(revision 134640)
--- config/arm/arm.c	(working copy)
*************** use_return_insn (int iscond, rtx sibling
*** 1656,1664 ****
    if (crtl->args.pretend_args_size
        || cfun->machine->uses_anonymous_args
        /* Or if the function calls __builtin_eh_return () */
!       || current_function_calls_eh_return
        /* Or if the function calls alloca */
!       || current_function_calls_alloca
        /* Or if there is a stack adjustment.  However, if the stack pointer
  	 is saved on the stack, we can use a pre-incrementing stack load.  */
        || !(stack_adjust == 0 || (TARGET_APCS_FRAME && frame_pointer_needed
--- 1656,1664 ----
    if (crtl->args.pretend_args_size
        || cfun->machine->uses_anonymous_args
        /* Or if the function calls __builtin_eh_return () */
!       || crtl->calls_eh_return
        /* Or if the function calls alloca */
!       || cfun->calls_alloca
        /* Or if there is a stack adjustment.  However, if the stack pointer
  	 is saved on the stack, we can use a pre-incrementing stack load.  */
        || !(stack_adjust == 0 || (TARGET_APCS_FRAME && frame_pointer_needed
*************** require_pic_register (void)
*** 3373,3379 ****
       We don't want those calls to affect any assumptions about the real
       function; and further, we can't call entry_of_function() until we
       start the real expansion process.  */
!   if (!current_function_uses_pic_offset_table)
      {
        gcc_assert (can_create_pseudo_p ());
        if (arm_pic_register != INVALID_REGNUM)
--- 3373,3379 ----
       We don't want those calls to affect any assumptions about the real
       function; and further, we can't call entry_of_function() until we
       start the real expansion process.  */
!   if (!crtl->uses_pic_offset_table)
      {
        gcc_assert (can_create_pseudo_p ());
        if (arm_pic_register != INVALID_REGNUM)
*************** require_pic_register (void)
*** 3384,3390 ****
  	     if we are being called as part of the cost-estimation
  	     process.  */
  	  if (current_ir_type () != IR_GIMPLE)
! 	    current_function_uses_pic_offset_table = 1;
  	}
        else
  	{
--- 3384,3390 ----
  	     if we are being called as part of the cost-estimation
  	     process.  */
  	  if (current_ir_type () != IR_GIMPLE)
! 	    crtl->uses_pic_offset_table = 1;
  	}
        else
  	{
*************** require_pic_register (void)
*** 3397,3403 ****
  	     process.  */
  	  if (current_ir_type () != IR_GIMPLE)
  	    {
! 	      current_function_uses_pic_offset_table = 1;
  	      start_sequence ();
  
  	      arm_load_pic_register (0UL);
--- 3397,3403 ----
  	     process.  */
  	  if (current_ir_type () != IR_GIMPLE)
  	    {
! 	      crtl->uses_pic_offset_table = 1;
  	      start_sequence ();
  
  	      arm_load_pic_register (0UL);
*************** arm_load_pic_register (unsigned long sav
*** 3595,3601 ****
    rtx l1, labelno, pic_tmp, pic_tmp2, pic_rtx, pic_reg;
    rtx global_offset_table;
  
!   if (current_function_uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
      return;
  
    gcc_assert (flag_pic);
--- 3595,3601 ----
    rtx l1, labelno, pic_tmp, pic_tmp2, pic_rtx, pic_reg;
    rtx global_offset_table;
  
!   if (crtl->uses_pic_offset_table == 0 || TARGET_SINGLE_PIC_BASE)
      return;
  
    gcc_assert (flag_pic);
*************** arm_compute_save_reg0_reg12_mask (void)
*** 10734,10740 ****
        if (flag_pic
  	  && !TARGET_SINGLE_PIC_BASE
  	  && arm_pic_register != INVALID_REGNUM
! 	  && current_function_uses_pic_offset_table)
  	save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
      }
    else
--- 10734,10740 ----
        if (flag_pic
  	  && !TARGET_SINGLE_PIC_BASE
  	  && arm_pic_register != INVALID_REGNUM
! 	  && crtl->uses_pic_offset_table)
  	save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
      }
    else
*************** arm_compute_save_reg0_reg12_mask (void)
*** 10755,10761 ****
  	  && !TARGET_SINGLE_PIC_BASE
  	  && arm_pic_register != INVALID_REGNUM
  	  && (df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM)
! 	      || current_function_uses_pic_offset_table))
  	save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
  
        /* The prologue will copy SP into R0, so save it.  */
--- 10755,10761 ----
  	  && !TARGET_SINGLE_PIC_BASE
  	  && arm_pic_register != INVALID_REGNUM
  	  && (df_regs_ever_live_p (PIC_OFFSET_TABLE_REGNUM)
! 	      || crtl->uses_pic_offset_table))
  	save_reg_mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
  
        /* The prologue will copy SP into R0, so save it.  */
*************** arm_compute_save_reg0_reg12_mask (void)
*** 10764,10770 ****
      }
  
    /* Save registers so the exception handler can modify them.  */
!   if (current_function_calls_eh_return)
      {
        unsigned int i;
  
--- 10764,10770 ----
      }
  
    /* Save registers so the exception handler can modify them.  */
!   if (crtl->calls_eh_return)
      {
        unsigned int i;
  
*************** arm_compute_save_reg_mask (void)
*** 10825,10831 ****
        || (save_reg_mask
  	  && optimize_size
  	  && ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
! 	  && !current_function_calls_eh_return))
      save_reg_mask |= 1 << LR_REGNUM;
  
    if (cfun->machine->lr_save_eliminated)
--- 10825,10831 ----
        || (save_reg_mask
  	  && optimize_size
  	  && ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
! 	  && !crtl->calls_eh_return))
      save_reg_mask |= 1 << LR_REGNUM;
  
    if (cfun->machine->lr_save_eliminated)
*************** thumb1_compute_save_reg_mask (void)
*** 10887,10893 ****
    if (flag_pic
        && !TARGET_SINGLE_PIC_BASE
        && arm_pic_register != INVALID_REGNUM
!       && current_function_uses_pic_offset_table)
      mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
  
    /* See if we might need r11 for calls to _interwork_r11_call_via_rN().  */
--- 10887,10893 ----
    if (flag_pic
        && !TARGET_SINGLE_PIC_BASE
        && arm_pic_register != INVALID_REGNUM
!       && crtl->uses_pic_offset_table)
      mask |= 1 << PIC_OFFSET_TABLE_REGNUM;
  
    /* See if we might need r11 for calls to _interwork_r11_call_via_rN().  */
*************** output_return_instruction (rtx operand, 
*** 11002,11008 ****
        return "";
      }
  
!   gcc_assert (!current_function_calls_alloca || really_return);
  
    sprintf (conditional, "%%?%%%c0", reverse ? 'D' : 'd');
  
--- 11002,11008 ----
        return "";
      }
  
!   gcc_assert (!cfun->calls_alloca || really_return);
  
    sprintf (conditional, "%%?%%%c0", reverse ? 'D' : 'd');
  
*************** arm_output_function_prologue (FILE *f, H
*** 11268,11274 ****
    if (cfun->machine->lr_save_eliminated)
      asm_fprintf (f, "\t%@ link register save eliminated.\n");
  
!   if (current_function_calls_eh_return)
      asm_fprintf (f, "\t@ Calls __builtin_eh_return.\n");
  
    return_used_this_function = 0;
--- 11268,11274 ----
    if (cfun->machine->lr_save_eliminated)
      asm_fprintf (f, "\t%@ link register save eliminated.\n");
  
!   if (crtl->calls_eh_return)
      asm_fprintf (f, "\t@ Calls __builtin_eh_return.\n");
  
    return_used_this_function = 0;
*************** arm_output_epilogue (rtx sibling)
*** 11315,11321 ****
  
    /* If we are throwing an exception, then we really must be doing a
       return, so we can't tail-call.  */
!   gcc_assert (!current_function_calls_eh_return || really_return);
  
    offsets = arm_get_frame_offsets ();
    saved_regs_mask = offsets->saved_regs_mask;
--- 11315,11321 ----
  
    /* If we are throwing an exception, then we really must be doing a
       return, so we can't tail-call.  */
!   gcc_assert (!crtl->calls_eh_return || really_return);
  
    offsets = arm_get_frame_offsets ();
    saved_regs_mask = offsets->saved_regs_mask;
*************** arm_output_epilogue (rtx sibling)
*** 11446,11452 ****
  	 special function exit sequence, or we are not really returning.  */
        if (really_return
  	  && ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
! 	  && !current_function_calls_eh_return)
  	/* Delete the LR from the register mask, so that the LR on
  	   the stack is loaded into the PC in the register mask.  */
  	saved_regs_mask &= ~ (1 << LR_REGNUM);
--- 11446,11452 ----
  	 special function exit sequence, or we are not really returning.  */
        if (really_return
  	  && ARM_FUNC_TYPE (func_type) == ARM_FT_NORMAL
! 	  && !crtl->calls_eh_return)
  	/* Delete the LR from the register mask, so that the LR on
  	   the stack is loaded into the PC in the register mask.  */
  	saved_regs_mask &= ~ (1 << LR_REGNUM);
*************** arm_output_epilogue (rtx sibling)
*** 11463,11469 ****
           occur.  If the stack pointer already points at the right
           place, then omit the subtraction.  */
        if (offsets->outgoing_args != (1 + (int) bit_count (saved_regs_mask))
! 	  || current_function_calls_alloca)
  	asm_fprintf (f, "\tsub\t%r, %r, #%d\n", SP_REGNUM, FP_REGNUM,
  		     4 * bit_count (saved_regs_mask));
        print_multi_reg (f, "ldmfd\t%r, ", SP_REGNUM, saved_regs_mask, 0);
--- 11463,11469 ----
           occur.  If the stack pointer already points at the right
           place, then omit the subtraction.  */
        if (offsets->outgoing_args != (1 + (int) bit_count (saved_regs_mask))
! 	  || cfun->calls_alloca)
  	asm_fprintf (f, "\tsub\t%r, %r, #%d\n", SP_REGNUM, FP_REGNUM,
  		     4 * bit_count (saved_regs_mask));
        print_multi_reg (f, "ldmfd\t%r, ", SP_REGNUM, saved_regs_mask, 0);
*************** arm_output_epilogue (rtx sibling)
*** 11523,11532 ****
  	      count = offsets->saved_regs - offsets->saved_args;
  	      if (optimize_size
  		  && count != 0
! 		  && !current_function_calls_eh_return
  		  && bit_count(saved_regs_mask) * 4 == count
  		  && !IS_INTERRUPT (func_type)
! 		  && !cfun->tail_call_emit)
  		{
  		  unsigned long mask;
  		  mask = (1 << (arm_size_return_regs() / 4)) - 1;
--- 11523,11532 ----
  	      count = offsets->saved_regs - offsets->saved_args;
  	      if (optimize_size
  		  && count != 0
! 		  && !crtl->calls_eh_return
  		  && bit_count(saved_regs_mask) * 4 == count
  		  && !IS_INTERRUPT (func_type)
! 		  && !crtl->tail_call_emit)
  		{
  		  unsigned long mask;
  		  mask = (1 << (arm_size_return_regs() / 4)) - 1;
*************** arm_output_epilogue (rtx sibling)
*** 11628,11634 ****
  	  && really_return
  	  && crtl->args.pretend_args_size == 0
  	  && saved_regs_mask & (1 << LR_REGNUM)
! 	  && !current_function_calls_eh_return)
  	{
  	  saved_regs_mask &= ~ (1 << LR_REGNUM);
  	  saved_regs_mask |=   (1 << PC_REGNUM);
--- 11628,11634 ----
  	  && really_return
  	  && crtl->args.pretend_args_size == 0
  	  && saved_regs_mask & (1 << LR_REGNUM)
! 	  && !crtl->calls_eh_return)
  	{
  	  saved_regs_mask &= ~ (1 << LR_REGNUM);
  	  saved_regs_mask |=   (1 << PC_REGNUM);
*************** arm_output_epilogue (rtx sibling)
*** 11675,11681 ****
      return "";
  
    /* Stack adjustment for exception handler.  */
!   if (current_function_calls_eh_return)
      asm_fprintf (f, "\tadd\t%r, %r, %r\n", SP_REGNUM, SP_REGNUM,
  		 ARM_EH_STACKADJ_REGNUM);
  
--- 11675,11681 ----
      return "";
  
    /* Stack adjustment for exception handler.  */
!   if (crtl->calls_eh_return)
      asm_fprintf (f, "\tadd\t%r, %r, %r\n", SP_REGNUM, SP_REGNUM,
  		 ARM_EH_STACKADJ_REGNUM);
  
*************** arm_get_frame_offsets (void)
*** 12133,12139 ****
  	    }
  
  	  if (reg == -1 && arm_size_return_regs () <= 12
! 	      && !cfun->tail_call_emit)
  	    {
  	      /* Push/pop an argument register (r3) if all callee saved
  	         registers are already being pushed.  */
--- 12133,12139 ----
  	    }
  
  	  if (reg == -1 && arm_size_return_regs () <= 12
! 	      && !crtl->tail_call_emit)
  	    {
  	      /* Push/pop an argument register (r3) if all callee saved
  	         registers are already being pushed.  */
*************** arm_expand_prologue (void)
*** 12664,12670 ****
       scheduling in the prolog.  Similarly if we want non-call exceptions
       using the EABI unwinder, to prevent faulting instructions from being
       swapped with a stack adjustment.  */
!   if (current_function_profile || !TARGET_SCHED_PROLOG
        || (ARM_EABI_UNWIND_TABLES && flag_non_call_exceptions))
      emit_insn (gen_blockage ());
  
--- 12664,12670 ----
       scheduling in the prolog.  Similarly if we want non-call exceptions
       using the EABI unwinder, to prevent faulting instructions from being
       swapped with a stack adjustment.  */
!   if (crtl->profile || !TARGET_SCHED_PROLOG
        || (ARM_EABI_UNWIND_TABLES && flag_non_call_exceptions))
      emit_insn (gen_blockage ());
  
*************** thumb_pushpop (FILE *f, unsigned long ma
*** 16180,16186 ****
      {
        /* Catch popping the PC.  */
        if (TARGET_INTERWORK || TARGET_BACKTRACE
! 	  || current_function_calls_eh_return)
  	{
  	  /* The PC is never poped directly, instead
  	     it is popped into r3 and then BX is used.  */
--- 16180,16186 ----
      {
        /* Catch popping the PC.  */
        if (TARGET_INTERWORK || TARGET_BACKTRACE
! 	  || crtl->calls_eh_return)
  	{
  	  /* The PC is never poped directly, instead
  	     it is popped into r3 and then BX is used.  */
*************** thumb_exit (FILE *f, int reg_containing_
*** 16255,16261 ****
       return.  */
    if (pops_needed == 0)
      {
!       if (current_function_calls_eh_return)
  	asm_fprintf (f, "\tadd\t%r, %r\n", SP_REGNUM, ARM_EH_STACKADJ_REGNUM);
  
        asm_fprintf (f, "\tbx\t%r\n", reg_containing_return_addr);
--- 16255,16261 ----
       return.  */
    if (pops_needed == 0)
      {
!       if (crtl->calls_eh_return)
  	asm_fprintf (f, "\tadd\t%r, %r\n", SP_REGNUM, ARM_EH_STACKADJ_REGNUM);
  
        asm_fprintf (f, "\tbx\t%r\n", reg_containing_return_addr);
*************** thumb_exit (FILE *f, int reg_containing_
*** 16267,16273 ****
    else if (!TARGET_INTERWORK
  	   && !TARGET_BACKTRACE
  	   && !is_called_in_ARM_mode (current_function_decl)
! 	   && !current_function_calls_eh_return)
      {
        asm_fprintf (f, "\tpop\t{%r}\n", PC_REGNUM);
        return;
--- 16267,16273 ----
    else if (!TARGET_INTERWORK
  	   && !TARGET_BACKTRACE
  	   && !is_called_in_ARM_mode (current_function_decl)
! 	   && !crtl->calls_eh_return)
      {
        asm_fprintf (f, "\tpop\t{%r}\n", PC_REGNUM);
        return;
*************** thumb_exit (FILE *f, int reg_containing_
*** 16278,16284 ****
  
    /* If returning via __builtin_eh_return, the bottom three registers
       all contain information needed for the return.  */
!   if (current_function_calls_eh_return)
      size = 12;
    else
      {
--- 16278,16284 ----
  
    /* If returning via __builtin_eh_return, the bottom three registers
       all contain information needed for the return.  */
!   if (crtl->calls_eh_return)
      size = 12;
    else
      {
*************** thumb_exit (FILE *f, int reg_containing_
*** 16489,16495 ****
        asm_fprintf (f, "\tmov\t%r, %r\n", LAST_ARG_REGNUM, IP_REGNUM);
      }
  
!   if (current_function_calls_eh_return)
      asm_fprintf (f, "\tadd\t%r, %r\n", SP_REGNUM, ARM_EH_STACKADJ_REGNUM);
  
    /* Return to caller.  */
--- 16489,16495 ----
        asm_fprintf (f, "\tmov\t%r, %r\n", LAST_ARG_REGNUM, IP_REGNUM);
      }
  
!   if (crtl->calls_eh_return)
      asm_fprintf (f, "\tadd\t%r, %r\n", SP_REGNUM, ARM_EH_STACKADJ_REGNUM);
  
    /* Return to caller.  */
*************** thumb1_expand_prologue (void)
*** 16995,17001 ****
       scheduling in the prolog.  Similarly if we want non-call exceptions
       using the EABI unwinder, to prevent faulting instructions from being
       swapped with a stack adjustment.  */
!   if (current_function_profile || !TARGET_SCHED_PROLOG
        || (ARM_EABI_UNWIND_TABLES && flag_non_call_exceptions))
      emit_insn (gen_blockage ());
  
--- 16995,17001 ----
       scheduling in the prolog.  Similarly if we want non-call exceptions
       using the EABI unwinder, to prevent faulting instructions from being
       swapped with a stack adjustment.  */
!   if (crtl->profile || !TARGET_SCHED_PROLOG
        || (ARM_EABI_UNWIND_TABLES && flag_non_call_exceptions))
      emit_insn (gen_blockage ());
  
*************** thumb1_expand_epilogue (void)
*** 17045,17051 ****
       the stack adjustment will not be deleted.  */
    emit_insn (gen_prologue_use (stack_pointer_rtx));
  
!   if (current_function_profile || !TARGET_SCHED_PROLOG)
      emit_insn (gen_blockage ());
  
    /* Emit a clobber for each insn that will be restored in the epilogue,
--- 17045,17051 ----
       the stack adjustment will not be deleted.  */
    emit_insn (gen_prologue_use (stack_pointer_rtx));
  
!   if (crtl->profile || !TARGET_SCHED_PROLOG)
      emit_insn (gen_blockage ());
  
    /* Emit a clobber for each insn that will be restored in the epilogue,
*************** arm_unwind_emit (FILE * asm_out_file, rt
*** 18633,18639 ****
    if (!ARM_EABI_UNWIND_TABLES)
      return;
  
!   if (!(flag_unwind_tables || cfun->uses_eh_lsda)
        && (TREE_NOTHROW (current_function_decl)
  	  || cfun->all_throwers_are_sibcalls))
      return;
--- 18633,18639 ----
    if (!ARM_EABI_UNWIND_TABLES)
      return;
  
!   if (!(flag_unwind_tables || crtl->uses_eh_lsda)
        && (TREE_NOTHROW (current_function_decl)
  	  || cfun->all_throwers_are_sibcalls))
      return;
*************** arm_output_fn_unwind (FILE * f, bool pro
*** 18722,18728 ****
        /* If this function will never be unwound, then mark it as such.
           The came condition is used in arm_unwind_emit to suppress
  	 the frame annotations.  */
!       if (!(flag_unwind_tables || cfun->uses_eh_lsda)
  	  && (TREE_NOTHROW (current_function_decl)
  	      || cfun->all_throwers_are_sibcalls))
  	fputs("\t.cantunwind\n", f);
--- 18722,18728 ----
        /* If this function will never be unwound, then mark it as such.
           The came condition is used in arm_unwind_emit to suppress
  	 the frame annotations.  */
!       if (!(flag_unwind_tables || crtl->uses_eh_lsda)
  	  && (TREE_NOTHROW (current_function_decl)
  	      || cfun->all_throwers_are_sibcalls))
  	fputs("\t.cantunwind\n", f);
Index: config/arm/arm.h
===================================================================
*** config/arm/arm.h	(revision 134640)
--- config/arm/arm.h	(working copy)
*************** extern int arm_structure_size_boundary;
*** 999,1005 ****
  #endif
  
  #define FRAME_POINTER_REQUIRED					\
!   (current_function_has_nonlocal_label				\
     || SUBTARGET_FRAME_POINTER_REQUIRED				\
     || (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ()))
  
--- 999,1005 ----
  #endif
  
  #define FRAME_POINTER_REQUIRED					\
!   (cfun->has_nonlocal_label				\
     || SUBTARGET_FRAME_POINTER_REQUIRED				\
     || (TARGET_ARM && TARGET_APCS_FRAME && ! leaf_function_p ()))
  
*************** extern int making_const_table;
*** 2402,2408 ****
          {						\
            if (is_called_in_ARM_mode (DECL)		\
  	      || (TARGET_THUMB1 && !TARGET_THUMB1_ONLY	\
! 		  && current_function_is_thunk))	\
              fprintf (STREAM, "\t.code 32\n") ;		\
            else if (TARGET_THUMB1)			\
             fprintf (STREAM, "\t.code\t16\n\t.thumb_func\n") ;	\
--- 2402,2408 ----
          {						\
            if (is_called_in_ARM_mode (DECL)		\
  	      || (TARGET_THUMB1 && !TARGET_THUMB1_ONLY	\
! 		  && crtl->is_thunk))	\
              fprintf (STREAM, "\t.code 32\n") ;		\
            else if (TARGET_THUMB1)			\
             fprintf (STREAM, "\t.code\t16\n\t.thumb_func\n") ;	\
Index: config/arm/arm.md
===================================================================
*** config/arm/arm.md	(revision 134640)
--- config/arm/arm.md	(working copy)
***************
*** 10397,10403 ****
    [(clobber (const_int 0))]
    "TARGET_EITHER"
    "
!   if (current_function_calls_eh_return)
      emit_insn (gen_prologue_use (gen_rtx_REG (Pmode, 2)));
    if (TARGET_THUMB1)
      thumb1_expand_epilogue ();
--- 10397,10403 ----
    [(clobber (const_int 0))]
    "TARGET_EITHER"
    "
!   if (crtl->calls_eh_return)
      emit_insn (gen_prologue_use (gen_rtx_REG (Pmode, 2)));
    if (TARGET_THUMB1)
      thumb1_expand_epilogue ();
Index: config/pa/pa.md
===================================================================
*** config/pa/pa.md	(revision 134640)
--- config/pa/pa.md	(working copy)
***************
*** 7275,7281 ****
     (use (reg:SI 2))]
    "!TARGET_NO_SPACE_REGS
     && !TARGET_PA_20
!    && flag_pic && current_function_calls_eh_return"
    "ldsid (%%sr0,%%r2),%%r1\;mtsp %%r1,%%sr0\;be%* 0(%%sr0,%%r2)"
    [(set_attr "type" "branch")
     (set_attr "length" "12")])
--- 7275,7281 ----
     (use (reg:SI 2))]
    "!TARGET_NO_SPACE_REGS
     && !TARGET_PA_20
!    && flag_pic && crtl->calls_eh_return"
    "ldsid (%%sr0,%%r2),%%r1\;mtsp %%r1,%%sr0\;be%* 0(%%sr0,%%r2)"
    [(set_attr "type" "branch")
     (set_attr "length" "12")])
***************
*** 7317,7323 ****
  	 using space registers.  */
        if (!TARGET_NO_SPACE_REGS
  	  && !TARGET_PA_20
! 	  && flag_pic && current_function_calls_eh_return)
  	x = gen_return_external_pic ();
        else
  	x = gen_return_internal ();
--- 7317,7323 ----
  	 using space registers.  */
        if (!TARGET_NO_SPACE_REGS
  	  && !TARGET_PA_20
! 	  && flag_pic && crtl->calls_eh_return)
  	x = gen_return_external_pic ();
        else
  	x = gen_return_internal ();
Index: config/pa/pa.c
===================================================================
*** config/pa/pa.c	(revision 134640)
--- config/pa/pa.c	(working copy)
*************** legitimize_pic_address (rtx orig, enum m
*** 698,704 ****
  						REG_NOTES (insn));
  	  LABEL_NUSES (orig)++;
  	}
!       current_function_uses_pic_offset_table = 1;
        return reg;
      }
    if (GET_CODE (orig) == SYMBOL_REF)
--- 698,704 ----
  						REG_NOTES (insn));
  	  LABEL_NUSES (orig)++;
  	}
!       crtl->uses_pic_offset_table = 1;
        return reg;
      }
    if (GET_CODE (orig) == SYMBOL_REF)
*************** legitimize_pic_address (rtx orig, enum m
*** 745,751 ****
  						         UNSPEC_DLTIND14R)));
  	}
  
!       current_function_uses_pic_offset_table = 1;
        mark_reg_pointer (reg, BITS_PER_UNIT);
        insn = emit_move_insn (reg, pic_ref);
  
--- 745,751 ----
  						         UNSPEC_DLTIND14R)));
  	}
  
!       crtl->uses_pic_offset_table = 1;
        mark_reg_pointer (reg, BITS_PER_UNIT);
        insn = emit_move_insn (reg, pic_ref);
  
*************** compute_frame_size (HOST_WIDE_INT size, 
*** 3531,3537 ****
    /* If the current function calls __builtin_eh_return, then we need
       to allocate stack space for registers that will hold data for
       the exception handler.  */
!   if (DO_FRAME_NOTES && current_function_calls_eh_return)
      {
        unsigned int i;
  
--- 3531,3537 ----
    /* If the current function calls __builtin_eh_return, then we need
       to allocate stack space for registers that will hold data for
       the exception handler.  */
!   if (DO_FRAME_NOTES && crtl->calls_eh_return)
      {
        unsigned int i;
  
*************** hppa_expand_prologue (void)
*** 3679,3685 ****
    /* Save RP first.  The calling conventions manual states RP will
       always be stored into the caller's frame at sp - 20 or sp - 16
       depending on which ABI is in use.  */
!   if (df_regs_ever_live_p (2) || current_function_calls_eh_return)
      {
        store_reg (2, TARGET_64BIT ? -16 : -20, STACK_POINTER_REGNUM);
        rp_saved = true;
--- 3679,3685 ----
    /* Save RP first.  The calling conventions manual states RP will
       always be stored into the caller's frame at sp - 20 or sp - 16
       depending on which ABI is in use.  */
!   if (df_regs_ever_live_p (2) || crtl->calls_eh_return)
      {
        store_reg (2, TARGET_64BIT ? -16 : -20, STACK_POINTER_REGNUM);
        rp_saved = true;
*************** hppa_expand_prologue (void)
*** 3779,3785 ****
        /* Saving the EH return data registers in the frame is the simplest
  	 way to get the frame unwind information emitted.  We put them
  	 just before the general registers.  */
!       if (DO_FRAME_NOTES && current_function_calls_eh_return)
  	{
  	  unsigned int i, regno;
  
--- 3779,3785 ----
        /* Saving the EH return data registers in the frame is the simplest
  	 way to get the frame unwind information emitted.  We put them
  	 just before the general registers.  */
!       if (DO_FRAME_NOTES && crtl->calls_eh_return)
  	{
  	  unsigned int i, regno;
  
*************** hppa_expand_prologue (void)
*** 3811,3817 ****
  
        /* Saving the EH return data registers in the frame is the simplest
           way to get the frame unwind information emitted.  */
!       if (DO_FRAME_NOTES && current_function_calls_eh_return)
  	{
  	  unsigned int i, regno;
  
--- 3811,3817 ----
  
        /* Saving the EH return data registers in the frame is the simplest
           way to get the frame unwind information emitted.  */
!       if (DO_FRAME_NOTES && crtl->calls_eh_return)
  	{
  	  unsigned int i, regno;
  
*************** hppa_expand_epilogue (void)
*** 4113,4119 ****
  
        /* If the current function calls __builtin_eh_return, then we need
           to restore the saved EH data registers.  */
!       if (DO_FRAME_NOTES && current_function_calls_eh_return)
  	{
  	  unsigned int i, regno;
  
--- 4113,4119 ----
  
        /* If the current function calls __builtin_eh_return, then we need
           to restore the saved EH data registers.  */
!       if (DO_FRAME_NOTES && crtl->calls_eh_return)
  	{
  	  unsigned int i, regno;
  
*************** hppa_expand_epilogue (void)
*** 4141,4147 ****
  
        /* If the current function calls __builtin_eh_return, then we need
           to restore the saved EH data registers.  */
!       if (DO_FRAME_NOTES && current_function_calls_eh_return)
  	{
  	  unsigned int i, regno;
  
--- 4141,4147 ----
  
        /* If the current function calls __builtin_eh_return, then we need
           to restore the saved EH data registers.  */
!       if (DO_FRAME_NOTES && crtl->calls_eh_return)
  	{
  	  unsigned int i, regno;
  
*************** hppa_expand_epilogue (void)
*** 4238,4244 ****
    if (ret_off != 0)
      load_reg (2, ret_off, STACK_POINTER_REGNUM);
  
!   if (DO_FRAME_NOTES && current_function_calls_eh_return)
      {
        rtx sa = EH_RETURN_STACKADJ_RTX;
  
--- 4238,4244 ----
    if (ret_off != 0)
      load_reg (2, ret_off, STACK_POINTER_REGNUM);
  
!   if (DO_FRAME_NOTES && crtl->calls_eh_return)
      {
        rtx sa = EH_RETURN_STACKADJ_RTX;
  
*************** borx_reg_operand (rtx op, enum machine_m
*** 8496,8502 ****
       profitable to do so when the frame pointer is being eliminated.  */
    if (!reload_completed
        && flag_omit_frame_pointer
!       && !current_function_calls_alloca
        && op == frame_pointer_rtx)
      return 0;
  
--- 8496,8502 ----
       profitable to do so when the frame pointer is being eliminated.  */
    if (!reload_completed
        && flag_omit_frame_pointer
!       && !cfun->calls_alloca
        && op == frame_pointer_rtx)
      return 0;
  
Index: config/pa/pa.h
===================================================================
*** config/pa/pa.h	(revision 134640)
--- config/pa/pa.h	(working copy)
*************** typedef struct machine_function GTY(())
*** 366,378 ****
  
  /* Value should be nonzero if functions must have frame pointers.  */
  #define FRAME_POINTER_REQUIRED \
!   (current_function_calls_alloca)
  
  /* Don't allow hard registers to be renamed into r2 unless r2
     is already live or already being saved (due to eh).  */
  
  #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
!   ((NEW_REG) != 2 || df_regs_ever_live_p (2) || current_function_calls_eh_return)
  
  /* C statement to store the difference between the frame pointer
     and the stack pointer values immediately after the function prologue.
--- 366,378 ----
  
  /* Value should be nonzero if functions must have frame pointers.  */
  #define FRAME_POINTER_REQUIRED \
!   (cfun->calls_alloca)
  
  /* Don't allow hard registers to be renamed into r2 unless r2
     is already live or already being saved (due to eh).  */
  
  #define HARD_REGNO_RENAME_OK(OLD_REG, NEW_REG) \
!   ((NEW_REG) != 2 || df_regs_ever_live_p (2) || crtl->calls_eh_return)
  
  /* C statement to store the difference between the frame pointer
     and the stack pointer values immediately after the function prologue.
*************** extern int may_call_alloca;
*** 791,797 ****
  
  #define EXIT_IGNORE_STACK	\
   (get_frame_size () != 0	\
!   || current_function_calls_alloca || crtl->outgoing_args_size)
  
  /* Output assembler code for a block containing the constant parts
     of a trampoline, leaving space for the variable parts.\
--- 791,797 ----
  
  #define EXIT_IGNORE_STACK	\
   (get_frame_size () != 0	\
!   || cfun->calls_alloca || crtl->outgoing_args_size)
  
  /* Output assembler code for a block containing the constant parts
     of a trampoline, leaving space for the variable parts.\
Index: config/mips/mips.c
===================================================================
*** config/mips/mips.c	(revision 134640)
--- config/mips/mips.c	(working copy)
*************** mips_global_pointer (void)
*** 7656,7667 ****
  
    /* FUNCTION_PROFILER includes a jal macro, so we need to give it
       a valid gp.  */
!   if (current_function_profile)
      return GLOBAL_POINTER_REGNUM;
  
    /* If the function has a nonlocal goto, $gp must hold the correct
       global pointer for the target function.  */
!   if (current_function_has_nonlocal_goto)
      return GLOBAL_POINTER_REGNUM;
  
    /* If the gp is never referenced, there's no need to initialize it.
--- 7656,7667 ----
  
    /* FUNCTION_PROFILER includes a jal macro, so we need to give it
       a valid gp.  */
!   if (crtl->profile)
      return GLOBAL_POINTER_REGNUM;
  
    /* If the function has a nonlocal goto, $gp must hold the correct
       global pointer for the target function.  */
!   if (crtl->has_nonlocal_goto)
      return GLOBAL_POINTER_REGNUM;
  
    /* If the gp is never referenced, there's no need to initialize it.
*************** mips_global_pointer (void)
*** 7678,7684 ****
       In cases like these, reload will have added the constant to the pool
       but no instruction will yet refer to it.  */
    if (!df_regs_ever_live_p (GLOBAL_POINTER_REGNUM)
!       && !current_function_uses_const_pool
        && !mips_function_has_gp_insn ())
      return 0;
  
--- 7678,7684 ----
       In cases like these, reload will have added the constant to the pool
       but no instruction will yet refer to it.  */
    if (!df_regs_ever_live_p (GLOBAL_POINTER_REGNUM)
!       && !crtl->uses_const_pool
        && !mips_function_has_gp_insn ())
      return 0;
  
*************** mips_save_reg_p (unsigned int regno)
*** 7719,7725 ****
      return TARGET_CALL_SAVED_GP && cfun->machine->global_pointer == regno;
  
    /* Check call-saved registers.  */
!   if ((current_function_saves_all_registers || df_regs_ever_live_p (regno))
        && !call_really_used_regs[regno])
      return true;
  
--- 7719,7725 ----
      return TARGET_CALL_SAVED_GP && cfun->machine->global_pointer == regno;
  
    /* Check call-saved registers.  */
!   if ((crtl->saves_all_registers || df_regs_ever_live_p (regno))
        && !call_really_used_regs[regno])
      return true;
  
*************** mips_save_reg_p (unsigned int regno)
*** 7737,7743 ****
      return true;
  
    /* Check for registers that must be saved for FUNCTION_PROFILER.  */
!   if (current_function_profile && MIPS_SAVE_REG_FOR_PROFILING_P (regno))
      return true;
  
    /* We need to save the incoming return address if it is ever clobbered
--- 7737,7743 ----
      return true;
  
    /* Check for registers that must be saved for FUNCTION_PROFILER.  */
!   if (crtl->profile && MIPS_SAVE_REG_FOR_PROFILING_P (regno))
      return true;
  
    /* We need to save the incoming return address if it is ever clobbered
*************** mips_save_reg_p (unsigned int regno)
*** 7746,7752 ****
       value in FPRs.  */
    if (regno == GP_REG_FIRST + 31
        && (df_regs_ever_live_p (regno)
! 	  || current_function_calls_eh_return
  	  || mips16_cfun_returns_in_fpr_p ()))
      return true;
  
--- 7746,7752 ----
       value in FPRs.  */
    if (regno == GP_REG_FIRST + 31
        && (df_regs_ever_live_p (regno)
! 	  || crtl->calls_eh_return
  	  || mips16_cfun_returns_in_fpr_p ()))
      return true;
  
*************** mips_compute_frame_info (void)
*** 7837,7843 ****
  	 allocate the stack and have 0 for STACK_DYNAMIC_OFFSET, since it
  	 looks like we are trying to create a second frame pointer to the
  	 function, so allocate some stack space to make it happy.  */
!       if (current_function_calls_alloca)
  	frame->args_size = REG_PARM_STACK_SPACE (cfun->decl);
        else
  	frame->args_size = 0;
--- 7837,7843 ----
  	 allocate the stack and have 0 for STACK_DYNAMIC_OFFSET, since it
  	 looks like we are trying to create a second frame pointer to the
  	 function, so allocate some stack space to make it happy.  */
!       if (cfun->calls_alloca)
  	frame->args_size = REG_PARM_STACK_SPACE (cfun->decl);
        else
  	frame->args_size = 0;
*************** mips_compute_frame_info (void)
*** 7864,7870 ****
  
    /* If this function calls eh_return, we must also save and restore the
       EH data registers.  */
!   if (current_function_calls_eh_return)
      for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; i++)
        {
  	frame->num_gp++;
--- 7864,7870 ----
  
    /* If this function calls eh_return, we must also save and restore the
       EH data registers.  */
!   if (crtl->calls_eh_return)
      for (i = 0; EH_RETURN_DATA_REGNO (i) != INVALID_REGNUM; i++)
        {
  	frame->num_gp++;
*************** mips_frame_pointer_required (void)
*** 7952,7958 ****
  {
    /* If the function contains dynamic stack allocations, we need to
       use the frame pointer to access the static parts of the frame.  */
!   if (current_function_calls_alloca)
      return true;
  
    /* In MIPS16 mode, we need a frame pointer for a large frame; otherwise,
--- 7952,7958 ----
  {
    /* If the function contains dynamic stack allocations, we need to
       use the frame pointer to access the static parts of the frame.  */
!   if (cfun->calls_alloca)
      return true;
  
    /* In MIPS16 mode, we need a frame pointer for a large frame; otherwise,
*************** mips_expand_prologue (void)
*** 8489,8495 ****
  
    /* If we are profiling, make sure no instructions are scheduled before
       the call to mcount.  */
!   if (current_function_profile)
      emit_insn (gen_blockage ());
  }
  
--- 8489,8495 ----
  
    /* If we are profiling, make sure no instructions are scheduled before
       the call to mcount.  */
!   if (crtl->profile)
      emit_insn (gen_blockage ());
  }
  
*************** mips_expand_epilogue (bool sibcall_p)
*** 8627,8633 ****
  
    /* Add in the __builtin_eh_return stack adjustment.  We need to
       use a temporary in MIPS16 code.  */
!   if (current_function_calls_eh_return)
      {
        if (TARGET_MIPS16)
  	{
--- 8627,8633 ----
  
    /* Add in the __builtin_eh_return stack adjustment.  We need to
       use a temporary in MIPS16 code.  */
!   if (crtl->calls_eh_return)
      {
        if (TARGET_MIPS16)
  	{
*************** mips_can_use_return_insn (void)
*** 8669,8675 ****
    if (!reload_completed)
      return false;
  
!   if (current_function_profile)
      return false;
  
    /* In MIPS16 mode, a function that returns a floating-point value
--- 8669,8675 ----
    if (!reload_completed)
      return false;
  
!   if (crtl->profile)
      return false;
  
    /* In MIPS16 mode, a function that returns a floating-point value
*************** mips_reorg_process_insns (void)
*** 11475,11481 ****
  
    /* Profiled functions can't be all noreorder because the profiler
       support uses assembler macros.  */
!   if (current_function_profile)
      cfun->machine->all_noreorder_p = false;
  
    /* Code compiled with -mfix-vr4120 can't be all noreorder because
--- 11475,11481 ----
  
    /* Profiled functions can't be all noreorder because the profiler
       support uses assembler macros.  */
!   if (crtl->profile)
      cfun->machine->all_noreorder_p = false;
  
    /* Code compiled with -mfix-vr4120 can't be all noreorder because
Index: config/v850/v850.c
===================================================================
*** config/v850/v850.c	(revision 134640)
--- config/v850/v850.c	(working copy)
*************** compute_register_save_size (long * p_reg
*** 1386,1392 ****
    long reg_saved = 0;
  
    /* Count the return pointer if we need to save it.  */
!   if (current_function_profile && !call_p)
      {
        df_set_regs_ever_live (LINK_POINTER_REGNUM, true);
        call_p = 1;
--- 1386,1392 ----
    long reg_saved = 0;
  
    /* Count the return pointer if we need to save it.  */
!   if (crtl->profile && !call_p)
      {
        df_set_regs_ever_live (LINK_POINTER_REGNUM, true);
        call_p = 1;
Index: config/mmix/mmix.h
===================================================================
*** config/mmix/mmix.h	(revision 134640)
--- config/mmix/mmix.h	(working copy)
*************** enum reg_class
*** 591,597 ****
  /* Node: Elimination */
  /* FIXME: Is this requirement built-in?  Anyway, we should try to get rid
     of it; we can deduce the value.  */
! #define FRAME_POINTER_REQUIRED  current_function_has_nonlocal_label
  
  /* The frame-pointer is stored in a location that either counts to the
     offset of incoming parameters, or that counts to the offset of the
--- 591,597 ----
  /* Node: Elimination */
  /* FIXME: Is this requirement built-in?  Anyway, we should try to get rid
     of it; we can deduce the value.  */
! #define FRAME_POINTER_REQUIRED  cfun->has_nonlocal_label
  
  /* The frame-pointer is stored in a location that either counts to the
     offset of incoming parameters, or that counts to the offset of the
Index: config/mmix/mmix.c
===================================================================
*** config/mmix/mmix.c	(revision 134640)
--- config/mmix/mmix.c	(working copy)
*************** along with GCC; see the file COPYING3.  
*** 69,75 ****
        || !leaf_function_p ()))
  
  #define IS_MMIX_EH_RETURN_DATA_REG(REGNO)	\
!  (current_function_calls_eh_return		\
    && (EH_RETURN_DATA_REGNO (0) == REGNO		\
        || EH_RETURN_DATA_REGNO (1) == REGNO	\
        || EH_RETURN_DATA_REGNO (2) == REGNO	\
--- 69,75 ----
        || !leaf_function_p ()))
  
  #define IS_MMIX_EH_RETURN_DATA_REG(REGNO)	\
!  (crtl->calls_eh_return		\
    && (EH_RETURN_DATA_REGNO (0) == REGNO		\
        || EH_RETURN_DATA_REGNO (1) == REGNO	\
        || EH_RETURN_DATA_REGNO (2) == REGNO	\
*************** along with GCC; see the file COPYING3.  
*** 96,102 ****
  #define MMIX_POP_ARGUMENT()						\
   ((! TARGET_ABI_GNU							\
     && crtl->return_rtx != NULL				\
!    && ! current_function_returns_struct)				\
    ? (GET_CODE (crtl->return_rtx) == PARALLEL			\
       ? GET_NUM_ELEM (XVEC (crtl->return_rtx, 0)) : 1)	\
    : 0)
--- 96,102 ----
  #define MMIX_POP_ARGUMENT()						\
   ((! TARGET_ABI_GNU							\
     && crtl->return_rtx != NULL				\
!    && ! cfun->returns_struct)				\
    ? (GET_CODE (crtl->return_rtx) == PARALLEL			\
       ? GET_NUM_ELEM (XVEC (crtl->return_rtx, 0)) : 1)	\
    : 0)
*************** mmix_expand_epilogue (void)
*** 2207,2213 ****
    if (stack_space_to_deallocate != 0)
      mmix_emit_sp_add (stack_space_to_deallocate);
  
!   if (current_function_calls_eh_return)
      /* Adjust the (normal) stack-pointer to that of the receiver.
         FIXME: It would be nice if we could also adjust the register stack
         here, but we need to express it through DWARF 2 too.  */
--- 2207,2213 ----
    if (stack_space_to_deallocate != 0)
      mmix_emit_sp_add (stack_space_to_deallocate);
  
!   if (crtl->calls_eh_return)
      /* Adjust the (normal) stack-pointer to that of the receiver.
         FIXME: It would be nice if we could also adjust the register stack
         here, but we need to express it through DWARF 2 too.  */
Index: config/bfin/bfin.c
===================================================================
*** config/bfin/bfin.c	(revision 134640)
--- config/bfin/bfin.c	(working copy)
*************** legitimize_pic_address (rtx orig, rtx re
*** 307,313 ****
  
        emit_move_insn (reg, new);
        if (picreg == pic_offset_table_rtx)
! 	current_function_uses_pic_offset_table = 1;
        return reg;
      }
  
--- 307,313 ----
  
        emit_move_insn (reg, new);
        if (picreg == pic_offset_table_rtx)
! 	crtl->uses_pic_offset_table = 1;
        return reg;
      }
  
*************** must_save_p (bool is_inthandler, unsigne
*** 364,370 ****
    if (D_REGNO_P (regno))
      {
        bool is_eh_return_reg = false;
!       if (current_function_calls_eh_return)
  	{
  	  unsigned j;
  	  for (j = 0; ; j++)
--- 364,370 ----
    if (D_REGNO_P (regno))
      {
        bool is_eh_return_reg = false;
!       if (crtl->calls_eh_return)
  	{
  	  unsigned j;
  	  for (j = 0; ; j++)
*************** must_save_p (bool is_inthandler, unsigne
*** 389,395 ****
  	       && (is_inthandler || !call_used_regs[regno]))
  	      || (!TARGET_FDPIC
  		  && regno == PIC_OFFSET_TABLE_REGNUM
! 		  && (current_function_uses_pic_offset_table
  		      || (TARGET_ID_SHARED_LIBRARY && !current_function_is_leaf))));
      }
    else
--- 389,395 ----
  	       && (is_inthandler || !call_used_regs[regno]))
  	      || (!TARGET_FDPIC
  		  && regno == PIC_OFFSET_TABLE_REGNUM
! 		  && (crtl->uses_pic_offset_table
  		      || (TARGET_ID_SHARED_LIBRARY && !current_function_is_leaf))));
      }
    else
*************** stack_frame_needed_p (void)
*** 452,458 ****
  {
    /* EH return puts a new return address into the frame using an
       address relative to the frame pointer.  */
!   if (current_function_calls_eh_return)
      return true;
    return frame_pointer_needed;
  }
--- 452,458 ----
  {
    /* EH return puts a new return address into the frame using an
       address relative to the frame pointer.  */
!   if (crtl->calls_eh_return)
      return true;
    return frame_pointer_needed;
  }
*************** add_to_reg (rtx reg, HOST_WIDE_INT value
*** 854,860 ****
  	    if ((df_regs_ever_live_p (i) && ! call_used_regs[i])
  		|| (!TARGET_FDPIC
  		    && i == PIC_OFFSET_TABLE_REGNUM
! 		    && (current_function_uses_pic_offset_table
  			|| (TARGET_ID_SHARED_LIBRARY
  			    && ! current_function_is_leaf))))
  	      break;
--- 854,860 ----
  	    if ((df_regs_ever_live_p (i) && ! call_used_regs[i])
  		|| (!TARGET_FDPIC
  		    && i == PIC_OFFSET_TABLE_REGNUM
! 		    && (crtl->uses_pic_offset_table
  			|| (TARGET_ID_SHARED_LIBRARY
  			    && ! current_function_is_leaf))))
  	      break;
*************** bfin_expand_prologue (void)
*** 1167,1179 ****
        return;
      }
  
!   if (current_function_limit_stack
        || TARGET_STACK_CHECK_L1)
      {
        HOST_WIDE_INT offset
  	= bfin_initial_elimination_offset (ARG_POINTER_REGNUM,
  					   STACK_POINTER_REGNUM);
!       rtx lim = current_function_limit_stack ? stack_limit_rtx : NULL_RTX;
        rtx p2reg = gen_rtx_REG (Pmode, REG_P2);
  
        if (!lim)
--- 1167,1179 ----
        return;
      }
  
!   if (crtl->limit_stack
        || TARGET_STACK_CHECK_L1)
      {
        HOST_WIDE_INT offset
  	= bfin_initial_elimination_offset (ARG_POINTER_REGNUM,
  					   STACK_POINTER_REGNUM);
!       rtx lim = crtl->limit_stack ? stack_limit_rtx : NULL_RTX;
        rtx p2reg = gen_rtx_REG (Pmode, REG_P2);
  
        if (!lim)
*************** bfin_expand_prologue (void)
*** 1219,1225 ****
  
    if (TARGET_ID_SHARED_LIBRARY
        && !TARGET_SEP_DATA
!       && (current_function_uses_pic_offset_table
  	  || !current_function_is_leaf))
      bfin_load_pic_reg (pic_offset_table_rtx);
  }
--- 1219,1225 ----
  
    if (TARGET_ID_SHARED_LIBRARY
        && !TARGET_SEP_DATA
!       && (crtl->uses_pic_offset_table
  	  || !current_function_is_leaf))
      bfin_load_pic_reg (pic_offset_table_rtx);
  }
Index: stmt.c
===================================================================
*** stmt.c	(revision 134640)
--- stmt.c	(working copy)
*************** expand_asm_operands (tree string, tree o
*** 1077,1083 ****
      if (real_output_rtx[i])
        emit_move_insn (real_output_rtx[i], output_rtx[i]);
  
!   cfun->has_asm_statement = 1;
    free_temp_slots ();
  }
  
--- 1077,1083 ----
      if (real_output_rtx[i])
        emit_move_insn (real_output_rtx[i], output_rtx[i]);
  
!   crtl->has_asm_statement = 1;
    free_temp_slots ();
  }
  
Index: reload1.c
===================================================================
*** reload1.c	(revision 134640)
--- reload1.c	(working copy)
*************** reload (rtx first, int global)
*** 742,752 ****
    /* A function that has a nonlocal label that can reach the exit
       block via non-exceptional paths must save all call-saved
       registers.  */
!   if (current_function_has_nonlocal_label
        && has_nonexceptional_receiver ())
!     current_function_saves_all_registers = 1;
  
!   if (current_function_saves_all_registers)
      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
        if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
  	df_set_regs_ever_live (i, true);
--- 742,752 ----
    /* A function that has a nonlocal label that can reach the exit
       block via non-exceptional paths must save all call-saved
       registers.  */
!   if (cfun->has_nonlocal_label
        && has_nonexceptional_receiver ())
!     crtl->saves_all_registers = 1;
  
!   if (crtl->saves_all_registers)
      for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
        if (! call_used_regs[i] && ! fixed_regs[i] && ! LOCAL_REGNO (i))
  	df_set_regs_ever_live (i, true);
*************** init_elim_table (void)
*** 3721,3729 ****
  			     the frame pointer in that case.  At some point,
  			     we should improve this by emitting the
  			     sp-adjusting insns for this case.  */
! 			  || (current_function_calls_alloca
  			      && EXIT_IGNORE_STACK)
! 			  || current_function_accesses_prior_frames
  			  || FRAME_POINTER_REQUIRED);
  
    num_eliminable = 0;
--- 3721,3729 ----
  			     the frame pointer in that case.  At some point,
  			     we should improve this by emitting the
  			     sp-adjusting insns for this case.  */
! 			  || (cfun->calls_alloca
  			      && EXIT_IGNORE_STACK)
! 			  || crtl->accesses_prior_frames
  			  || FRAME_POINTER_REQUIRED);
  
    num_eliminable = 0;


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