@@ -3936,7 +3936,7 @@ aarch64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -8461,7 +8461,7 @@ alpha_output_mi_thunk_osf (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
assemble_start_function and assemble_end_function. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
}
@@ -26357,7 +26357,8 @@ arm_thumb1_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,
if (mi_delta < 0)
mi_delta = - mi_delta;
- final_start_function (emit_barrier (), file, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, file, 1);
if (TARGET_THUMB1)
{
@@ -26534,7 +26535,7 @@ arm32_output_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -2744,7 +2744,8 @@ cris_asm_output_mi_thunk (FILE *stream,
tree funcdecl)
{
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), stream, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, stream, 1);
if (delta > 0)
fprintf (stream, "\tadd%s " HOST_WIDE_INT_PRINT_DEC ",$%s\n",
@@ -12492,8 +12492,9 @@ ix86_code_end (void)
emitting it directly; tell them we're a thunk, if they care. */
cfun->is_thunk = true;
first_function_block_is_cold = false;
+ rtx_insn *first = emit_barrier ();
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), asm_out_file, 1);
+ final_start_function (&first, asm_out_file, 1);
/* Pad stack IP move with 4 instructions (two NOPs count
as one instruction). */
@@ -42615,7 +42616,7 @@ x86_output_mi_thunk (FILE *file, tree, HOST_WIDE_INT delta,
Note that use_thunk calls assemble_start_function et al. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
}
@@ -10944,7 +10944,7 @@ ia64_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
emit_all_insn_group_barriers (NULL);
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -5131,7 +5131,7 @@ m68k_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
/* Run just enough of rest_of_compilation. */
insn = get_insns ();
split_all_insns_noflow ();
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -3233,7 +3233,7 @@ microblaze_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
"borrowed" from rs6000.c. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -19353,7 +19353,7 @@ mips_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
split_all_insns_noflow ();
mips16_lay_out_constants (true);
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -1635,7 +1635,8 @@ nds32_asm_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
int this_regno;
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), file, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, file, 1);
this_regno = (aggregate_value_p (TREE_TYPE (TREE_TYPE (function)), function)
? 1
@@ -4060,7 +4060,7 @@ nios2_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
assemble_start_function and assemble_end_function. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -8379,7 +8379,8 @@ pa_asm_output_mi_thunk (FILE *file, tree thunk_fndecl, HOST_WIDE_INT delta,
xoperands[1] = XEXP (DECL_RTL (thunk_fndecl), 0);
xoperands[2] = GEN_INT (delta);
- final_start_function (emit_barrier (), file, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, file, 1);
/* Output the thunk. We know that the function is in the same
translation unit (i.e., the same space) as the thunk, and that
@@ -29292,7 +29292,7 @@ rs6000_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
assemble_start_function and assemble_end_function. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -37758,7 +37758,8 @@ rs6000_code_end (void)
init_function_start (decl);
first_function_block_is_cold = false;
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), asm_out_file, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, asm_out_file, 1);
fputs ("\tblr\n", asm_out_file);
@@ -12872,7 +12872,8 @@ s390_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
int nonlocal = 0;
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), file, 1);
+ rtx_insn *first = emit_barrier ();
+ final_start_function (&first, file, 1);
/* Operand 0 is the target function. */
op[0] = XEXP (DECL_RTL (function), 0);
@@ -10891,7 +10891,7 @@ sh_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
sh_reorg ();
shorten_branches (insns);
- final_start_function (insns, file, 1);
+ final_start_function (&insns, file, 1);
final (insns, file, 1);
final_end_function ();
@@ -12074,7 +12074,7 @@ sparc_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
assemble_start_function and assemble_end_function. */
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -7020,7 +7020,8 @@ spu_output_mi_thunk (FILE *file, tree thunk ATTRIBUTE_UNUSED,
rtx op[8];
/* Make sure unwind info is emitted for the thunk if needed. */
- final_start_function (emit_barrier (), file, 1);
+ rtx_insn *insn = emit_barrier ();
+ final_start_function (&insn, file, 1);
/* Operand 0 is the target function. */
op[0] = XEXP (DECL_RTL (function), 0);
@@ -4998,7 +4998,7 @@ tilegx_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
*/
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -4421,7 +4421,7 @@ tilepro_asm_output_mi_thunk (FILE *file, tree thunk_fndecl ATTRIBUTE_UNUSED,
*/
insn = get_insns ();
shorten_branches (insn);
- final_start_function (insn, file, 1);
+ final_start_function (&insn, file, 1);
final (insn, file, 1);
final_end_function ();
@@ -1770,9 +1770,11 @@ get_some_local_dynamic_name ()
test and compare insns. */
void
-final_start_function (rtx_insn *first, FILE *file,
+final_start_function (rtx_insn **firstp, FILE *file,
int optimize_p ATTRIBUTE_UNUSED)
{
+ rtx_insn *first = *firstp;
+
block_depth = 0;
this_is_asm_operands = 0;
@@ -4544,8 +4546,9 @@ rest_of_handle_final (void)
variable_tracking_main ();
assemble_start_function (current_function_decl, fnname);
- final_start_function (get_insns (), asm_out_file, optimize);
- final (get_insns (), asm_out_file, optimize);
+ rtx_insn *first = get_insns ();
+ final_start_function (&first, asm_out_file, optimize);
+ final (first, asm_out_file, optimize);
if (flag_ipa_ra
&& !lookup_attribute ("noipa", DECL_ATTRIBUTES (current_function_decl)))
collect_fn_hard_reg_usage ();
@@ -59,7 +59,7 @@ const char *get_some_local_dynamic_name ();
for the new function. The label for the function and associated
assembler pseudo-ops have already been output in
`assemble_start_function'. */
-extern void final_start_function (rtx_insn *, FILE *, int);
+extern void final_start_function (rtx_insn **, FILE *, int);
/* Output assembler code for the end of a function.
For clarity, args are same as those of `final_start_function'