This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFA] More rest_of_compilation simplifications
- From: Paolo Bonzini <bonzini at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jun 2004 11:56:27 +0200
- Subject: Re: [RFA] More rest_of_compilation simplifications
- References: <40D15A82.1000002@polimi.it>
! tree current_function_decl = current_function_decl;
! rtx get_insns ();
Obviously wrong, I attached the wrong version of the patch. Okay to
commit *this* one?
Paolo
2004-06-17 Paolo Bonzini <bonzini@gnu.org>
* emit-rtl.c (unshare_all_rtl_1): New name of unshare_all_rtl.
(unshare_all_rtl_again): Call unshare_all_rtl_1.
(unshare_all_rtl): New.
* final.c (shorten_branches): Remove parameter.
* function.c (instantiate_virtual_regs): Remove parameters.
* function.h (instantiate_virtual_regs): Add prototype.
* genattr.c (gen_attr): Fix shorten_branches prototype.
* output.h (shorten_branches): Fix prototype.
* rtl.h (unshare_all_rtl): Add prototype.
* tree.h (instantiate_virtual_regs, unshare_all_rtl): Remove
prototype.
* passes.c: Remove assertions on the parameters to
rest_of_handle_* functions. Remove the parameters to
the functions, replacing decl with current_function_decl
and insns with get_insns ().
Index: emit-rtl.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/emit-rtl.c,v
retrieving revision 1.394
diff -u -r1.394 emit-rtl.c
--- emit-rtl.c 15 Jun 2004 18:02:16 -0000 1.394
+++ emit-rtl.c 17 Jun 2004 07:57:02 -0000
@@ -2148,8 +2148,8 @@
/* Go through all the RTL insn bodies and copy any invalid shared
structure. This routine should only be called once. */
-void
-unshare_all_rtl (tree fndecl, rtx insn)
+static void
+unshare_all_rtl_1 (tree fndecl, rtx insn)
{
tree decl;
@@ -2200,7 +2200,13 @@
reset_used_flags (stack_slot_list);
- unshare_all_rtl (cfun->decl, insn);
+ unshare_all_rtl_1 (cfun->decl, insn);
+}
+
+void
+unshare_all_rtl (void)
+{
+ unshare_all_rtl_1 (current_function_decl, get_insns ());
}
/* Check that ORIG is not marked when it should not be and mark ORIG as in use,
Index: final.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/final.c,v
retrieving revision 1.315
diff -u -r1.315 final.c
--- final.c 15 Jun 2004 18:02:19 -0000 1.315
+++ final.c 17 Jun 2004 07:57:03 -0000
@@ -746,13 +746,14 @@
slots. */
void
-shorten_branches (rtx first ATTRIBUTE_UNUSED)
+shorten_branches (void)
{
rtx insn;
int max_uid;
int i;
int max_log;
int max_skip;
+ rtx first = get_insns ();
#ifdef HAVE_ATTR_length
#define MAX_CODE_ALIGN 16
rtx seq;
@@ -804,7 +805,7 @@
max_log = 0;
max_skip = 0;
- for (insn = get_insns (), i = 1; insn; insn = NEXT_INSN (insn))
+ for (insn = first, i = 1; insn; insn = NEXT_INSN (insn))
{
int log;
Index: function.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.c,v
retrieving revision 1.524
diff -u -r1.524 function.c
--- function.c 15 Jun 2004 18:02:21 -0000 1.524
+++ function.c 17 Jun 2004 07:57:03 -0000
@@ -3596,30 +3596,30 @@
references to hard register references. */
void
-instantiate_virtual_regs (tree fndecl, rtx insns)
+instantiate_virtual_regs (void)
{
rtx insn;
unsigned int i;
/* Compute the offsets to use for this function. */
- in_arg_offset = FIRST_PARM_OFFSET (fndecl);
+ in_arg_offset = FIRST_PARM_OFFSET (current_function_decl);
var_offset = STARTING_FRAME_OFFSET;
- dynamic_offset = STACK_DYNAMIC_OFFSET (fndecl);
+ dynamic_offset = STACK_DYNAMIC_OFFSET (current_function_decl);
out_arg_offset = STACK_POINTER_OFFSET;
- cfa_offset = ARG_POINTER_CFA_OFFSET (fndecl);
+ cfa_offset = ARG_POINTER_CFA_OFFSET (current_function_decl);
/* Scan all variables and parameters of this function. For each that is
in memory, instantiate all virtual registers if the result is a valid
address. If not, we do it later. That will handle most uses of virtual
regs on many machines. */
- instantiate_decls (fndecl, 1);
+ instantiate_decls (current_function_decl, 1);
/* Initialize recognition, indicating that volatile is OK. */
init_recog ();
/* Scan through all the insns, instantiating every virtual register still
present. */
- for (insn = insns; insn; insn = NEXT_INSN (insn))
+ for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
|| GET_CODE (insn) == CALL_INSN)
{
@@ -3647,7 +3647,7 @@
/* Now instantiate the remaining register equivalences for debugging info.
These will not be valid addresses. */
- instantiate_decls (fndecl, 0);
+ instantiate_decls (current_function_decl, 0);
/* Indicate that, from now on, assign_stack_local should use
frame_pointer_rtx. */
Index: function.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/function.h,v
retrieving revision 1.117
diff -u -r1.117 function.h
--- function.h 15 Jun 2004 12:45:55 -0000 1.117
+++ function.h 17 Jun 2004 07:57:03 -0000
@@ -613,6 +613,7 @@
extern rtx get_arg_pointer_save_area (struct function *);
extern void init_virtual_regs (struct emit_status *);
+extern void instantiate_virtual_regs (void);
/* Returns the name of the current function. */
extern const char *current_function_name (void);
Index: genattr.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/genattr.c,v
retrieving revision 1.62
diff -u -r1.62 genattr.c
--- genattr.c 15 Mar 2004 18:20:39 -0000 1.62
+++ genattr.c 17 Jun 2004 07:57:03 -0000
@@ -117,7 +117,7 @@
if (! strcmp (XSTR (attr, 0), "length"))
{
puts ("\
-extern void shorten_branches (rtx);\n\
+extern void shorten_branches (void);\n\
extern int insn_default_length (rtx);\n\
extern int insn_variable_length_p (rtx);\n\
extern int insn_current_length (rtx);\n\n\
Index: output.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/output.h,v
retrieving revision 1.141
diff -u -r1.141 output.h
--- output.h 19 May 2004 02:11:41 -0000 1.141
+++ output.h 17 Jun 2004 07:57:03 -0000
@@ -51,7 +51,7 @@
/* Make a pass over all insns and compute their actual lengths by shortening
any branches of variable length if possible. */
-extern void shorten_branches (rtx);
+extern void shorten_branches (void);
/* Output assembler code for the start of a function,
and initialize some of the variables in this file
Index: rtl.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/rtl.h,v
retrieving revision 1.479
diff -u -r1.479 rtl.h
--- rtl.h 12 Jun 2004 12:50:42 -0000 1.479
+++ rtl.h 17 Jun 2004 07:57:04 -0000
@@ -2177,6 +2177,7 @@
extern void reverse_comparison (rtx);
extern void set_new_first_and_last_insn (rtx, rtx);
extern void set_new_last_label_num (int);
+extern void unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx);
extern void unshare_all_rtl_in_chain (rtx);
extern void verify_rtl_sharing (void);
Index: tree.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/tree.h,v
retrieving revision 1.515
diff -u -r1.515 tree.h
--- tree.h 16 Jun 2004 05:09:40 -0000 1.515
+++ tree.h 17 Jun 2004 07:57:05 -0000
@@ -3410,8 +3410,6 @@
extern void preserve_rtl_expr_temps (tree);
extern int aggregate_value_p (tree, tree);
extern void free_temps_for_rtl_expr (tree);
-extern void instantiate_virtual_regs (tree, rtx);
-extern void unshare_all_rtl (tree, rtx);
extern void push_function_context (void);
extern void pop_function_context (void);
extern void push_function_context_to (tree);
Index: passes.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/passes.c,v
retrieving revision 2.19
diff -c -r2.19 passes.c
*** passes.c 16 Jun 2004 07:25:52 -0000 2.19
--- passes.c 17 Jun 2004 09:51:06 -0000
***************
*** 429,439 ****
/* Turn the RTL into assembly. */
static void
! rest_of_handle_final (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_FINAL);
{
rtx x;
--- 429,436 ----
/* Turn the RTL into assembly. */
static void
! rest_of_handle_final (void)
{
timevar_push (TV_FINAL);
{
rtx x;
***************
*** 442,448 ****
/* Get the function's name, as described by its RTL. This may be
different from the DECL_NAME name used in the source file. */
! x = DECL_RTL (decl);
if (GET_CODE (x) != MEM)
abort ();
x = XEXP (x, 0);
--- 439,445 ----
/* Get the function's name, as described by its RTL. This may be
different from the DECL_NAME name used in the source file. */
! x = DECL_RTL (current_function_decl);
if (GET_CODE (x) != MEM)
abort ();
x = XEXP (x, 0);
***************
*** 450,458 ****
abort ();
fnname = XSTR (x, 0);
! assemble_start_function (decl, fnname);
! final_start_function (insns, asm_out_file, optimize);
! final (insns, asm_out_file, optimize, 0);
final_end_function ();
#ifdef IA64_UNWIND_INFO
--- 447,455 ----
abort ();
fnname = XSTR (x, 0);
! assemble_start_function (current_function_decl, fnname);
! final_start_function (get_insns (), asm_out_file, optimize);
! final (get_insns (), asm_out_file, optimize, 0);
final_end_function ();
#ifdef IA64_UNWIND_INFO
***************
*** 461,467 ****
output_function_exception_table ();
#endif
! assemble_end_function (decl, fnname);
#ifndef IA64_UNWIND_INFO
/* Otherwise, it feels unclean to switch sections in the middle. */
--- 458,464 ----
output_function_exception_table ();
#endif
! assemble_end_function (current_function_decl, fnname);
#ifndef IA64_UNWIND_INFO
/* Otherwise, it feels unclean to switch sections in the middle. */
***************
*** 485,501 ****
#ifdef DELAY_SLOTS
/* Run delay slot optimization. */
static void
! rest_of_handle_delay_slots (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_DBR_SCHED);
! open_dump_file (DFI_dbr, decl);
! dbr_schedule (insns, dump_file);
! close_dump_file (DFI_dbr, print_rtl, insns);
timevar_pop (TV_DBR_SCHED);
ggc_collect ();
--- 482,495 ----
#ifdef DELAY_SLOTS
/* Run delay slot optimization. */
static void
! rest_of_handle_delay_slots (void)
{
timevar_push (TV_DBR_SCHED);
! open_dump_file (DFI_dbr, current_function_decl);
! dbr_schedule (get_insns (), dump_file);
! close_dump_file (DFI_dbr, print_rtl, get_insns ());
timevar_pop (TV_DBR_SCHED);
ggc_collect ();
***************
*** 506,516 ****
/* Convert register usage from flat register file usage to a stack
register file. */
static void
! rest_of_handle_stack_regs (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
#if defined (HAVE_ATTR_length)
/* If flow2 creates new instructions which need splitting
and scheduling after reload is not done, they might not be
--- 500,507 ----
/* Convert register usage from flat register file usage to a stack
register file. */
static void
! rest_of_handle_stack_regs (void)
{
#if defined (HAVE_ATTR_length)
/* If flow2 creates new instructions which need splitting
and scheduling after reload is not done, they might not be
***************
*** 529,535 ****
#endif
timevar_push (TV_REG_STACK);
! open_dump_file (DFI_stack, decl);
if (reg_to_stack (dump_file) && optimize)
{
--- 520,526 ----
#endif
timevar_push (TV_REG_STACK);
! open_dump_file (DFI_stack, current_function_decl);
if (reg_to_stack (dump_file) && optimize)
{
***************
*** 542,548 ****
}
}
! close_dump_file (DFI_stack, print_rtl_with_bb, insns);
timevar_pop (TV_REG_STACK);
ggc_collect ();
--- 533,539 ----
}
}
! close_dump_file (DFI_stack, print_rtl_with_bb, get_insns ());
timevar_pop (TV_REG_STACK);
ggc_collect ();
***************
*** 551,583 ****
/* Track the variables, ie. compute where the variable is stored at each position in function. */
static void
! rest_of_handle_variable_tracking (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_VAR_TRACKING);
! open_dump_file (DFI_vartrack, decl);
variable_tracking_main ();
! close_dump_file (DFI_vartrack, print_rtl_with_bb, insns);
timevar_pop (TV_VAR_TRACKING);
}
/* Machine independent reorg pass. */
static void
! rest_of_handle_machine_reorg (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_MACH_DEP);
! open_dump_file (DFI_mach, decl);
targetm.machine_dependent_reorg ();
! close_dump_file (DFI_mach, print_rtl, insns);
timevar_pop (TV_MACH_DEP);
ggc_collect ();
--- 542,568 ----
/* Track the variables, ie. compute where the variable is stored at each position in function. */
static void
! rest_of_handle_variable_tracking (void)
{
timevar_push (TV_VAR_TRACKING);
! open_dump_file (DFI_vartrack, current_function_decl);
variable_tracking_main ();
! close_dump_file (DFI_vartrack, print_rtl_with_bb, get_insns ());
timevar_pop (TV_VAR_TRACKING);
}
/* Machine independent reorg pass. */
static void
! rest_of_handle_machine_reorg (void)
{
timevar_push (TV_MACH_DEP);
! open_dump_file (DFI_mach, current_function_decl);
targetm.machine_dependent_reorg ();
! close_dump_file (DFI_mach, print_rtl, get_insns ());
timevar_pop (TV_MACH_DEP);
ggc_collect ();
***************
*** 587,600 ****
/* Run new register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
! rest_of_handle_new_regalloc (tree decl, rtx insns)
{
int failure;
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! delete_trivially_dead_insns (insns, max_reg_num ());
reg_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
--- 572,582 ----
/* Run new register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
! rest_of_handle_new_regalloc (void)
{
int failure;
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
reg_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
***************
*** 608,617 ****
/* XXX clean up the whole mess to bring live info in shape again. */
timevar_push (TV_GLOBAL_ALLOC);
! open_dump_file (DFI_greg, decl);
! build_insn_chain (insns);
! failure = reload (insns, 0);
timevar_pop (TV_GLOBAL_ALLOC);
--- 590,599 ----
/* XXX clean up the whole mess to bring live info in shape again. */
timevar_push (TV_GLOBAL_ALLOC);
! open_dump_file (DFI_greg, current_function_decl);
! build_insn_chain (get_insns ());
! failure = reload (get_insns (), 0);
timevar_pop (TV_GLOBAL_ALLOC);
***************
*** 621,627 ****
dump_global_regs (dump_file);
! close_dump_file (DFI_greg, print_rtl_with_bb, insns);
timevar_pop (TV_DUMP);
}
--- 603,609 ----
dump_global_regs (dump_file);
! close_dump_file (DFI_greg, print_rtl_with_bb, get_insns ());
timevar_pop (TV_DUMP);
}
***************
*** 636,649 ****
/* Run old register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
! rest_of_handle_old_regalloc (tree decl, rtx insns)
{
int failure;
int rebuild_notes;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
/* Allocate the reg_renumber array. */
allocate_reg_info (max_regno, FALSE, TRUE);
--- 618,628 ----
/* Run old register allocator. Return TRUE if we must exit
rest_of_compilation upon return. */
static bool
! rest_of_handle_old_regalloc (void)
{
int failure;
int rebuild_notes;
/* Allocate the reg_renumber array. */
allocate_reg_info (max_regno, FALSE, TRUE);
***************
*** 653,659 ****
allocate_initial_values (reg_equiv_memory_loc);
! regclass (insns, max_reg_num (), dump_file);
rebuild_notes = local_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
--- 632,638 ----
allocate_initial_values (reg_equiv_memory_loc);
! regclass (get_insns (), max_reg_num (), dump_file);
rebuild_notes = local_alloc ();
timevar_pop (TV_LOCAL_ALLOC);
***************
*** 665,671 ****
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (insns);
purge_all_dead_edges (0);
timevar_pop (TV_JUMP);
--- 644,650 ----
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (get_insns ());
purge_all_dead_edges (0);
timevar_pop (TV_JUMP);
***************
*** 678,691 ****
dump_flow_info (dump_file);
dump_local_alloc (dump_file);
! close_dump_file (DFI_lreg, print_rtl_with_bb, insns);
timevar_pop (TV_DUMP);
}
ggc_collect ();
timevar_push (TV_GLOBAL_ALLOC);
! open_dump_file (DFI_greg, decl);
/* If optimizing, allocate remaining pseudo-regs. Do the reload
pass fixing up any insns that are invalid. */
--- 657,670 ----
dump_flow_info (dump_file);
dump_local_alloc (dump_file);
! close_dump_file (DFI_lreg, print_rtl_with_bb, get_insns ());
timevar_pop (TV_DUMP);
}
ggc_collect ();
timevar_push (TV_GLOBAL_ALLOC);
! open_dump_file (DFI_greg, current_function_decl);
/* If optimizing, allocate remaining pseudo-regs. Do the reload
pass fixing up any insns that are invalid. */
***************
*** 694,701 ****
failure = global_alloc (dump_file);
else
{
! build_insn_chain (insns);
! failure = reload (insns, 0);
}
timevar_pop (TV_GLOBAL_ALLOC);
--- 673,680 ----
failure = global_alloc (dump_file);
else
{
! build_insn_chain (get_insns ());
! failure = reload (get_insns (), 0);
}
timevar_pop (TV_GLOBAL_ALLOC);
***************
*** 706,712 ****
dump_global_regs (dump_file);
! close_dump_file (DFI_greg, print_rtl_with_bb, insns);
timevar_pop (TV_DUMP);
}
--- 685,691 ----
dump_global_regs (dump_file);
! close_dump_file (DFI_greg, print_rtl_with_bb, get_insns ());
timevar_pop (TV_DUMP);
}
***************
*** 715,746 ****
/* Run the regrename and cprop passes. */
static void
! rest_of_handle_regrename (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_RENAME_REGISTERS);
! open_dump_file (DFI_rnreg, decl);
if (flag_rename_registers)
regrename_optimize ();
if (flag_cprop_registers)
copyprop_hardreg_forward ();
! close_dump_file (DFI_rnreg, print_rtl_with_bb, insns);
timevar_pop (TV_RENAME_REGISTERS);
}
/* Reorder basic blocks. */
static void
! rest_of_handle_reorder_blocks (tree decl, rtx insns)
{
bool changed;
! open_dump_file (DFI_bbro, decl);
!
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
/* Last attempt to optimize CFG, as scheduling, peepholing and insn
splitting possibly introduced more crossjumping opportunities. */
--- 694,719 ----
/* Run the regrename and cprop passes. */
static void
! rest_of_handle_regrename (void)
{
timevar_push (TV_RENAME_REGISTERS);
! open_dump_file (DFI_rnreg, current_function_decl);
if (flag_rename_registers)
regrename_optimize ();
if (flag_cprop_registers)
copyprop_hardreg_forward ();
! close_dump_file (DFI_rnreg, print_rtl_with_bb, get_insns ());
timevar_pop (TV_RENAME_REGISTERS);
}
/* Reorder basic blocks. */
static void
! rest_of_handle_reorder_blocks (void)
{
bool changed;
! open_dump_file (DFI_bbro, current_function_decl);
/* Last attempt to optimize CFG, as scheduling, peepholing and insn
splitting possibly introduced more crossjumping opportunities. */
***************
*** 764,786 ****
if (changed && HAVE_conditional_execution)
update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
PROP_DEATH_NOTES);
! close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
}
#ifdef INSN_SCHEDULING
/* Run instruction scheduler. */
static void
! rest_of_handle_sched (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_SMS);
if (optimize > 0 && flag_modulo_sched)
{
/* Perform SMS module scheduling. */
! open_dump_file (DFI_sms, decl);
/* We want to be able to create new pseudos. */
no_new_pseudos = 0;
--- 737,756 ----
if (changed && HAVE_conditional_execution)
update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
PROP_DEATH_NOTES);
! close_dump_file (DFI_bbro, print_rtl_with_bb, get_insns ());
}
#ifdef INSN_SCHEDULING
/* Run instruction scheduler. */
static void
! rest_of_handle_sched (void)
{
timevar_push (TV_SMS);
if (optimize > 0 && flag_modulo_sched)
{
/* Perform SMS module scheduling. */
! open_dump_file (DFI_sms, current_function_decl);
/* We want to be able to create new pseudos. */
no_new_pseudos = 0;
***************
*** 804,817 ****
because doing the sched analysis makes some of the dump. */
if (optimize > 0 && flag_schedule_insns)
{
! open_dump_file (DFI_sched, decl);
/* Do control and data sched analysis,
and write some of the results to dump file. */
schedule_insns (dump_file);
! close_dump_file (DFI_sched, print_rtl_with_bb, insns);
}
timevar_pop (TV_SCHED);
--- 774,787 ----
because doing the sched analysis makes some of the dump. */
if (optimize > 0 && flag_schedule_insns)
{
! open_dump_file (DFI_sched, current_function_decl);
/* Do control and data sched analysis,
and write some of the results to dump file. */
schedule_insns (dump_file);
! close_dump_file (DFI_sched, print_rtl_with_bb, get_insns ());
}
timevar_pop (TV_SCHED);
***************
*** 820,832 ****
/* Run second scheduling pass after reload. */
static void
! rest_of_handle_sched2 (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_SCHED2);
! open_dump_file (DFI_sched2, decl);
/* Do control and data sched analysis again,
and write some more of the results to dump file. */
--- 790,799 ----
/* Run second scheduling pass after reload. */
static void
! rest_of_handle_sched2 (void)
{
timevar_push (TV_SCHED2);
! open_dump_file (DFI_sched2, current_function_decl);
/* Do control and data sched analysis again,
and write some more of the results to dump file. */
***************
*** 844,850 ****
else
schedule_insns (dump_file);
! close_dump_file (DFI_sched2, print_rtl_with_bb, insns);
timevar_pop (TV_SCHED2);
ggc_collect ();
--- 811,817 ----
else
schedule_insns (dump_file);
! close_dump_file (DFI_sched2, print_rtl_with_bb, get_insns ());
timevar_pop (TV_SCHED2);
ggc_collect ();
***************
*** 852,868 ****
#endif
static void
! rest_of_handle_gcse2 (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_gcse2, decl);
! gcse_after_reload_main (insns, dump_file);
! rebuild_jump_labels (insns);
! delete_trivially_dead_insns (insns, max_reg_num ());
! close_dump_file (DFI_gcse2, print_rtl_with_bb, insns);
ggc_collect ();
--- 819,832 ----
#endif
static void
! rest_of_handle_gcse2 (void)
{
! open_dump_file (DFI_gcse2, current_function_decl);
! gcse_after_reload_main (get_insns (), dump_file);
! rebuild_jump_labels (get_insns ());
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
! close_dump_file (DFI_gcse2, print_rtl_with_bb, get_insns ());
ggc_collect ();
***************
*** 874,891 ****
/* Register allocation pre-pass, to reduce number of moves necessary
for two-address machines. */
static void
! rest_of_handle_regmove (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_REGMOVE);
! open_dump_file (DFI_regmove, decl);
! regmove_optimize (insns, max_reg_num (), dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
! close_dump_file (DFI_regmove, print_rtl_with_bb, insns);
timevar_pop (TV_REGMOVE);
ggc_collect ();
--- 838,852 ----
/* Register allocation pre-pass, to reduce number of moves necessary
for two-address machines. */
static void
! rest_of_handle_regmove (void)
{
timevar_push (TV_REGMOVE);
! open_dump_file (DFI_regmove, current_function_decl);
! regmove_optimize (get_insns (), max_reg_num (), dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
! close_dump_file (DFI_regmove, print_rtl_with_bb, get_insns ());
timevar_pop (TV_REGMOVE);
ggc_collect ();
***************
*** 893,933 ****
/* Run tracer. */
static void
! rest_of_handle_tracer (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_tracer, decl);
if (dump_file)
dump_flow_info (dump_file);
tracer ();
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (insns, max_reg_num (), 0);
close_dump_file (DFI_tracer, print_rtl_with_bb, get_insns ());
}
/* If-conversion and CFG cleanup. */
static void
! rest_of_handle_if_conversion (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_ce1, decl);
if (flag_if_conversion)
{
timevar_push (TV_IFCVT);
if (dump_file)
dump_flow_info (dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (insns, max_reg_num (), 0);
if_convert (0);
timevar_pop (TV_IFCVT);
}
timevar_push (TV_JUMP);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (insns, max_reg_num (), 0);
timevar_pop (TV_JUMP);
close_dump_file (DFI_ce1, print_rtl_with_bb, get_insns ());
}
--- 854,888 ----
/* Run tracer. */
static void
! rest_of_handle_tracer (void)
{
! open_dump_file (DFI_tracer, current_function_decl);
if (dump_file)
dump_flow_info (dump_file);
tracer ();
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (get_insns (), max_reg_num (), 0);
close_dump_file (DFI_tracer, print_rtl_with_bb, get_insns ());
}
/* If-conversion and CFG cleanup. */
static void
! rest_of_handle_if_conversion (void)
{
! open_dump_file (DFI_ce1, current_function_decl);
if (flag_if_conversion)
{
timevar_push (TV_IFCVT);
if (dump_file)
dump_flow_info (dump_file);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (get_insns (), max_reg_num (), 0);
if_convert (0);
timevar_pop (TV_IFCVT);
}
timevar_push (TV_JUMP);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (get_insns (), max_reg_num (), 0);
timevar_pop (TV_JUMP);
close_dump_file (DFI_ce1, print_rtl_with_bb, get_insns ());
}
***************
*** 935,983 ****
/* Rerun if-conversion, as combine may have simplified things enough
to now meet sequence length restrictions. */
static void
! rest_of_handle_if_after_combine (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_IFCVT);
! open_dump_file (DFI_ce2, decl);
no_new_pseudos = 0;
if_convert (1);
no_new_pseudos = 1;
! close_dump_file (DFI_ce2, print_rtl_with_bb, insns);
timevar_pop (TV_IFCVT);
}
static void
! rest_of_handle_web (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_web, decl);
timevar_push (TV_WEB);
web_main ();
! delete_trivially_dead_insns (insns, max_reg_num ());
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_WEB);
! close_dump_file (DFI_web, print_rtl_with_bb, insns);
reg_scan (get_insns (), max_reg_num (), 0);
}
/* Do branch profiling and static profile estimation passes. */
static void
! rest_of_handle_branch_prob (tree decl, rtx insns)
{
struct loops loops;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_BRANCH_PROB);
! open_dump_file (DFI_bp, decl);
if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
branch_prob ();
--- 890,929 ----
/* Rerun if-conversion, as combine may have simplified things enough
to now meet sequence length restrictions. */
static void
! rest_of_handle_if_after_combine (void)
{
timevar_push (TV_IFCVT);
! open_dump_file (DFI_ce2, current_function_decl);
no_new_pseudos = 0;
if_convert (1);
no_new_pseudos = 1;
! close_dump_file (DFI_ce2, print_rtl_with_bb, get_insns ());
timevar_pop (TV_IFCVT);
}
static void
! rest_of_handle_web (void)
{
! open_dump_file (DFI_web, current_function_decl);
timevar_push (TV_WEB);
web_main ();
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_WEB);
! close_dump_file (DFI_web, print_rtl_with_bb, get_insns ());
reg_scan (get_insns (), max_reg_num (), 0);
}
/* Do branch profiling and static profile estimation passes. */
static void
! rest_of_handle_branch_prob (void)
{
struct loops loops;
timevar_push (TV_BRANCH_PROB);
! open_dump_file (DFI_bp, current_function_decl);
if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
branch_prob ();
***************
*** 995,1030 ****
flow_loops_free (&loops);
free_dominance_info (CDI_DOMINATORS);
! close_dump_file (DFI_bp, print_rtl_with_bb, insns);
timevar_pop (TV_BRANCH_PROB);
}
/* Do optimizations based on expression value profiles. */
static void
! rest_of_handle_value_profile_transformations (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_vpt, decl);
timevar_push (TV_VPT);
if (value_profile_transformations ())
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_VPT);
! close_dump_file (DFI_vpt, print_rtl_with_bb, insns);
}
/* Do control and data flow analysis; write some of the results to the
dump file. */
static void
! rest_of_handle_cfg (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_cfg, decl);
if (dump_file)
dump_flow_info (dump_file);
if (optimize)
--- 941,970 ----
flow_loops_free (&loops);
free_dominance_info (CDI_DOMINATORS);
! close_dump_file (DFI_bp, print_rtl_with_bb, get_insns ());
timevar_pop (TV_BRANCH_PROB);
}
/* Do optimizations based on expression value profiles. */
static void
! rest_of_handle_value_profile_transformations (void)
{
! open_dump_file (DFI_vpt, current_function_decl);
timevar_push (TV_VPT);
if (value_profile_transformations ())
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_VPT);
! close_dump_file (DFI_vpt, print_rtl_with_bb, get_insns ());
}
/* Do control and data flow analysis; write some of the results to the
dump file. */
static void
! rest_of_handle_cfg (void)
{
! open_dump_file (DFI_cfg, current_function_decl);
if (dump_file)
dump_flow_info (dump_file);
if (optimize)
***************
*** 1042,1092 ****
{
/* Alias analysis depends on this information and mark_constant_function
depends on alias analysis. */
! reg_scan (insns, max_reg_num (), 1);
mark_constant_function ();
}
! close_dump_file (DFI_cfg, print_rtl_with_bb, insns);
}
/* Purge addressofs. */
static void
! rest_of_handle_addressof (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
! open_dump_file (DFI_addressof, decl);
!
! purge_addressof (insns);
if (optimize && purge_all_dead_edges (0))
delete_unreachable_blocks ();
! reg_scan (insns, max_reg_num (), 1);
! close_dump_file (DFI_addressof, print_rtl, insns);
}
/* Perform jump bypassing and control flow optimizations. */
static void
! rest_of_handle_jump_bypass (tree decl, rtx insns)
{
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_BYPASS);
! open_dump_file (DFI_bypass, decl);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (insns, max_reg_num (), 1);
if (bypass_jumps (dump_file))
{
! rebuild_jump_labels (insns);
cleanup_cfg (CLEANUP_EXPENSIVE);
! delete_trivially_dead_insns (insns, max_reg_num ());
}
! close_dump_file (DFI_bypass, print_rtl_with_bb, insns);
timevar_pop (TV_BYPASS);
ggc_collect ();
--- 982,1026 ----
{
/* Alias analysis depends on this information and mark_constant_function
depends on alias analysis. */
! reg_scan (get_insns (), max_reg_num (), 1);
mark_constant_function ();
}
! close_dump_file (DFI_cfg, print_rtl_with_bb, get_insns ());
}
/* Purge addressofs. */
static void
! rest_of_handle_addressof (void)
{
! open_dump_file (DFI_addressof, current_function_decl);
! purge_addressof (get_insns ());
if (optimize && purge_all_dead_edges (0))
delete_unreachable_blocks ();
! reg_scan (get_insns (), max_reg_num (), 1);
! close_dump_file (DFI_addressof, print_rtl, get_insns ());
}
/* Perform jump bypassing and control flow optimizations. */
static void
! rest_of_handle_jump_bypass (void)
{
timevar_push (TV_BYPASS);
! open_dump_file (DFI_bypass, current_function_decl);
cleanup_cfg (CLEANUP_EXPENSIVE);
! reg_scan (get_insns (), max_reg_num (), 1);
if (bypass_jumps (dump_file))
{
! rebuild_jump_labels (get_insns ());
cleanup_cfg (CLEANUP_EXPENSIVE);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
}
! close_dump_file (DFI_bypass, print_rtl_with_bb, get_insns ());
timevar_pop (TV_BYPASS);
ggc_collect ();
***************
*** 1098,1129 ****
/* Try combining insns through substitution. */
static void
! rest_of_handle_combine (tree decl, rtx insns)
{
int rebuild_jump_labels_after_combine = 0;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_COMBINE);
! open_dump_file (DFI_combine, decl);
rebuild_jump_labels_after_combine
! = combine_instructions (insns, max_reg_num ());
! /* Combining insns may have turned an indirect jump into a
direct jump. Rebuild the JUMP_LABEL fields of jumping
instructions. */
if (rebuild_jump_labels_after_combine)
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (insns);
timevar_pop (TV_JUMP);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
}
! close_dump_file (DFI_combine, print_rtl_with_bb, insns);
timevar_pop (TV_COMBINE);
ggc_collect ();
--- 1032,1060 ----
/* Try combining insns through substitution. */
static void
! rest_of_handle_combine (void)
{
int rebuild_jump_labels_after_combine = 0;
timevar_push (TV_COMBINE);
! open_dump_file (DFI_combine, current_function_decl);
rebuild_jump_labels_after_combine
! = combine_instructions (get_insns (), max_reg_num ());
! /* Combining get_insns () may have turned an indirect jump into a
direct jump. Rebuild the JUMP_LABEL fields of jumping
instructions. */
if (rebuild_jump_labels_after_combine)
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (get_insns ());
timevar_pop (TV_JUMP);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
}
! close_dump_file (DFI_combine, print_rtl_with_bb, get_insns ());
timevar_pop (TV_COMBINE);
ggc_collect ();
***************
*** 1131,1142 ****
/* Perform life analysis. */
static void
! rest_of_handle_life (tree decl, rtx insns)
{
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_life, decl);
regclass_init ();
#ifdef ENABLE_CHECKING
--- 1062,1070 ----
/* Perform life analysis. */
static void
! rest_of_handle_life (void)
{
! open_dump_file (DFI_life, current_function_decl);
regclass_init ();
#ifdef ENABLE_CHECKING
***************
*** 1151,1157 ****
if (extra_warnings)
{
! setjmp_vars_warning (DECL_INITIAL (decl));
setjmp_args_warning ();
}
--- 1079,1085 ----
if (extra_warnings)
{
! setjmp_vars_warning (DECL_INITIAL (current_function_decl));
setjmp_args_warning ();
}
***************
*** 1161,1167 ****
{
/* Insns were inserted, and possibly pseudos created, so
things might look a bit different. */
- insns = get_insns ();
allocate_reg_life_data ();
update_life_info (NULL, UPDATE_LIFE_GLOBAL_RM_NOTES,
PROP_LOG_LINKS | PROP_REG_INFO | PROP_DEATH_NOTES);
--- 1089,1094 ----
***************
*** 1170,1176 ****
no_new_pseudos = 1;
! close_dump_file (DFI_life, print_rtl_with_bb, insns);
ggc_collect ();
}
--- 1097,1103 ----
no_new_pseudos = 1;
! close_dump_file (DFI_life, print_rtl_with_bb, get_insns ());
ggc_collect ();
}
***************
*** 1179,1204 ****
`cse_main' means that jumps were simplified and some code may now
be unreachable, so do jump optimization again. */
static void
! rest_of_handle_cse (tree decl, rtx insns)
{
int tem;
! if (decl != current_function_decl || insns != get_insns ())
! abort ();
!
! open_dump_file (DFI_cse, decl);
if (dump_file)
dump_flow_info (dump_file);
timevar_push (TV_CSE);
! reg_scan (insns, max_reg_num (), 1);
! tem = cse_main (insns, max_reg_num (), 0, dump_file);
if (tem)
! rebuild_jump_labels (insns);
if (purge_all_dead_edges (0))
delete_unreachable_blocks ();
! delete_trivially_dead_insns (insns, max_reg_num ());
/* If we are not running more CSE passes, then we are no longer
expecting CSE to be run. But always rerun it in a cheap mode. */
--- 1106,1128 ----
`cse_main' means that jumps were simplified and some code may now
be unreachable, so do jump optimization again. */
static void
! rest_of_handle_cse (void)
{
int tem;
! open_dump_file (DFI_cse, current_function_decl);
if (dump_file)
dump_flow_info (dump_file);
timevar_push (TV_CSE);
! reg_scan (get_insns (), max_reg_num (), 1);
! tem = cse_main (get_insns (), max_reg_num (), 0, dump_file);
if (tem)
! rebuild_jump_labels (get_insns ());
if (purge_all_dead_edges (0))
delete_unreachable_blocks ();
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
/* If we are not running more CSE passes, then we are no longer
expecting CSE to be run. But always rerun it in a cheap mode. */
***************
*** 1208,1230 ****
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
timevar_pop (TV_CSE);
! close_dump_file (DFI_cse, print_rtl_with_bb, insns);
}
/* Run second CSE pass after loop optimizations. */
static void
! rest_of_handle_cse2 (tree decl, rtx insns)
{
int tem;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_CSE2);
! open_dump_file (DFI_cse2, decl);
if (dump_file)
dump_flow_info (dump_file);
/* CFG is no longer maintained up-to-date. */
! tem = cse_main (insns, max_reg_num (), 1, dump_file);
/* Run a pass to eliminate duplicated assignments to condition code
registers. We have to run this after bypass_jumps, because it
--- 1132,1151 ----
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
timevar_pop (TV_CSE);
! close_dump_file (DFI_cse, print_rtl_with_bb, get_insns ());
}
/* Run second CSE pass after loop optimizations. */
static void
! rest_of_handle_cse2 (void)
{
int tem;
timevar_push (TV_CSE2);
! open_dump_file (DFI_cse2, current_function_decl);
if (dump_file)
dump_flow_info (dump_file);
/* CFG is no longer maintained up-to-date. */
! tem = cse_main (get_insns (), max_reg_num (), 1, dump_file);
/* Run a pass to eliminate duplicated assignments to condition code
registers. We have to run this after bypass_jumps, because it
***************
*** 1233,1268 ****
cse_condition_code_reg ();
purge_all_dead_edges (0);
! delete_trivially_dead_insns (insns, max_reg_num ());
if (tem)
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (insns);
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP);
}
! reg_scan (insns, max_reg_num (), 0);
! close_dump_file (DFI_cse2, print_rtl_with_bb, insns);
ggc_collect ();
timevar_pop (TV_CSE2);
}
/* Perform global cse. */
static void
! rest_of_handle_gcse (tree decl, rtx insns)
{
int save_csb, save_cfj;
int tem2 = 0, tem;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_GCSE);
! open_dump_file (DFI_gcse, decl);
! tem = gcse_main (insns, dump_file);
! rebuild_jump_labels (insns);
! delete_trivially_dead_insns (insns, max_reg_num ());
save_csb = flag_cse_skip_blocks;
save_cfj = flag_cse_follow_jumps;
--- 1154,1186 ----
cse_condition_code_reg ();
purge_all_dead_edges (0);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
if (tem)
{
timevar_push (TV_JUMP);
! rebuild_jump_labels (get_insns ());
cleanup_cfg (CLEANUP_EXPENSIVE);
timevar_pop (TV_JUMP);
}
! reg_scan (get_insns (), max_reg_num (), 0);
! close_dump_file (DFI_cse2, print_rtl_with_bb, get_insns ());
ggc_collect ();
timevar_pop (TV_CSE2);
}
/* Perform global cse. */
static void
! rest_of_handle_gcse (void)
{
int save_csb, save_cfj;
int tem2 = 0, tem;
timevar_push (TV_GCSE);
! open_dump_file (DFI_gcse, current_function_decl);
! tem = gcse_main (get_insns (), dump_file);
! rebuild_jump_labels (get_insns ());
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
save_csb = flag_cse_skip_blocks;
save_cfj = flag_cse_follow_jumps;
***************
*** 1273,1282 ****
if (flag_expensive_optimizations)
{
timevar_push (TV_CSE);
! reg_scan (insns, max_reg_num (), 1);
! tem2 = cse_main (insns, max_reg_num (), 0, dump_file);
purge_all_dead_edges (0);
! delete_trivially_dead_insns (insns, max_reg_num ());
timevar_pop (TV_CSE);
cse_not_expected = !flag_rerun_cse_after_loop;
}
--- 1191,1200 ----
if (flag_expensive_optimizations)
{
timevar_push (TV_CSE);
! reg_scan (get_insns (), max_reg_num (), 1);
! tem2 = cse_main (get_insns (), max_reg_num (), 0, dump_file);
purge_all_dead_edges (0);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
timevar_pop (TV_CSE);
cse_not_expected = !flag_rerun_cse_after_loop;
}
***************
*** 1287,1308 ****
{
tem = tem2 = 0;
timevar_push (TV_JUMP);
! rebuild_jump_labels (insns);
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
timevar_pop (TV_JUMP);
if (flag_expensive_optimizations)
{
timevar_push (TV_CSE);
! reg_scan (insns, max_reg_num (), 1);
! tem2 = cse_main (insns, max_reg_num (), 0, dump_file);
purge_all_dead_edges (0);
! delete_trivially_dead_insns (insns, max_reg_num ());
timevar_pop (TV_CSE);
}
}
! close_dump_file (DFI_gcse, print_rtl_with_bb, insns);
timevar_pop (TV_GCSE);
ggc_collect ();
--- 1205,1226 ----
{
tem = tem2 = 0;
timevar_push (TV_JUMP);
! rebuild_jump_labels (get_insns ());
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
timevar_pop (TV_JUMP);
if (flag_expensive_optimizations)
{
timevar_push (TV_CSE);
! reg_scan (get_insns (), max_reg_num (), 1);
! tem2 = cse_main (get_insns (), max_reg_num (), 0, dump_file);
purge_all_dead_edges (0);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
timevar_pop (TV_CSE);
}
}
! close_dump_file (DFI_gcse, print_rtl_with_bb, get_insns ());
timevar_pop (TV_GCSE);
ggc_collect ();
***************
*** 1315,1331 ****
/* Move constant computations out of loops. */
static void
! rest_of_handle_loop_optimize (tree decl, rtx insns)
{
int do_unroll, do_prefetch;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
timevar_push (TV_LOOP);
delete_dead_jumptables ();
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
! open_dump_file (DFI_loop, decl);
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
--- 1233,1246 ----
/* Move constant computations out of loops. */
static void
! rest_of_handle_loop_optimize (void)
{
int do_unroll, do_prefetch;
timevar_push (TV_LOOP);
delete_dead_jumptables ();
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
! open_dump_file (DFI_loop, current_function_decl);
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
***************
*** 1341,1367 ****
cleanup_barriers ();
/* We only want to perform unrolling once. */
! loop_optimize (insns, dump_file, do_unroll);
do_unroll = 0;
/* The first call to loop_optimize makes some instructions
trivially dead. We delete those instructions now in the
hope that doing so will make the heuristics in loop work
better and possibly speed up compilation. */
! delete_trivially_dead_insns (insns, max_reg_num ());
/* The regscan pass is currently necessary as the alias
analysis code depends on this information. */
! reg_scan (insns, max_reg_num (), 1);
}
cleanup_barriers ();
! loop_optimize (insns, dump_file, do_unroll | do_prefetch);
/* Loop can create trivially dead instructions. */
! delete_trivially_dead_insns (insns, max_reg_num ());
! close_dump_file (DFI_loop, print_rtl, insns);
timevar_pop (TV_LOOP);
! find_basic_blocks (insns, max_reg_num (), dump_file);
ggc_collect ();
}
--- 1256,1282 ----
cleanup_barriers ();
/* We only want to perform unrolling once. */
! loop_optimize (get_insns (), dump_file, do_unroll);
do_unroll = 0;
/* The first call to loop_optimize makes some instructions
trivially dead. We delete those instructions now in the
hope that doing so will make the heuristics in loop work
better and possibly speed up compilation. */
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
/* The regscan pass is currently necessary as the alias
analysis code depends on this information. */
! reg_scan (get_insns (), max_reg_num (), 1);
}
cleanup_barriers ();
! loop_optimize (get_insns (), dump_file, do_unroll | do_prefetch);
/* Loop can create trivially dead instructions. */
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
! close_dump_file (DFI_loop, print_rtl, get_insns ());
timevar_pop (TV_LOOP);
! find_basic_blocks (get_insns (), max_reg_num (), dump_file);
ggc_collect ();
}
***************
*** 1370,1383 ****
sooner, but we want the profile feedback to work more
efficiently. */
static void
! rest_of_handle_loop2 (tree decl, rtx insns)
{
struct loops *loops;
basic_block bb;
- if (decl != current_function_decl || insns != get_insns ())
- abort ();
-
if (!flag_unswitch_loops
&& !flag_peel_loops
&& !flag_unroll_loops
--- 1285,1295 ----
sooner, but we want the profile feedback to work more
efficiently. */
static void
! rest_of_handle_loop2 (void)
{
struct loops *loops;
basic_block bb;
if (!flag_unswitch_loops
&& !flag_peel_loops
&& !flag_unroll_loops
***************
*** 1385,1391 ****
return;
timevar_push (TV_LOOP);
! open_dump_file (DFI_loop2, decl);
if (dump_file)
dump_flow_info (dump_file);
--- 1297,1303 ----
return;
timevar_push (TV_LOOP);
! open_dump_file (DFI_loop2, current_function_decl);
if (dump_file)
dump_flow_info (dump_file);
***************
*** 1421,1428 ****
cfg_layout_finalize ();
cleanup_cfg (CLEANUP_EXPENSIVE);
! delete_trivially_dead_insns (insns, max_reg_num ());
! reg_scan (insns, max_reg_num (), 0);
if (dump_file)
dump_flow_info (dump_file);
close_dump_file (DFI_loop2, print_rtl_with_bb, get_insns ());
--- 1333,1340 ----
cfg_layout_finalize ();
cleanup_cfg (CLEANUP_EXPENSIVE);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
! reg_scan (get_insns (), max_reg_num (), 0);
if (dump_file)
dump_flow_info (dump_file);
close_dump_file (DFI_loop2, print_rtl_with_bb, get_insns ());
***************
*** 1439,1448 ****
void
rest_of_compilation (void)
{
- tree decl = current_function_decl;
- rtx insns;
-
-
/* There's no need to defer outputting this function any more; we
know we want to output it. */
DECL_DEFER_OUTPUT (current_function_decl) = 0;
--- 1351,1356 ----
***************
*** 1480,1486 ****
init_flow ();
/* Dump the rtl code if we are dumping rtl. */
! if (open_dump_file (DFI_rtl, decl))
close_dump_file (DFI_rtl, print_rtl, get_insns ());
/* Convert from NOTE_INSN_EH_REGION style notes, and do other
--- 1388,1394 ----
init_flow ();
/* Dump the rtl code if we are dumping rtl. */
! if (open_dump_file (DFI_rtl, current_function_decl))
close_dump_file (DFI_rtl, print_rtl, get_insns ());
/* Convert from NOTE_INSN_EH_REGION style notes, and do other
***************
*** 1502,1509 ****
/* We are now committed to emitting code for this function. Do any
preparation, such as emitting abstract debug info for the inline
before it gets mangled by optimization. */
! if (cgraph_function_possibly_inlined_p (decl))
! (*debug_hooks->outlining_inline_function) (decl);
/* Remove any notes we don't need. That will make iterating
over the instruction sequence faster, and allow the garbage
--- 1410,1417 ----
/* We are now committed to emitting code for this function. Do any
preparation, such as emitting abstract debug info for the inline
before it gets mangled by optimization. */
! if (cgraph_function_possibly_inlined_p (current_function_decl))
! (*debug_hooks->outlining_inline_function) (current_function_decl);
/* Remove any notes we don't need. That will make iterating
over the instruction sequence faster, and allow the garbage
***************
*** 1517,1523 ****
/* Initialize some variables used by the optimizers. */
init_function_for_compilation ();
! TREE_ASM_WRITTEN (decl) = 1;
/* Now that integrate will no longer see our rtl, we need not
distinguish between the return value of this function and the
--- 1425,1431 ----
/* Initialize some variables used by the optimizers. */
init_function_for_compilation ();
! TREE_ASM_WRITTEN (current_function_decl) = 1;
/* Now that integrate will no longer see our rtl, we need not
distinguish between the return value of this function and the
***************
*** 1534,1544 ****
goto exit_rest_of_compilation;
timevar_push (TV_JUMP);
! open_dump_file (DFI_sibling, decl);
! insns = get_insns ();
! rebuild_jump_labels (insns);
find_exception_handler_labels ();
! find_basic_blocks (insns, max_reg_num (), dump_file);
delete_unreachable_blocks ();
--- 1442,1451 ----
goto exit_rest_of_compilation;
timevar_push (TV_JUMP);
! open_dump_file (DFI_sibling, current_function_decl);
! rebuild_jump_labels (get_insns ());
find_exception_handler_labels ();
! find_basic_blocks (get_insns (), max_reg_num (), dump_file);
delete_unreachable_blocks ();
***************
*** 1560,1566 ****
if (doing_eh (0))
{
timevar_push (TV_JUMP);
! open_dump_file (DFI_eh, decl);
finish_eh_generation ();
--- 1467,1473 ----
if (doing_eh (0))
{
timevar_push (TV_JUMP);
! open_dump_file (DFI_eh, current_function_decl);
finish_eh_generation ();
***************
*** 1581,1590 ****
FINALIZE_PIC;
#endif
- insns = get_insns ();
-
/* Copy any shared structure that should not be shared. */
! unshare_all_rtl (current_function_decl, insns);
#ifdef SETJMP_VIA_SAVE_AREA
/* This must be performed before virtual register instantiation.
--- 1488,1495 ----
FINALIZE_PIC;
#endif
/* Copy any shared structure that should not be shared. */
! unshare_all_rtl ();
#ifdef SETJMP_VIA_SAVE_AREA
/* This must be performed before virtual register instantiation.
***************
*** 1592,1604 ****
at the RTL up to this point must understand that REG_SAVE_AREA
is just like a use of the REG contained inside. */
if (current_function_calls_alloca)
! optimize_save_area_alloca (insns);
#endif
/* Instantiate all virtual registers. */
! instantiate_virtual_regs (current_function_decl, insns);
! open_dump_file (DFI_jump, decl);
/* Always do one jump optimization pass to ensure that JUMP_LABEL fields
are initialized and to compute whether control can drop off the end
--- 1497,1509 ----
at the RTL up to this point must understand that REG_SAVE_AREA
is just like a use of the REG contained inside. */
if (current_function_calls_alloca)
! optimize_save_area_alloca (get_insns ());
#endif
/* Instantiate all virtual registers. */
! instantiate_virtual_regs ();
! open_dump_file (DFI_jump, current_function_decl);
/* Always do one jump optimization pass to ensure that JUMP_LABEL fields
are initialized and to compute whether control can drop off the end
***************
*** 1610,1619 ****
if (flag_guess_branch_prob)
expected_value_to_br_prob ();
! reg_scan (insns, max_reg_num (), 0);
! rebuild_jump_labels (insns);
! find_basic_blocks (insns, max_reg_num (), dump_file);
! delete_trivially_dead_insns (insns, max_reg_num ());
if (dump_file)
dump_flow_info (dump_file);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP
--- 1515,1524 ----
if (flag_guess_branch_prob)
expected_value_to_br_prob ();
! reg_scan (get_insns (), max_reg_num (), 0);
! rebuild_jump_labels (get_insns ());
! find_basic_blocks (get_insns (), max_reg_num (), dump_file);
! delete_trivially_dead_insns (get_insns (), max_reg_num ());
if (dump_file)
dump_flow_info (dump_file);
cleanup_cfg ((optimize ? CLEANUP_EXPENSIVE : 0) | CLEANUP_PRE_LOOP
***************
*** 1621,1629 ****
create_loop_notes ();
! purge_line_number_notes (insns);
! close_dump_file (DFI_jump, print_rtl, insns);
if (optimize)
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
--- 1526,1534 ----
create_loop_notes ();
! purge_line_number_notes (get_insns ());
! close_dump_file (DFI_jump, print_rtl, get_insns ());
if (optimize)
cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_PRE_LOOP);
***************
*** 1636,1667 ****
renumber_insns (dump_file);
timevar_pop (TV_JUMP);
! close_dump_file (DFI_jump, print_rtl_with_bb, insns);
ggc_collect ();
if (optimize > 0)
! rest_of_handle_cse (decl, insns);
! rest_of_handle_addressof (decl, insns);
ggc_collect ();
if (optimize > 0)
{
if (flag_gcse)
! rest_of_handle_gcse (decl, insns);
if (flag_loop_optimize)
! rest_of_handle_loop_optimize (decl, insns);
if (flag_gcse)
! rest_of_handle_jump_bypass (decl, insns);
}
timevar_push (TV_FLOW);
! rest_of_handle_cfg (decl, insns);
if (!flag_tree_based_profiling
&& (optimize > 0 || profile_arc_flag
--- 1541,1572 ----
renumber_insns (dump_file);
timevar_pop (TV_JUMP);
! close_dump_file (DFI_jump, print_rtl_with_bb, get_insns ());
ggc_collect ();
if (optimize > 0)
! rest_of_handle_cse ();
! rest_of_handle_addressof ();
ggc_collect ();
if (optimize > 0)
{
if (flag_gcse)
! rest_of_handle_gcse ();
if (flag_loop_optimize)
! rest_of_handle_loop_optimize ();
if (flag_gcse)
! rest_of_handle_jump_bypass ();
}
timevar_push (TV_FLOW);
! rest_of_handle_cfg ();
if (!flag_tree_based_profiling
&& (optimize > 0 || profile_arc_flag
***************
*** 1669,1680 ****
{
rtl_register_profile_hooks ();
rtl_register_value_prof_hooks ();
! rest_of_handle_branch_prob (decl, insns);
if (flag_branch_probabilities
&& flag_profile_values
&& flag_value_profile_transformations)
! rest_of_handle_value_profile_transformations (decl, insns);
/* Remove the death notes created for vpt. */
if (flag_profile_values)
--- 1574,1585 ----
{
rtl_register_profile_hooks ();
rtl_register_value_prof_hooks ();
! rest_of_handle_branch_prob ();
if (flag_branch_probabilities
&& flag_profile_values
&& flag_value_profile_transformations)
! rest_of_handle_value_profile_transformations ();
/* Remove the death notes created for vpt. */
if (flag_profile_values)
***************
*** 1682,1710 ****
}
if (optimize > 0)
! rest_of_handle_if_conversion (decl, insns);
if (flag_tracer)
! rest_of_handle_tracer (decl, insns);
if (optimize > 0)
! rest_of_handle_loop2 (decl, insns);
if (flag_web)
! rest_of_handle_web (decl, insns);
if (flag_rerun_cse_after_loop)
! rest_of_handle_cse2 (decl, insns);
cse_not_expected = 1;
! rest_of_handle_life (decl, insns);
if (optimize > 0)
! rest_of_handle_combine (decl, insns);
if (flag_if_conversion)
! rest_of_handle_if_after_combine (decl, insns);
/* The optimization to partition hot/cold basic blocks into separate
sections of the .o file does not work well with exception handling.
--- 1587,1615 ----
}
if (optimize > 0)
! rest_of_handle_if_conversion ();
if (flag_tracer)
! rest_of_handle_tracer ();
if (optimize > 0)
! rest_of_handle_loop2 ();
if (flag_web)
! rest_of_handle_web ();
if (flag_rerun_cse_after_loop)
! rest_of_handle_cse2 ();
cse_not_expected = 1;
! rest_of_handle_life ();
if (optimize > 0)
! rest_of_handle_combine ();
if (flag_if_conversion)
! rest_of_handle_if_after_combine ();
/* The optimization to partition hot/cold basic blocks into separate
sections of the .o file does not work well with exception handling.
***************
*** 1721,1727 ****
}
if (optimize > 0 && (flag_regmove || flag_expensive_optimizations))
! rest_of_handle_regmove (decl, insns);
/* Do unconditional splitting before register allocation to allow machine
description to add extra information not needed previously. */
--- 1626,1632 ----
}
if (optimize > 0 && (flag_regmove || flag_expensive_optimizations))
! rest_of_handle_regmove ();
/* Do unconditional splitting before register allocation to allow machine
description to add extra information not needed previously. */
***************
*** 1740,1749 ****
/* Any of the several passes since flow1 will have munged register
lifetime data a bit. We need it to be up to date for scheduling
(see handling of reg_known_equiv in init_alias_analysis). */
! recompute_reg_usage (insns, !optimize_size);
#ifdef INSN_SCHEDULING
! rest_of_handle_sched (decl, insns);
#endif
/* Determine if the current function is a leaf before running reload
--- 1645,1654 ----
/* Any of the several passes since flow1 will have munged register
lifetime data a bit. We need it to be up to date for scheduling
(see handling of reg_known_equiv in init_alias_analysis). */
! recompute_reg_usage (get_insns (), !optimize_size);
#ifdef INSN_SCHEDULING
! rest_of_handle_sched ();
#endif
/* Determine if the current function is a leaf before running reload
***************
*** 1752,1779 ****
current_function_is_leaf = leaf_function_p ();
timevar_push (TV_LOCAL_ALLOC);
! open_dump_file (DFI_lreg, decl);
if (flag_new_regalloc)
{
! if (rest_of_handle_new_regalloc (decl, insns))
goto exit_rest_of_compilation;
}
else
{
! if (rest_of_handle_old_regalloc (decl, insns))
goto exit_rest_of_compilation;
}
ggc_collect ();
! open_dump_file (DFI_postreload, decl);
/* Do a very simple CSE pass over just the hard registers. */
if (optimize > 0)
{
timevar_push (TV_RELOAD_CSE_REGS);
! reload_cse_regs (insns);
/* reload_cse_regs can eliminate potentially-trapping MEMs.
Remove any EH edges associated with them. */
if (flag_non_call_exceptions)
--- 1657,1684 ----
current_function_is_leaf = leaf_function_p ();
timevar_push (TV_LOCAL_ALLOC);
! open_dump_file (DFI_lreg, current_function_decl);
if (flag_new_regalloc)
{
! if (rest_of_handle_new_regalloc ())
goto exit_rest_of_compilation;
}
else
{
! if (rest_of_handle_old_regalloc ())
goto exit_rest_of_compilation;
}
ggc_collect ();
! open_dump_file (DFI_postreload, current_function_decl);
/* Do a very simple CSE pass over just the hard registers. */
if (optimize > 0)
{
timevar_push (TV_RELOAD_CSE_REGS);
! reload_cse_regs (get_insns ());
/* reload_cse_regs can eliminate potentially-trapping MEMs.
Remove any EH edges associated with them. */
if (flag_non_call_exceptions)
***************
*** 1781,1800 ****
timevar_pop (TV_RELOAD_CSE_REGS);
}
! close_dump_file (DFI_postreload, print_rtl_with_bb, insns);
if (optimize > 0 && flag_gcse_after_reload)
! rest_of_handle_gcse2 (decl, insns);
/* Re-create the death notes which were deleted during reload. */
timevar_push (TV_FLOW2);
! open_dump_file (DFI_flow2, decl);
#ifdef ENABLE_CHECKING
verify_flow_info ();
#endif
! /* If optimizing, then go ahead and split insns now. */
#ifndef STACK_REGS
if (optimize > 0)
#endif
--- 1686,1705 ----
timevar_pop (TV_RELOAD_CSE_REGS);
}
! close_dump_file (DFI_postreload, print_rtl_with_bb, get_insns ());
if (optimize > 0 && flag_gcse_after_reload)
! rest_of_handle_gcse2 ();
/* Re-create the death notes which were deleted during reload. */
timevar_push (TV_FLOW2);
! open_dump_file (DFI_flow2, current_function_decl);
#ifdef ENABLE_CHECKING
verify_flow_info ();
#endif
! /* If optimizing, then go ahead and split get_insns () now. */
#ifndef STACK_REGS
if (optimize > 0)
#endif
***************
*** 1802,1812 ****
if (flag_branch_target_load_optimize)
{
! open_dump_file (DFI_branch_target_load, decl);
branch_target_load_optimize (/*after_prologue_epilogue_gen=*/false);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
ggc_collect ();
}
--- 1707,1717 ----
if (flag_branch_target_load_optimize)
{
! open_dump_file (DFI_branch_target_load, current_function_decl);
branch_target_load_optimize (/*after_prologue_epilogue_gen=*/false);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, get_insns ());
ggc_collect ();
}
***************
*** 1815,1824 ****
cleanup_cfg (CLEANUP_EXPENSIVE);
/* On some machines, the prologue and epilogue code, or parts thereof,
! can be represented as RTL. Doing so lets us schedule insns between
it and the rest of the code and also allows delayed branch
scheduling to operate in the epilogue. */
! thread_prologue_and_epilogue_insns (insns);
epilogue_completed = 1;
if (optimize)
--- 1720,1729 ----
cleanup_cfg (CLEANUP_EXPENSIVE);
/* On some machines, the prologue and epilogue code, or parts thereof,
! can be represented as RTL. Doing so lets us schedule get_insns () between
it and the rest of the code and also allows delayed branch
scheduling to operate in the epilogue. */
! thread_prologue_and_epilogue_insns (get_insns ());
epilogue_completed = 1;
if (optimize)
***************
*** 1841,1863 ****
flow2_completed = 1;
! close_dump_file (DFI_flow2, print_rtl_with_bb, insns);
timevar_pop (TV_FLOW2);
#ifdef HAVE_peephole2
if (optimize > 0 && flag_peephole2)
{
timevar_push (TV_PEEPHOLE2);
! open_dump_file (DFI_peephole2, decl);
peephole2_optimize (dump_file);
! close_dump_file (DFI_peephole2, print_rtl_with_bb, insns);
timevar_pop (TV_PEEPHOLE2);
}
#endif
! open_dump_file (DFI_ce3, decl);
if (optimize)
/* Last attempt to optimize CFG, as scheduling, peepholing and insn
splitting possibly introduced more crossjumping opportunities. */
--- 1746,1768 ----
flow2_completed = 1;
! close_dump_file (DFI_flow2, print_rtl_with_bb, get_insns ());
timevar_pop (TV_FLOW2);
#ifdef HAVE_peephole2
if (optimize > 0 && flag_peephole2)
{
timevar_push (TV_PEEPHOLE2);
! open_dump_file (DFI_peephole2, current_function_decl);
peephole2_optimize (dump_file);
! close_dump_file (DFI_peephole2, print_rtl_with_bb, get_insns ());
timevar_pop (TV_PEEPHOLE2);
}
#endif
! open_dump_file (DFI_ce3, current_function_decl);
if (optimize)
/* Last attempt to optimize CFG, as scheduling, peepholing and insn
splitting possibly introduced more crossjumping opportunities. */
***************
*** 1872,1885 ****
timevar_pop (TV_IFCVT2);
}
! close_dump_file (DFI_ce3, print_rtl_with_bb, insns);
if (optimize > 0)
{
if (flag_rename_registers || flag_cprop_registers)
! rest_of_handle_regrename (decl, insns);
! rest_of_handle_reorder_blocks (decl, insns);
}
if (flag_branch_target_load_optimize2)
--- 1777,1790 ----
timevar_pop (TV_IFCVT2);
}
! close_dump_file (DFI_ce3, print_rtl_with_bb, get_insns ());
if (optimize > 0)
{
if (flag_rename_registers || flag_cprop_registers)
! rest_of_handle_regrename ();
! rest_of_handle_reorder_blocks ();
}
if (flag_branch_target_load_optimize2)
***************
*** 1891,1908 ****
warning ("branch target register load optimization is not intended "
"to be run twice");
! open_dump_file (DFI_branch_target_load, decl);
branch_target_load_optimize (/*after_prologue_epilogue_gen=*/true);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, insns);
ggc_collect ();
}
#ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload)
! rest_of_handle_sched2 (decl, insns);
#endif
#ifdef LEAF_REGISTERS
--- 1796,1813 ----
warning ("branch target register load optimization is not intended "
"to be run twice");
! open_dump_file (DFI_branch_target_load, current_function_decl);
branch_target_load_optimize (/*after_prologue_epilogue_gen=*/true);
! close_dump_file (DFI_branch_target_load, print_rtl_with_bb, get_insns ());
ggc_collect ();
}
#ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload)
! rest_of_handle_sched2 ();
#endif
#ifdef LEAF_REGISTERS
***************
*** 1911,1936 ****
#endif
#ifdef STACK_REGS
! rest_of_handle_stack_regs (decl, insns);
#endif
compute_alignments ();
if (flag_var_tracking)
! rest_of_handle_variable_tracking (decl, insns);
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
if (targetm.machine_dependent_reorg != 0)
! rest_of_handle_machine_reorg (decl, insns);
! purge_line_number_notes (insns);
cleanup_barriers ();
#ifdef DELAY_SLOTS
if (optimize > 0 && flag_delayed_branch)
! rest_of_handle_delay_slots (decl, insns);
#endif
#if defined (HAVE_ATTR_length) && !defined (STACK_REGS)
--- 1816,1841 ----
#endif
#ifdef STACK_REGS
! rest_of_handle_stack_regs ();
#endif
compute_alignments ();
if (flag_var_tracking)
! rest_of_handle_variable_tracking ();
/* CFG is no longer maintained up-to-date. */
free_bb_for_insn ();
if (targetm.machine_dependent_reorg != 0)
! rest_of_handle_machine_reorg ();
! purge_line_number_notes (get_insns ());
cleanup_barriers ();
#ifdef DELAY_SLOTS
if (optimize > 0 && flag_delayed_branch)
! rest_of_handle_delay_slots ();
#endif
#if defined (HAVE_ATTR_length) && !defined (STACK_REGS)
***************
*** 1943,1958 ****
/* Shorten branches. */
timevar_push (TV_SHORTEN_BRANCH);
! shorten_branches (get_insns ());
timevar_pop (TV_SHORTEN_BRANCH);
set_nothrow_function_flags ();
if (current_function_nothrow)
/* Now we know that this can't throw; set the flag for the benefit
of other functions later in this translation unit. */
TREE_NOTHROW (current_function_decl) = 1;
! rest_of_handle_final (decl, insns);
/* Write DBX symbols if requested. */
--- 1848,1863 ----
/* Shorten branches. */
timevar_push (TV_SHORTEN_BRANCH);
! shorten_branches ();
timevar_pop (TV_SHORTEN_BRANCH);
set_nothrow_function_flags ();
if (current_function_nothrow)
/* Now we know that this can't throw; set the flag for the benefit
of other functions later in this translation unit. */
TREE_NOTHROW (current_function_decl) = 1;
! rest_of_handle_final ();
/* Write DBX symbols if requested. */
***************
*** 1966,1972 ****
*will* be routed past here. */
timevar_push (TV_SYMOUT);
! (*debug_hooks->function_decl) (decl);
timevar_pop (TV_SYMOUT);
exit_rest_of_compilation:
--- 1873,1879 ----
*will* be routed past here. */
timevar_push (TV_SYMOUT);
! (*debug_hooks->function_decl) (current_function_decl);
timevar_pop (TV_SYMOUT);
exit_rest_of_compilation: