explow.c (optimize_save_area_alloca): Do not accept parameters.

2004-07-08  Paolo Bonzini  <bonzini@gnu.org>

	* explow.c (optimize_save_area_alloca): Do not accept parameters.
	* passes.c (rest_of_handle_final): Handle symout.
	(rest_of_handle_new_regalloc, rest_of_handle_old_regalloc):
	Push timevar here.
	(rest_of_handle_sched): Break out SMS.  Remove ifs for
	flag_schedule_insns and flag_modulo_sched.
	(rest_of_handle_addressof, rest_of_handle_cse2): Garbage
	collect at the end.
	(rest_of_handle_gcse2): Put under timevar TV_RELOAD_CSE_REGS.
	(rest_of_handle_partition_blocks, rest_of_handle_sms,
	rest_of_handle_if_after_reload, rest_of_handle_peephole2,
	rest_of_handle_mode_switching, rest_of_handle_jump,
	rest_of_handle_guess_branch_prob, rest_of_handle_eh,
	rest_of_handle_jump2, rest_of_handle_postreload,
	rest_of_handle_flow2, rest_of_clean_state,
	rest_of_handle_shorten_branches,
	rest_of_handle_prologue_epilogue,
	rest_of_handle_branch_target_load_optimize): New.
	(rest_of_compilation): Call the above.  Remove ggc_collect
	calls moved to rest_of_handle_*.
	* rtl.h (optimize_save_area_alloca): Do not accept parameters.

	* dwarf2out.c (dwarf2out_begin_prologue): Use TREE_NOTHROW.
	* except.c (set_nothrow_function_flags): Set TREE_NOTHROW.
	* except.h (set_nothrow_function_flags): Update comment.
	* function.c (current_function_nothrow): Remove.
	* output.h (current_function_nothrow): Remove.
	* passes.c (rest_of_compilation): Do not set TREE_NOTHROW.
	* config/arm/arm.c (arm_compute_func_type): Use TREE_NOTHROW.

From-SVN: r84274
This commit is contained in:
Paolo Bonzini 2004-07-08 07:42:02 +00:00 committed by Paolo Bonzini
parent b9185691da
commit 97b0ade303
10 changed files with 629 additions and 523 deletions

View File

@ -1,3 +1,35 @@
2004-07-08 Paolo Bonzini <bonzini@gnu.org>
* explow.c (optimize_save_area_alloca): Do not accept parameters.
* passes.c (rest_of_handle_final): Handle symout.
(rest_of_handle_new_regalloc, rest_of_handle_old_regalloc):
Push timevar here.
(rest_of_handle_sched): Break out SMS. Remove ifs for
flag_schedule_insns and flag_modulo_sched.
(rest_of_handle_addressof, rest_of_handle_cse2): Garbage
collect at the end.
(rest_of_handle_gcse2): Put under timevar TV_RELOAD_CSE_REGS.
(rest_of_handle_partition_blocks, rest_of_handle_sms,
rest_of_handle_if_after_reload, rest_of_handle_peephole2,
rest_of_handle_mode_switching, rest_of_handle_jump,
rest_of_handle_guess_branch_prob, rest_of_handle_eh,
rest_of_handle_jump2, rest_of_handle_postreload,
rest_of_handle_flow2, rest_of_clean_state,
rest_of_handle_shorten_branches,
rest_of_handle_prologue_epilogue,
rest_of_handle_branch_target_load_optimize): New.
(rest_of_compilation): Call the above. Remove ggc_collect
calls moved to rest_of_handle_*.
* rtl.h (optimize_save_area_alloca): Do not accept parameters.
* dwarf2out.c (dwarf2out_begin_prologue): Use TREE_NOTHROW.
* except.c (set_nothrow_function_flags): Set TREE_NOTHROW.
* except.h (set_nothrow_function_flags): Update comment.
* function.c (current_function_nothrow): Remove.
* output.h (current_function_nothrow): Remove.
* passes.c (rest_of_compilation): Do not set TREE_NOTHROW.
* config/arm/arm.c (arm_compute_func_type): Use TREE_NOTHROW.
2004-07-08 Eric Botcazou <ebotcazou@libertysurf.fr>
PR bootstrap/16326

