From: Jeffrey A Law Date: Sat, 19 Aug 2000 15:49:01 +0000 (+0000) Subject: reload1.c (reload_as_needed): Accept dumpfile argument, pass it to emit_reload_insns. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=850aac532e0a0846f12c6c84c42370749c9bf461;p=gcc.git reload1.c (reload_as_needed): Accept dumpfile argument, pass it to emit_reload_insns. * reload1.c (reload_as_needed): Accept dumpfile argument, pass it to emit_reload_insns. (emit_reload_insns): Add new dumpfile argument. If non-null then dump the reloads for each insn into the dumpfile. (reload): Pass dumpfile to reload_as_needed. From-SVN: r35807 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 14b92e33a7f..eb714b1190f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ Sat Aug 19 09:18:47 2000 Jeffrey A Law (law@cygnus.com) + * reload1.c (reload_as_needed): Accept dumpfile argument, + pass it to emit_reload_insns. + (emit_reload_insns): Add new dumpfile argument. If non-null + then dump the reloads for each insn into the dumpfile. + (reload): Pass dumpfile to reload_as_needed. + * invoke.texi: Clean up linux-gnu vs linux comments. 2000-08-19 Richard Henderson diff --git a/gcc/reload1.c b/gcc/reload1.c index f6daf4899e2..ecbc1f0832f 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -401,7 +401,7 @@ static void ior_hard_reg_set PARAMS ((HARD_REG_SET *, HARD_REG_SET *)); static void scan_paradoxical_subregs PARAMS ((rtx)); static void count_pseudo PARAMS ((int)); static void order_regs_for_reload PARAMS ((struct insn_chain *)); -static void reload_as_needed PARAMS ((int)); +static void reload_as_needed PARAMS ((int, FILE *)); static void forget_old_reloads_1 PARAMS ((rtx, rtx, void *)); static int reload_reg_class_lower PARAMS ((const PTR, const PTR)); static void mark_reload_reg_in_use PARAMS ((unsigned int, int, @@ -431,7 +431,7 @@ static void do_input_reload PARAMS ((struct insn_chain *, struct reload *, int)); static void do_output_reload PARAMS ((struct insn_chain *, struct reload *, int)); -static void emit_reload_insns PARAMS ((struct insn_chain *)); +static void emit_reload_insns PARAMS ((struct insn_chain *, FILE *)); static void delete_output_reload PARAMS ((rtx, int, int)); static void delete_address_reloads PARAMS ((rtx, rtx)); static void delete_address_reloads_1 PARAMS ((rtx, rtx, rtx)); @@ -1023,7 +1023,7 @@ reload (first, global, dumpfile) { int old_frame_size = get_frame_size (); - reload_as_needed (global); + reload_as_needed (global, dumpfile); if (old_frame_size != get_frame_size ()) abort (); @@ -3717,8 +3717,9 @@ scan_paradoxical_subregs (x) as the insns are scanned. */ static void -reload_as_needed (live_known) +reload_as_needed (live_known, dumpfile) int live_known; + FILE *dumpfile; { struct insn_chain *chain; #if defined (AUTO_INC_DEC) @@ -3819,7 +3820,7 @@ reload_as_needed (live_known) /* Generate the insns to reload operands into or out of their reload regs. */ - emit_reload_insns (chain); + emit_reload_insns (chain, dumpfile); /* Substitute the chosen reload regs from reload_reg_rtx into the insn's body (or perhaps into the bodies of other @@ -6770,8 +6771,9 @@ do_output_reload (chain, rl, j) /* Output insns to reload values in and out of the chosen reload regs. */ static void -emit_reload_insns (chain) +emit_reload_insns (chain, dumpfile) struct insn_chain *chain; + FILE *dumpfile; { rtx insn = chain->insn; @@ -6792,6 +6794,13 @@ emit_reload_insns (chain) operand_reload_insns = 0; other_operand_reload_insns = 0; + /* Dump reloads into the dump file. */ + if (dumpfile) + { + fprintf (dumpfile, "\nReloads for insn # %d\n", INSN_UID (insn)); + debug_reload_to_stream (dumpfile); + } + /* Now output the instructions to copy the data into and out of the reload registers. Do these in the order that the reloads were reported, since reloads of base and index registers precede reloads of operands