View File

@ -1110,7 +1110,7 @@ arm_compute_func_type (void)
register values that will never be needed again. This optimization
was added to speed up context switching in a kernel application. */
if (optimize > 0
&& current_function_nothrow
&& TREE_NOTHROW (current_function_decl)
&& TREE_THIS_VOLATILE (current_function_decl))
type |= ARM_FT_VOLATILE;

View File

@ -2406,7 +2406,7 @@ dwarf2out_begin_prologue (unsigned int line ATTRIBUTE_UNUSED,
fde->dw_fde_end = NULL;
fde->dw_fde_cfi = NULL;
fde->funcdef_number = current_function_funcdef_no;
fde->nothrow = current_function_nothrow;
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;

View File

@ -3188,14 +3188,14 @@ can_throw_external (rtx insn)
return can_throw_external_1 (INTVAL (XEXP (note, 0)));
}
/* Set current_function_nothrow and cfun->all_throwers_are_sibcalls. */
/* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls. */
void
set_nothrow_function_flags (void)
{
rtx insn;
current_function_nothrow = 1;
TREE_NOTHROW (current_function_decl) = 1;
/* Assume cfun->all_throwers_are_sibcalls until we encounter
something that can throw an exception. We specifically exempt
@ -3211,7 +3211,7 @@ set_nothrow_function_flags (void)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (can_throw_external (insn))
{
current_function_nothrow = 0;
TREE_NOTHROW (current_function_decl) = 0;
if (GET_CODE (insn) != CALL_INSN || !SIBLING_CALL_P (insn))
{
@ -3224,7 +3224,7 @@ set_nothrow_function_flags (void)
insn = XEXP (insn, 1))
if (can_throw_external (insn))
{
current_function_nothrow = 0;
TREE_NOTHROW (current_function_decl) = 0;
if (GET_CODE (insn) != CALL_INSN || !SIBLING_CALL_P (insn))
{

View File

@ -99,7 +99,7 @@ extern bool can_throw_internal (rtx);
extern bool can_throw_external_1 (int);
extern bool can_throw_external (rtx);
/* Set current_function_nothrow and cfun->all_throwers_are_sibcalls. */
/* Set TREE_NOTHROW and cfun->all_throwers_are_sibcalls. */
extern void set_nothrow_function_flags (void);
/* After initial rtl generation, call back to finish generating

View File

@ -1110,11 +1110,11 @@ update_nonlocal_goto_save_area (void)
frame, thus causing a crash if a longjmp unwinds to it. */
void
optimize_save_area_alloca (rtx insns)
optimize_save_area_alloca (void)
{
rtx insn;
for (insn = insns; insn; insn = NEXT_INSN(insn))
for (insn = get_insns (); insn; insn = NEXT_INSN(insn))
{
rtx note;

View File

@ -103,11 +103,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
compiler passes. */
int current_function_is_leaf;
/* Nonzero if function being compiled doesn't contain any instructions
that can throw an exception. This is set prior to final. */
int current_function_nothrow;
/* Nonzero if function being compiled doesn't modify the stack pointer
(ignoring the prologue and epilogue). This is only valid after
life_analysis has run. */

View File

@ -399,11 +399,6 @@ extern const char *weak_global_object_name;
extern int current_function_is_leaf;
/* Nonzero if function being compiled doesn't contain any instructions
that can throw an exception. This is set prior to final. */
extern int current_function_nothrow;
/* Nonzero if function being compiled doesn't modify the stack pointer
(ignoring the prologue and epilogue). This is only valid after
life_analysis has run. */

File diff suppressed because it is too large Load Diff

View File

@ -1581,7 +1581,7 @@ extern void set_stack_check_libfunc (rtx);
extern HOST_WIDE_INT trunc_int_for_mode (HOST_WIDE_INT, enum machine_mode);
extern rtx plus_constant_wide (rtx, HOST_WIDE_INT);
extern rtx plus_constant_for_output_wide (rtx, HOST_WIDE_INT);
extern void optimize_save_area_alloca (rtx);
extern void optimize_save_area_alloca (void);
/* In emit-rtl.c */
extern rtvec gen_rtvec (int, ...);