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]

[patch] Clean up dump_file usage


Hello,

when I attempted to implement a way how to control dump details level
more precisely, I run into problems, since throughout the ages, we
devised various clever ways how to (miss)use dump files.  This patch
attempts to clean up it a bit.  It ensures that (up to a few exceptions),
the following rules are observed:

1) All the dumps go to dump_file, directly using the global variable
   (in several passes, we were either passing dump_file around in
   arguments, or assigned it to a local static variable, or even used
   a higher level of magic -- see e.g. profile_dump_file).
2) The only functions that take FILE * argument to choose file to that
   the information goes are the debugging functions that do nothing
   except for producing the dumps.
3) Arguments of such functions, as well as local variables, are not
   called dump_file.

The patch is huge, but mostly a mechanical renaming.  There should be
almost no functionality changes (in about two cases, extra dumps will be
produced, since we used to pass NULL to a function that now does not
take dump argument).  The patch was bootstrapped & regtested it on i686,
ia64 and ppc.  I could not test the patch on all architectures whose
subdirectories are affected, but given that both the changes and the fix
in case there is a mistake are trivial, I believe this should not be a
problem.

Zdenek

	* tree-vrp.c (execute_vrp): Do not pass dump argument to.
	loop_optimizer_init and loop_optimizer_finalize
	* tree-ssa-sink.c (execute_sink_code): Ditto.
	* tree-ssa-loop-ch.c (copy_loop_headers): Ditto.
	* tree-ssa-loop.c (tree_loop_optimizer_init, tree_ssa_loop_init,
	tree_ssa_loop_done): Ditto.
	* tree-ssa-pre.c (init_pre, fini_pre): Ditto.
	* sched-ebb.c: Include output.h.
	(schedule_ebbs): Do not use dump argument.
	* value-prof.h (struct profile_hooks): Remove profile_dump_file.
	* loop.c (loop_dump_stream): Removed.
	(loop_optimize, rest_of_handle_loop_optimize): Do not use dump
	argument.
	(scan_loop, move_movables, find_and_verify_loops, mark_loop_jump,
	emit_prefetch_instructions, loop_bivs_find, loop_bivs_check,
	final_biv_value, loop_biv_eliminable_p, loop_givs_rescan,
	loop_iterations, strength_reduce, record_biv, record_giv,
	final_giv_value, check_final_value, check_ext_dependent_givs,
	combine_givs, check_dbra_loop, maybe_eliminate_biv, load_mems,
	try_copy_prop, loop_delete_insns, try_swap_copy_prop): Use
	dump_file instead of loop_dump_stream.
	* ddg.c (print_ddg_edge, print_ddg, vcg_print_ddg): Do not call
	argument dump_file.
	* reorg.c (dbr_schedule, rest_of_handle_delay_slots): Do not use
	dump argument.
	* flow.c (life_analysis, rest_of_handle_life): Ditto.
	* haifa-sched.c: Include output.h
	(schedule_insns, sched_init): Do not use dump argument.
	* mode-switching.c (optimize_mode_switching): Ditto.
	* modulo-sched.c (stats_file): Removed.
	(print_node_sched_params): Do not call argument dump_file.
	(sms_schedule_by_order, loop_canon_p, sms_schedule,
	rest_of_handle_sms): Do not use dump argument.  Use dump_file instead
	of stats_file.
	* cse.c (cse_main, rest_of_handle_cse, rest_of_handle_cse2): Do not
	use dump argument.
	* loop-init.c (loop_optimizer_init, loop_optimizer_finalize,
	rtl_loop_init, rtl_loop_done): Ditto.
	* global.c (global_alloc, rest_of_handle_global_alloc): Ditto.
	* predict.c (combine_predictions_for_bb, tree_estimate_probability):
	Ditto.
	* recog.c (peephole2_optimize, rest_of_handle_peephole2): Ditto.
	* lcm.c (pre_edge_lcm, pre_edge_rev_lcm): Ditto.
	* regmove.c (fixup_match_1, fixup_match_2, regmove_optimize,
	rest_of_handle_regmove, rest_of_handle_stack_adjustments): Ditto.
	* emit-rtl.c (renumber_insns): Ditto.
	* cfgexpand.c (add_reg_br_prob_note, expand_gimple_cond_expr,
	expand_gimple_basic_block, tree_expand_cfg): Ditto.
	* regclass.c (regclass): Ditto.
	* tree-outof-ssa.c (analyze_edges_for_bb, perform_edge_inserts,
	remove_ssa_form, rewrite_out_of_ssa): Ditto.
	* reg-stack.c (compensate_edge, compensate_edges, convert_regs_1,
	convert_regs_2, convert_regs, reg_to_stack, rest_of_handle_stack_regs):
	Ditto.
	* sched-rgn.c (schedule_insns, rest_of_handle_sched): Ditto.
	* local-alloc.c (rest_of_handle_local_alloc): Do not pass dump_file
	to regclass.
	* gcse.c (gcse_file, debug_stderr): Removed.
	(gcse_main, bypass_jumps, rest_of_handle_jump_bypass,
	rest_of_handle_gcse): Do not use dump argument.
	(cprop_jump, cprop_insn, do_local_cprop, cprop, find_implicit_sets,
	one_cprop_pass, bypass_block, compute_pre_data, insert_insn_end_bb,
	pre_edge_insert, pre_insert_copy_insn, pre_delete, one_pre_gcse_pass,
	compute_code_hoist_vbeinout, compute_code_hoist_data,
	one_code_hoisting_pass, trim_ld_motion_mems, update_ld_motion_stores,
	compute_store_table, build_store_vectors, insert_insn_start_bb,
	insert_store, remove_reachable_equiv_notes, replace_store_insn,
	store_motion): Use dump_file instead of gcse_file.
	* ipa-type-escape.c (type_escape_execute): Remove debugging comments.
	* profile.c (profile_dump_file): Removed.
	(branch_prob): Use dump_file instead of profile_dump_file.
	* ipa.c (cgraph_remove_unreachable_nodes): Do not call argument
	dump_file.
	* tree-ssa-copy.c (dump_copy_of): Ditto.
	* rtl-factoring.c (rtl_seqabstr, rest_of_rtl_seqabstr): Do not pass
	dump file to life_analysis.
	* bt-load.c (branch_target_load_optimize): Ditto.
	* cfgcleanup.c (rest_of_handle_jump2): Do not pass dump_file to
	renumber_insns.
	* rtl.h (cse_main, renumber_insns, schedule_insns, schedule_ebbs,
	regclass, dbr_schedule): Declaration changed.
	* sched-int.h (sched_init): Declaration changed.
	* tree-profile.c (tree_profile_dump_file): Removed.
	(tree_profile_hooks): Removed profile_dump_file hook.
	* rtl-profile (rtl_profile_dump_file): Removed.
	(rtl_profile_hooks): emoved profile_dump_file hook.
	* cfgloop.h (loop_optimizer_init, loop_optimizer_finalize): Declaration
	changed.
	* c-gimplify.c (c_genericize): Do not call local variable dump_file.
	* tree-cfg.c (build_tree_cfg): Ditto.
	* Makefile.in (haifa-sched.o, sched-ebb.o): Add output.h dependency.
	* basic-block.h (life_analysis, pre_edge_lcm, pre_edge_rev_lcm):
	Declaration changed.
	* config/sh/sh.c (sh_output_mi_thunk): Do not pass dump_file to
	life_analysis and schedule_insns.
	* config/m68hc11/m68hc11.c (m68hc11_reorg): Do not pass dump_file to
	life_analysis.
	* config/mt/mt.c (mt_machine_reorg): Do not pass dump_file to
	dbr_schedule.
	* config/mips/mips.c (mips_reorg): Ditto.
	* config/ia64/ia64.c (ia64_reorg): Do not pass dump_file to
	schedule_ebbs.

Index: tree-vrp.c
===================================================================
*** tree-vrp.c	(revision 110621)
--- tree-vrp.c	(working copy)
*************** execute_vrp (void)
*** 4308,4314 ****
  {
    insert_range_assertions ();
  
!   current_loops = loop_optimizer_init (NULL, LOOPS_NORMAL);
    if (current_loops)
      scev_initialize (current_loops);
  
--- 4308,4314 ----
  {
    insert_range_assertions ();
  
!   current_loops = loop_optimizer_init (LOOPS_NORMAL);
    if (current_loops)
      scev_initialize (current_loops);
  
*************** execute_vrp (void)
*** 4319,4325 ****
    if (current_loops)
      {
        scev_finalize ();
!       loop_optimizer_finalize (current_loops, NULL);
        current_loops = NULL;
      }
  
--- 4319,4325 ----
    if (current_loops)
      {
        scev_finalize ();
!       loop_optimizer_finalize (current_loops);
        current_loops = NULL;
      }
  
Index: sched-ebb.c
===================================================================
*** sched-ebb.c	(revision 110621)
--- sched-ebb.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 41,46 ****
--- 41,47 ----
  #include "params.h"
  #include "sched-int.h"
  #include "target.h"
+ #include "output.h"
  
  /* The number of insns to be scheduled in total.  */
  static int target_n_insns;
*************** schedule_ebb (rtx head, rtx tail)
*** 551,561 ****
    return b;
  }
  
! /* The one entry point in this file.  DUMP_FILE is the dump file for
!    this pass.  */
  
  void
! schedule_ebbs (FILE *dump_file)
  {
    basic_block bb;
    int probability_cutoff;
--- 552,561 ----
    return b;
  }
  
! /* The one entry point in this file.  */
  
  void
! schedule_ebbs (void)
  {
    basic_block bb;
    int probability_cutoff;
*************** schedule_ebbs (FILE *dump_file)
*** 571,577 ****
    if (n_basic_blocks == NUM_FIXED_BLOCKS)
      return;
  
!   sched_init (dump_file);
  
    current_sched_info = &ebb_sched_info;
  
--- 571,577 ----
    if (n_basic_blocks == NUM_FIXED_BLOCKS)
      return;
  
!   sched_init ();
  
    current_sched_info = &ebb_sched_info;
  
Index: tree-ssa-loop-ch.c
===================================================================
*** tree-ssa-loop-ch.c	(revision 110621)
--- tree-ssa-loop-ch.c	(working copy)
*************** copy_loop_headers (void)
*** 132,139 ****
    unsigned n_bbs;
    unsigned bbs_size;
  
!   loops = loop_optimizer_init (dump_file, (LOOPS_HAVE_PREHEADERS
! 					   | LOOPS_HAVE_SIMPLE_LATCHES));
    if (!loops)
      return;
  
--- 132,139 ----
    unsigned n_bbs;
    unsigned bbs_size;
  
!   loops = loop_optimizer_init (LOOPS_HAVE_PREHEADERS
! 			       | LOOPS_HAVE_SIMPLE_LATCHES);
    if (!loops)
      return;
  
*************** copy_loop_headers (void)
*** 213,219 ****
    free (bbs);
    free (copied_bbs);
  
!   loop_optimizer_finalize (loops, NULL);
  }
  
  static bool
--- 213,219 ----
    free (bbs);
    free (copied_bbs);
  
!   loop_optimizer_finalize (loops);
  }
  
  static bool
Index: value-prof.h
===================================================================
*** value-prof.h	(revision 110621)
--- value-prof.h	(working copy)
*************** struct profile_hooks {
*** 94,100 ****
    /* Insert code to find the most common value of a difference between two
       evaluations of an expression.  */
    void (*gen_const_delta_profiler) (histogram_value, unsigned, unsigned);
-   FILE * (*profile_dump_file) (void);
  };
  
  /* In profile.c.  */
--- 94,99 ----
Index: loop.c
===================================================================
*** loop.c	(revision 110621)
--- loop.c	(working copy)
*************** struct movable
*** 590,597 ****
  };
  
  
- static FILE *loop_dump_stream;
- 
  /* Forward declarations.  */
  
  static void invalidate_loops_containing_label (rtx);
--- 590,595 ----
*************** compute_luids (rtx start, rtx end, int p
*** 799,810 ****
  }
  
  /* Entry point of this file.  Perform loop optimization
!    on the current function.  F is the first insn of the function
!    and DUMPFILE is a stream for output of a trace of actions taken
!    (or 0 if none should be output).  */
  
  static void
! loop_optimize (rtx f, FILE *dumpfile, int flags)
  {
    rtx insn;
    int i;
--- 797,806 ----
  }
  
  /* Entry point of this file.  Perform loop optimization
!    on the current function.  F is the first insn of the function.  */
  
  static void
! loop_optimize (rtx f, int flags)
  {
    rtx insn;
    int i;
*************** loop_optimize (rtx f, FILE *dumpfile, in
*** 812,819 ****
    struct loops *loops = &loops_data;
    struct loop_info *loops_info;
  
-   loop_dump_stream = dumpfile;
- 
    init_recog_no_volatile ();
  
    max_reg_before_loop = max_reg_num ();
--- 808,813 ----
*************** scan_loop (struct loop *loop, int flags)
*** 1091,1098 ****
    if (INSN_UID (loop->scan_start) >= max_uid_for_loop
        || !LABEL_P (loop->scan_start))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "\nLoop from %d to %d is phony.\n\n",
  		 INSN_UID (loop_start), INSN_UID (loop_end));
        return;
      }
--- 1085,1092 ----
    if (INSN_UID (loop->scan_start) >= max_uid_for_loop
        || !LABEL_P (loop->scan_start))
      {
!       if (dump_file)
! 	fprintf (dump_file, "\nLoop from %d to %d is phony.\n\n",
  		 INSN_UID (loop_start), INSN_UID (loop_end));
        return;
      }
*************** scan_loop (struct loop *loop, int flags)
*** 1103,1110 ****
    loop_regs_scan (loop, loop_info->mems_idx + 16);
    insn_count = count_insns_in_loop (loop);
  
!   if (loop_dump_stream)
!     fprintf (loop_dump_stream, "\nLoop from %d to %d: %d real insns.\n",
  	     INSN_UID (loop_start), INSN_UID (loop_end), insn_count);
  
    /* Scan through the loop finding insns that are safe to move.
--- 1097,1104 ----
    loop_regs_scan (loop, loop_info->mems_idx + 16);
    insn_count = count_insns_in_loop (loop);
  
!   if (dump_file)
!     fprintf (dump_file, "\nLoop from %d to %d: %d real insns.\n",
  	     INSN_UID (loop_start), INSN_UID (loop_end), insn_count);
  
    /* Scan through the loop finding insns that are safe to move.
*************** move_movables (struct loop *loop, struct
*** 2195,2221 ****
      {
        /* Describe this movable insn.  */
  
!       if (loop_dump_stream)
  	{
! 	  fprintf (loop_dump_stream, "Insn %d: regno %d (life %d), ",
  		   INSN_UID (m->insn), m->regno, m->lifetime);
  	  if (m->consec > 0)
! 	    fprintf (loop_dump_stream, "consec %d, ", m->consec);
  	  if (m->cond)
! 	    fprintf (loop_dump_stream, "cond ");
  	  if (m->force)
! 	    fprintf (loop_dump_stream, "force ");
  	  if (m->global)
! 	    fprintf (loop_dump_stream, "global ");
  	  if (m->done)
! 	    fprintf (loop_dump_stream, "done ");
  	  if (m->move_insn)
! 	    fprintf (loop_dump_stream, "move-insn ");
  	  if (m->match)
! 	    fprintf (loop_dump_stream, "matches %d ",
  		     INSN_UID (m->match->insn));
  	  if (m->forces)
! 	    fprintf (loop_dump_stream, "forces %d ",
  		     INSN_UID (m->forces->insn));
  	}
  
--- 2189,2215 ----
      {
        /* Describe this movable insn.  */
  
!       if (dump_file)
  	{
! 	  fprintf (dump_file, "Insn %d: regno %d (life %d), ",
  		   INSN_UID (m->insn), m->regno, m->lifetime);
  	  if (m->consec > 0)
! 	    fprintf (dump_file, "consec %d, ", m->consec);
  	  if (m->cond)
! 	    fprintf (dump_file, "cond ");
  	  if (m->force)
! 	    fprintf (dump_file, "force ");
  	  if (m->global)
! 	    fprintf (dump_file, "global ");
  	  if (m->done)
! 	    fprintf (dump_file, "done ");
  	  if (m->move_insn)
! 	    fprintf (dump_file, "move-insn ");
  	  if (m->match)
! 	    fprintf (dump_file, "matches %d ",
  		     INSN_UID (m->match->insn));
  	  if (m->forces)
! 	    fprintf (dump_file, "forces %d ",
  		     INSN_UID (m->forces->insn));
  	}
  
*************** move_movables (struct loop *loop, struct
*** 2243,2253 ****
  	  p = m->insn;
  	  regno = m->regno;
  
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "savings %d ", savings);
  
! 	  if (regs->array[regno].moved_once && loop_dump_stream)
! 	    fprintf (loop_dump_stream, "halved since already moved ");
  
  	  /* An insn MUST be moved if we already moved something else
  	     which is safe only if this one is moved too: that is,
--- 2237,2247 ----
  	  p = m->insn;
  	  regno = m->regno;
  
! 	  if (dump_file)
! 	    fprintf (dump_file, "savings %d ", savings);
  
! 	  if (regs->array[regno].moved_once && dump_file)
! 	    fprintf (dump_file, "halved since already moved ");
  
  	  /* An insn MUST be moved if we already moved something else
  	     which is safe only if this one is moved too: that is,
*************** move_movables (struct loop *loop, struct
*** 2305,2312 ****
  		  if (new_start == 0)
  		    new_start = i1;
  
! 		  if (loop_dump_stream)
! 		    fprintf (loop_dump_stream, " moved to %d", INSN_UID (i1));
  		}
  	      /* If we are to re-generate the item being moved with a
  		 new move insn, first delete what we have and then emit
--- 2299,2306 ----
  		  if (new_start == 0)
  		    new_start = i1;
  
! 		  if (dump_file)
! 		    fprintf (dump_file, " moved to %d", INSN_UID (i1));
  		}
  	      /* If we are to re-generate the item being moved with a
  		 new move insn, first delete what we have and then emit
*************** move_movables (struct loop *loop, struct
*** 2377,2384 ****
  					 m->is_equiv ? REG_EQUIV : REG_EQUAL,
  					 m->set_src);
  
! 		  if (loop_dump_stream)
! 		    fprintf (loop_dump_stream, " moved to %d", INSN_UID (i1));
  
  		  /* The more regs we move, the less we like moving them.  */
  		  threshold -= 3;
--- 2371,2378 ----
  					 m->is_equiv ? REG_EQUIV : REG_EQUAL,
  					 m->set_src);
  
! 		  if (dump_file)
! 		    fprintf (dump_file, " moved to %d", INSN_UID (i1));
  
  		  /* The more regs we move, the less we like moving them.  */
  		  threshold -= 3;
*************** move_movables (struct loop *loop, struct
*** 2566,2573 ****
  		      if (new_start == 0)
  			new_start = i1;
  
! 		      if (loop_dump_stream)
! 			fprintf (loop_dump_stream, " moved to %d",
  				 INSN_UID (i1));
  
  		      /* If library call, now fix the REG_NOTES that contain
--- 2560,2567 ----
  		      if (new_start == 0)
  			new_start = i1;
  
! 		      if (dump_file)
! 			fprintf (dump_file, " moved to %d",
  				 INSN_UID (i1));
  
  		      /* If library call, now fix the REG_NOTES that contain
*************** move_movables (struct loop *loop, struct
*** 2679,2692 ****
  			}
  		    }
  	    }
! 	  else if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "not desirable");
  	}
!       else if (loop_dump_stream && !m->match)
! 	fprintf (loop_dump_stream, "not safe");
  
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "\n");
      }
  
    if (new_start == 0)
--- 2673,2686 ----
  			}
  		    }
  	    }
! 	  else if (dump_file)
! 	    fprintf (dump_file, "not desirable");
  	}
!       else if (dump_file && !m->match)
! 	fprintf (dump_file, "not safe");
  
!       if (dump_file)
! 	fprintf (dump_file, "\n");
      }
  
    if (new_start == 0)
*************** find_and_verify_loops (rtx f, struct loo
*** 3102,3109 ****
  	  for (loop = current_loop; loop; loop = loop->outer)
  	    {
  	      loop->invalid = 1;
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "\nLoop at %d ignored due to setjmp.\n",
  			 INSN_UID (loop->start));
  	    }
--- 3096,3103 ----
  	  for (loop = current_loop; loop; loop = loop->outer)
  	    {
  	      loop->invalid = 1;
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "\nLoop at %d ignored due to setjmp.\n",
  			 INSN_UID (loop->start));
  	    }
*************** mark_loop_jump (rtx x, struct loop *loop
*** 3464,3471 ****
  	      return;
  
  	  /* If we get here, we know we need to invalidate a loop.  */
! 	  if (loop_dump_stream && ! dest_loop->invalid)
! 	    fprintf (loop_dump_stream,
  		     "\nLoop at %d ignored due to multiple entry points.\n",
  		     INSN_UID (dest_loop->start));
  
--- 3458,3465 ----
  	      return;
  
  	  /* If we get here, we know we need to invalidate a loop.  */
! 	  if (dump_file && ! dest_loop->invalid)
! 	    fprintf (dump_file,
  		     "\nLoop at %d ignored due to multiple entry points.\n",
  		     INSN_UID (dest_loop->start));
  
*************** mark_loop_jump (rtx x, struct loop *loop
*** 3504,3511 ****
  	{
  	  for (outer_loop = loop; outer_loop; outer_loop = outer_loop->outer)
  	    {
! 	      if (loop_dump_stream && ! outer_loop->invalid)
! 		fprintf (loop_dump_stream,
  			 "\nLoop at %d ignored due to unknown exit jump.\n",
  			 INSN_UID (outer_loop->start));
  	      outer_loop->invalid = 1;
--- 3498,3505 ----
  	{
  	  for (outer_loop = loop; outer_loop; outer_loop = outer_loop->outer)
  	    {
! 	      if (dump_file && ! outer_loop->invalid)
! 		fprintf (dump_file,
  			 "\nLoop at %d ignored due to unknown exit jump.\n",
  			 INSN_UID (outer_loop->start));
  	      outer_loop->invalid = 1;
*************** emit_prefetch_instructions (struct loop 
*** 4143,4150 ****
       slow enough to read the memory.  */
    if (PREFETCH_NO_CALL && LOOP_INFO (loop)->has_call)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "Prefetch: ignoring loop: has call.\n");
  
        return;
      }
--- 4137,4144 ----
       slow enough to read the memory.  */
    if (PREFETCH_NO_CALL && LOOP_INFO (loop)->has_call)
      {
!       if (dump_file)
! 	fprintf (dump_file, "Prefetch: ignoring loop: has call.\n");
  
        return;
      }
*************** emit_prefetch_instructions (struct loop 
*** 4154,4161 ****
        && LOOP_INFO (loop)->n_iterations
        && LOOP_INFO (loop)->n_iterations <= PREFETCH_LOW_LOOPCNT)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Prefetch: ignoring loop: not enough iterations.\n");
        return;
      }
--- 4148,4155 ----
        && LOOP_INFO (loop)->n_iterations
        && LOOP_INFO (loop)->n_iterations <= PREFETCH_LOW_LOOPCNT)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Prefetch: ignoring loop: not enough iterations.\n");
        return;
      }
*************** emit_prefetch_instructions (struct loop 
*** 4180,4205 ****
  	     heuristics more conservative.  */
  	  if (GET_CODE (biv->add_val) != CONST_INT)
  	    {
! 	      if (loop_dump_stream)
  		{
! 		  fprintf (loop_dump_stream,
  		    "Prefetch: ignoring biv %d: non-constant addition at insn %d:",
  			   REGNO (biv->src_reg), INSN_UID (biv->insn));
! 		  print_rtl (loop_dump_stream, biv->add_val);
! 		  fprintf (loop_dump_stream, "\n");
  		}
  	      break;
  	    }
  
  	  if (biv->maybe_multiple)
  	    {
! 	      if (loop_dump_stream)
  		{
! 		  fprintf (loop_dump_stream,
  			   "Prefetch: ignoring biv %d: maybe_multiple at insn %i:",
  			   REGNO (biv->src_reg), INSN_UID (biv->insn));
! 		  print_rtl (loop_dump_stream, biv->add_val);
! 		  fprintf (loop_dump_stream, "\n");
  		}
  	      break;
  	    }
--- 4174,4199 ----
  	     heuristics more conservative.  */
  	  if (GET_CODE (biv->add_val) != CONST_INT)
  	    {
! 	      if (dump_file)
  		{
! 		  fprintf (dump_file,
  		    "Prefetch: ignoring biv %d: non-constant addition at insn %d:",
  			   REGNO (biv->src_reg), INSN_UID (biv->insn));
! 		  print_rtl (dump_file, biv->add_val);
! 		  fprintf (dump_file, "\n");
  		}
  	      break;
  	    }
  
  	  if (biv->maybe_multiple)
  	    {
! 	      if (dump_file)
  		{
! 		  fprintf (dump_file,
  			   "Prefetch: ignoring biv %d: maybe_multiple at insn %i:",
  			   REGNO (biv->src_reg), INSN_UID (biv->insn));
! 		  print_rtl (dump_file, biv->add_val);
! 		  fprintf (dump_file, "\n");
  		}
  	      break;
  	    }
*************** emit_prefetch_instructions (struct loop 
*** 4266,4273 ****
  
  	  if (ignore_reason != NULL)
  	    {
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "Prefetch: ignoring giv at %d: %s.\n",
  			 INSN_UID (iv->insn), ignore_reason);
  	      continue;
--- 4260,4267 ----
  
  	  if (ignore_reason != NULL)
  	    {
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "Prefetch: ignoring giv at %d: %s.\n",
  			 INSN_UID (iv->insn), ignore_reason);
  	      continue;
*************** emit_prefetch_instructions (struct loop 
*** 4290,4297 ****
  	    note_stores (PATTERN (iv->insn), check_store, &d);
  	  else
  	    {
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream, "Prefetch: Ignoring giv at %d: %s\n",
  			 INSN_UID (iv->insn), "in conditional code.");
  	      continue;
  	    }
--- 4284,4291 ----
  	    note_stores (PATTERN (iv->insn), check_store, &d);
  	  else
  	    {
! 	      if (dump_file)
! 		fprintf (dump_file, "Prefetch: Ignoring giv at %d: %s\n",
  			 INSN_UID (iv->insn), "in conditional code.");
  	      continue;
  	    }
*************** emit_prefetch_instructions (struct loop 
*** 4345,4352 ****
  	      num_prefetches++;
  	      if (num_prefetches >= MAX_PREFETCHES)
  		{
! 		  if (loop_dump_stream)
! 		    fprintf (loop_dump_stream,
  			     "Maximal number of prefetches exceeded.\n");
  		  return;
  		}
--- 4339,4346 ----
  	      num_prefetches++;
  	      if (num_prefetches >= MAX_PREFETCHES)
  		{
! 		  if (dump_file)
! 		    fprintf (dump_file,
  			     "Maximal number of prefetches exceeded.\n");
  		  return;
  		}
*************** emit_prefetch_instructions (struct loop 
*** 4383,4390 ****
  	else
  	  {
  	    info[i].prefetch_in_loop = 0, info[i].prefetch_before_loop = 0;
! 	    if (loop_dump_stream)
! 	      fprintf (loop_dump_stream,
  		  "Prefetch: ignoring giv at %d: %d%% density is too low.\n",
  		       INSN_UID (info[i].giv->insn), density);
  	  }
--- 4377,4384 ----
  	else
  	  {
  	    info[i].prefetch_in_loop = 0, info[i].prefetch_before_loop = 0;
! 	    if (dump_file)
! 	      fprintf (dump_file,
  		  "Prefetch: ignoring giv at %d: %d%% density is too low.\n",
  		       INSN_UID (info[i].giv->insn), density);
  	  }
*************** emit_prefetch_instructions (struct loop 
*** 4408,4415 ****
      {
        if ((ahead = SIMULTANEOUS_PREFETCHES / num_real_prefetches) == 0)
  	{
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Prefetch: ignoring prefetches within loop: ahead is zero; %d < %d\n",
  		     SIMULTANEOUS_PREFETCHES, num_real_prefetches);
  	  num_real_prefetches = 0, num_real_write_prefetches = 0;
--- 4402,4409 ----
      {
        if ((ahead = SIMULTANEOUS_PREFETCHES / num_real_prefetches) == 0)
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Prefetch: ignoring prefetches within loop: ahead is zero; %d < %d\n",
  		     SIMULTANEOUS_PREFETCHES, num_real_prefetches);
  	  num_real_prefetches = 0, num_real_write_prefetches = 0;
*************** emit_prefetch_instructions (struct loop 
*** 4438,4464 ****
  	    num_write_prefetches_before += n;
  	}
  
!       if (loop_dump_stream)
  	{
  	  if (info[i].prefetch_in_loop == 0
  	      && info[i].prefetch_before_loop == 0)
  	    continue;
! 	  fprintf (loop_dump_stream, "Prefetch insn: %d",
  		   INSN_UID (info[i].giv->insn));
! 	  fprintf (loop_dump_stream,
  		   "; in loop: %d; before: %d; %s\n",
  		   info[i].prefetch_in_loop,
  		   info[i].prefetch_before_loop,
  		   info[i].write ? "read/write" : "read only");
! 	  fprintf (loop_dump_stream,
  		   " density: %d%%; bytes_accessed: %u; total_bytes: %u\n",
  		   (int) (info[i].bytes_accessed * 100 / info[i].stride),
  		   info[i].bytes_accessed, info[i].total_bytes);
! 	  fprintf (loop_dump_stream, " index: " HOST_WIDE_INT_PRINT_DEC
  		   "; stride: " HOST_WIDE_INT_PRINT_DEC "; address: ",
  		   info[i].index, info[i].stride);
! 	  print_rtl (loop_dump_stream, info[i].base_address);
! 	  fprintf (loop_dump_stream, "\n");
  	}
      }
  
--- 4432,4458 ----
  	    num_write_prefetches_before += n;
  	}
  
!       if (dump_file)
  	{
  	  if (info[i].prefetch_in_loop == 0
  	      && info[i].prefetch_before_loop == 0)
  	    continue;
! 	  fprintf (dump_file, "Prefetch insn: %d",
  		   INSN_UID (info[i].giv->insn));
! 	  fprintf (dump_file,
  		   "; in loop: %d; before: %d; %s\n",
  		   info[i].prefetch_in_loop,
  		   info[i].prefetch_before_loop,
  		   info[i].write ? "read/write" : "read only");
! 	  fprintf (dump_file,
  		   " density: %d%%; bytes_accessed: %u; total_bytes: %u\n",
  		   (int) (info[i].bytes_accessed * 100 / info[i].stride),
  		   info[i].bytes_accessed, info[i].total_bytes);
! 	  fprintf (dump_file, " index: " HOST_WIDE_INT_PRINT_DEC
  		   "; stride: " HOST_WIDE_INT_PRINT_DEC "; address: ",
  		   info[i].index, info[i].stride);
! 	  print_rtl (dump_file, info[i].base_address);
! 	  fprintf (dump_file, "\n");
  	}
      }
  
*************** emit_prefetch_instructions (struct loop 
*** 4467,4477 ****
        /* Record that this loop uses prefetch instructions.  */
        LOOP_INFO (loop)->has_prefetch = 1;
  
!       if (loop_dump_stream)
  	{
! 	  fprintf (loop_dump_stream, "Real prefetches needed within loop: %d (write: %d)\n",
  		   num_real_prefetches, num_real_write_prefetches);
! 	  fprintf (loop_dump_stream, "Real prefetches needed before loop: %d (write: %d)\n",
  		   num_prefetches_before, num_write_prefetches_before);
  	}
      }
--- 4461,4471 ----
        /* Record that this loop uses prefetch instructions.  */
        LOOP_INFO (loop)->has_prefetch = 1;
  
!       if (dump_file)
  	{
! 	  fprintf (dump_file, "Real prefetches needed within loop: %d (write: %d)\n",
  		   num_real_prefetches, num_real_write_prefetches);
! 	  fprintf (dump_file, "Real prefetches needed before loop: %d (write: %d)\n",
  		   num_prefetches_before, num_write_prefetches_before);
  	}
      }
*************** loop_bivs_find (struct loop *loop)
*** 4811,4818 ****
  	     move.  So leave it alone.  */
  	  || ! bl->incremented)
  	{
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "Biv %d: discarded, %s\n",
  		     bl->regno,
  		     (REG_IV_TYPE (ivs, bl->regno) != BASIC_INDUCT
  		      ? "not induction variable"
--- 4805,4812 ----
  	     move.  So leave it alone.  */
  	  || ! bl->incremented)
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file, "Biv %d: discarded, %s\n",
  		     bl->regno,
  		     (REG_IV_TYPE (ivs, bl->regno) != BASIC_INDUCT
  		      ? "not induction variable"
*************** loop_bivs_find (struct loop *loop)
*** 4826,4833 ****
  	{
  	  backbl = &bl->next;
  
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "Biv %d: verified\n", bl->regno);
  	}
      }
  }
--- 4820,4827 ----
  	{
  	  backbl = &bl->next;
  
! 	  if (dump_file)
! 	    fprintf (dump_file, "Biv %d: verified\n", bl->regno);
  	}
      }
  }
*************** loop_bivs_check (struct loop *loop)
*** 4916,4923 ****
        else
  	src = SET_SRC (bl->init_set);
  
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Biv %d: initialized at insn %d: initial value ",
  		 bl->regno, INSN_UID (bl->init_insn));
  
--- 4910,4917 ----
        else
  	src = SET_SRC (bl->init_set);
  
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Biv %d: initialized at insn %d: initial value ",
  		 bl->regno, INSN_UID (bl->init_insn));
  
*************** loop_bivs_check (struct loop *loop)
*** 4929,4944 ****
  	{
  	  bl->initial_value = src;
  
! 	  if (loop_dump_stream)
  	    {
! 	      print_simple_rtl (loop_dump_stream, src);
! 	      fputc ('\n', loop_dump_stream);
  	    }
  	}
        /* If we can't make it a giv,
  	 let biv keep initial value of "itself".  */
!       else if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "is complex\n");
      }
  }
  
--- 4923,4938 ----
  	{
  	  bl->initial_value = src;
  
! 	  if (dump_file)
  	    {
! 	      print_simple_rtl (dump_file, src);
! 	      fputc ('\n', dump_file);
  	    }
  	}
        /* If we can't make it a giv,
  	 let biv keep initial value of "itself".  */
!       else if (dump_file)
! 	fprintf (dump_file, "is complex\n");
      }
  }
  
*************** final_biv_value (const struct loop *loop
*** 5152,5159 ****
       no other loop exits, so we can return any value.  */
    if (bl->reversed)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Final biv value for %d, reversed biv.\n", bl->regno);
  
        return const0_rtx;
--- 5146,5153 ----
       no other loop exits, so we can return any value.  */
    if (bl->reversed)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Final biv value for %d, reversed biv.\n", bl->regno);
  
        return const0_rtx;
*************** final_biv_value (const struct loop *loop
*** 5182,5189 ****
  	  loop_iv_add_mult_sink (loop, increment, GEN_INT (n_iterations),
  				 bl->initial_value, tem);
  
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Final biv value for %d, calculated.\n", bl->regno);
  
  	  return tem;
--- 5176,5183 ----
  	  loop_iv_add_mult_sink (loop, increment, GEN_INT (n_iterations),
  				 bl->initial_value, tem);
  
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Final biv value for %d, calculated.\n", bl->regno);
  
  	  return tem;
*************** final_biv_value (const struct loop *loop
*** 5193,5200 ****
    /* Check to see if the biv is dead at all loop exits.  */
    if (reg_dead_after_loop (loop, bl->biv->src_reg))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Final biv value for %d, biv dead after loop exit.\n",
  		 bl->regno);
  
--- 5187,5194 ----
    /* Check to see if the biv is dead at all loop exits.  */
    if (reg_dead_after_loop (loop, bl->biv->src_reg))
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Final biv value for %d, biv dead after loop exit.\n",
  		 bl->regno);
  
*************** loop_biv_eliminable_p (struct loop *loop
*** 5220,5227 ****
  #ifdef HAVE_decrement_and_branch_until_zero
    if (bl->nonneg)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Cannot eliminate nonneg biv %d.\n", bl->regno);
        return 0;
      }
--- 5214,5221 ----
  #ifdef HAVE_decrement_and_branch_until_zero
    if (bl->nonneg)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Cannot eliminate nonneg biv %d.\n", bl->regno);
        return 0;
      }
*************** loop_biv_eliminable_p (struct loop *loop
*** 5242,5253 ****
        || (bl->final_value = final_biv_value (loop, bl)))
      return maybe_eliminate_biv (loop, bl, 0, threshold,	insn_count);
  
!   if (loop_dump_stream)
      {
!       fprintf (loop_dump_stream,
  	       "Cannot eliminate biv %d.\n",
  	       bl->regno);
!       fprintf (loop_dump_stream,
  	       "First use: insn %d, last use: insn %d.\n",
  	       REGNO_FIRST_UID (bl->regno),
  	       REGNO_LAST_UID (bl->regno));
--- 5236,5247 ----
        || (bl->final_value = final_biv_value (loop, bl)))
      return maybe_eliminate_biv (loop, bl, 0, threshold,	insn_count);
  
!   if (dump_file)
      {
!       fprintf (dump_file,
  	       "Cannot eliminate biv %d.\n",
  	       bl->regno);
!       fprintf (dump_file,
  	       "First use: insn %d, last use: insn %d.\n",
  	       REGNO_FIRST_UID (bl->regno),
  	       REGNO_LAST_UID (bl->regno));
*************** loop_givs_rescan (struct loop *loop, str
*** 5537,5544 ****
  	      else
  		{
  		  end_sequence ();
! 		  if (loop_dump_stream)
! 		    fprintf (loop_dump_stream,
  			     "unable to reduce iv in insn %d\n",
  			     INSN_UID (v->insn));
  		  bl->all_reduced = 0;
--- 5531,5538 ----
  	      else
  		{
  		  end_sequence ();
! 		  if (dump_file)
! 		    fprintf (dump_file,
  			     "unable to reduce iv in insn %d\n",
  			     INSN_UID (v->insn));
  		  bl->all_reduced = 0;
*************** loop_givs_rescan (struct loop *loop, str
*** 5585,5596 ****
  				gen_load_of_final_value (v->dest_reg,
  							 v->final_value));
  
!       if (loop_dump_stream)
  	{
! 	  fprintf (loop_dump_stream, "giv at %d reduced to ",
  		   INSN_UID (v->insn));
! 	  print_simple_rtl (loop_dump_stream, v->new_reg);
! 	  fprintf (loop_dump_stream, "\n");
  	}
      }
  }
--- 5579,5590 ----
  				gen_load_of_final_value (v->dest_reg,
  							 v->final_value));
  
!       if (dump_file)
  	{
! 	  fprintf (dump_file, "giv at %d reduced to ",
  		   INSN_UID (v->insn));
! 	  print_simple_rtl (dump_file, v->new_reg);
! 	  fprintf (dump_file, "\n");
  	}
      }
  }
*************** loop_iterations (struct loop *loop)
*** 5826,5833 ****
       the last loop insn is a jump to the top of the loop.  */
    if (!JUMP_P (last_loop_insn))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: No final conditional branch found.\n");
        return 0;
      }
--- 5820,5827 ----
       the last loop insn is a jump to the top of the loop.  */
    if (!JUMP_P (last_loop_insn))
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: No final conditional branch found.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5836,5843 ****
       we cannot (easily) determine the iteration count.  */
    if (LABEL_NUSES (JUMP_LABEL (last_loop_insn)) > 1)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Loop has multiple back edges.\n");
        return 0;
      }
--- 5830,5837 ----
       we cannot (easily) determine the iteration count.  */
    if (LABEL_NUSES (JUMP_LABEL (last_loop_insn)) > 1)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Loop has multiple back edges.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5849,5856 ****
    comparison = get_condition_for_loop (loop, last_loop_insn);
    if (comparison == 0)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: No final comparison found.\n");
        return 0;
      }
--- 5843,5850 ----
    comparison = get_condition_for_loop (loop, last_loop_insn);
    if (comparison == 0)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: No final comparison found.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5864,5871 ****
  
    if (!REG_P (iteration_var))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Comparison not against register.\n");
        return 0;
      }
--- 5858,5865 ----
  
    if (!REG_P (iteration_var))
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Comparison not against register.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5895,5902 ****
       reg_iv_type entry for it.  */
    if ((unsigned) REGNO (iteration_var) >= ivs->n_regs)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: No reg_iv_type entry for iteration var.\n");
        return 0;
      }
--- 5889,5896 ----
       reg_iv_type entry for it.  */
    if ((unsigned) REGNO (iteration_var) >= ivs->n_regs)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: No reg_iv_type entry for iteration var.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5907,5921 ****
    else if ((GET_MODE_BITSIZE (GET_MODE (iteration_var))
  	    > HOST_BITS_PER_WIDE_INT))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Iteration var rejected because mode too large.\n");
        return 0;
      }
    else if (GET_MODE_CLASS (GET_MODE (iteration_var)) != MODE_INT)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Iteration var not an integer.\n");
        return 0;
      }
--- 5901,5915 ----
    else if ((GET_MODE_BITSIZE (GET_MODE (iteration_var))
  	    > HOST_BITS_PER_WIDE_INT))
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Iteration var rejected because mode too large.\n");
        return 0;
      }
    else if (GET_MODE_CLASS (GET_MODE (iteration_var)) != MODE_INT)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Iteration var not an integer.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 5941,5948 ****
        initial_value = bl->initial_value;
        if (!bl->biv->always_executed || bl->biv->maybe_multiple)
  	{
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Loop iterations: Basic induction var not set once in each iteration.\n");
  	  return 0;
  	}
--- 5935,5942 ----
        initial_value = bl->initial_value;
        if (!bl->biv->always_executed || bl->biv->maybe_multiple)
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Loop iterations: Basic induction var not set once in each iteration.\n");
  	  return 0;
  	}
*************** loop_iterations (struct loop *loop)
*** 5959,5966 ****
  
        if (!v->always_executed || v->maybe_multiple)
  	{
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Loop iterations: General induction var not set once in each iteration.\n");
  	  return 0;
  	}
--- 5953,5960 ----
  
        if (!v->always_executed || v->maybe_multiple)
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Loop iterations: General induction var not set once in each iteration.\n");
  	  return 0;
  	}
*************** loop_iterations (struct loop *loop)
*** 5989,5996 ****
  		{
  		  if (REG_P (biv_inc->add_val))
  		    {
! 		      if (loop_dump_stream)
! 			fprintf (loop_dump_stream,
  				 "Loop iterations: Basic induction var add_val is REG %d.\n",
  				 REGNO (biv_inc->add_val));
  			return 0;
--- 5983,5990 ----
  		{
  		  if (REG_P (biv_inc->add_val))
  		    {
! 		      if (dump_file)
! 			fprintf (dump_file,
  				 "Loop iterations: Basic induction var add_val is REG %d.\n",
  				 REGNO (biv_inc->add_val));
  			return 0;
*************** loop_iterations (struct loop *loop)
*** 6004,6011 ****
  		}
  	    }
  	}
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Giv iterator, initial value bias %ld.\n",
  		 (long) offset);
  
--- 5998,6005 ----
  		}
  	    }
  	}
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Giv iterator, initial value bias %ld.\n",
  		 (long) offset);
  
*************** loop_iterations (struct loop *loop)
*** 6019,6026 ****
      }
    else
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Not basic or general induction var.\n");
        return 0;
      }
--- 6013,6020 ----
      }
    else
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Not basic or general induction var.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 6165,6172 ****
  
    if (increment == 0)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Loop iterations: Increment value can't be calculated.\n");
        return 0;
      }
--- 6159,6166 ----
  
    if (increment == 0)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Loop iterations: Increment value can't be calculated.\n");
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 6181,6192 ****
  
        if (GET_CODE (increment) != CONST_INT)
  	{
! 	  if (loop_dump_stream)
  	    {
! 	      fprintf (loop_dump_stream,
  		       "Loop iterations: Increment value not constant ");
! 	      print_simple_rtl (loop_dump_stream, increment);
! 	      fprintf (loop_dump_stream, ".\n");
  	    }
  	  return 0;
  	}
--- 6175,6186 ----
  
        if (GET_CODE (increment) != CONST_INT)
  	{
! 	  if (dump_file)
  	    {
! 	      fprintf (dump_file,
  		       "Loop iterations: Increment value not constant ");
! 	      print_simple_rtl (dump_file, increment);
! 	      fprintf (dump_file, ".\n");
  	    }
  	  return 0;
  	}
*************** loop_iterations (struct loop *loop)
*** 6195,6217 ****
  
    if (GET_CODE (initial_value) != CONST_INT)
      {
!       if (loop_dump_stream)
  	{
! 	  fprintf (loop_dump_stream,
  		   "Loop iterations: Initial value not constant ");
! 	  print_simple_rtl (loop_dump_stream, initial_value);
! 	  fprintf (loop_dump_stream, ".\n");
  	}
        return 0;
      }
    else if (GET_CODE (final_value) != CONST_INT)
      {
!       if (loop_dump_stream)
  	{
! 	  fprintf (loop_dump_stream,
  		   "Loop iterations: Final value not constant ");
! 	  print_simple_rtl (loop_dump_stream, final_value);
! 	  fprintf (loop_dump_stream, ".\n");
  	}
        return 0;
      }
--- 6189,6211 ----
  
    if (GET_CODE (initial_value) != CONST_INT)
      {
!       if (dump_file)
  	{
! 	  fprintf (dump_file,
  		   "Loop iterations: Initial value not constant ");
! 	  print_simple_rtl (dump_file, initial_value);
! 	  fprintf (dump_file, ".\n");
  	}
        return 0;
      }
    else if (GET_CODE (final_value) != CONST_INT)
      {
!       if (dump_file)
  	{
! 	  fprintf (dump_file,
  		   "Loop iterations: Final value not constant ");
! 	  print_simple_rtl (dump_file, final_value);
! 	  fprintf (dump_file, ".\n");
  	}
        return 0;
      }
*************** loop_iterations (struct loop *loop)
*** 6219,6226 ****
      {
        rtx inc_once;
  
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "Loop iterations: EQ comparison loop.\n");
  
        inc_once = gen_int_mode (INTVAL (initial_value) + INTVAL (increment),
  			       GET_MODE (iteration_var));
--- 6213,6220 ----
      {
        rtx inc_once;
  
!       if (dump_file)
! 	fprintf (dump_file, "Loop iterations: EQ comparison loop.\n");
  
        inc_once = gen_int_mode (INTVAL (initial_value) + INTVAL (increment),
  			       GET_MODE (iteration_var));
*************** loop_iterations (struct loop *loop)
*** 6304,6311 ****
      ;
    else
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "Loop iterations: Not normal loop.\n");
        return 0;
      }
  
--- 6298,6305 ----
      ;
    else
      {
!       if (dump_file)
! 	fprintf (dump_file, "Loop iterations: Not normal loop.\n");
        return 0;
      }
  
*************** strength_reduce (struct loop *loop, int 
*** 6477,6484 ****
  	  if (v->lifetime * threshold * benefit < insn_count
  	      && ! bl->reversed)
  	    {
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "giv of insn %d not worth while, %d vs %d.\n",
  			 INSN_UID (v->insn),
  			 v->lifetime * threshold * benefit, insn_count);
--- 6471,6478 ----
  	  if (v->lifetime * threshold * benefit < insn_count
  	      && ! bl->reversed)
  	    {
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "giv of insn %d not worth while, %d vs %d.\n",
  			 INSN_UID (v->insn),
  			 v->lifetime * threshold * benefit, insn_count);
*************** strength_reduce (struct loop *loop, int 
*** 6489,6496 ****
  		   && (may_trap_or_fault_p (v->add_val)
  		       || may_trap_or_fault_p (v->mult_val)))
  	    {
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "giv of insn %d: not always computable.\n",
  			 INSN_UID (v->insn));
  	      v->ignore = 1;
--- 6483,6490 ----
  		   && (may_trap_or_fault_p (v->add_val)
  		       || may_trap_or_fault_p (v->mult_val)))
  	    {
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "giv of insn %d: not always computable.\n",
  			 INSN_UID (v->insn));
  	      v->ignore = 1;
*************** strength_reduce (struct loop *loop, int 
*** 6505,6512 ****
  		if (tv->mult_val == const1_rtx
  		    && ! product_cheap_p (tv->add_val, v->mult_val))
  		  {
! 		    if (loop_dump_stream)
! 		      fprintf (loop_dump_stream,
  			       "giv of insn %d: would need a multiply.\n",
  			       INSN_UID (v->insn));
  		    v->ignore = 1;
--- 6499,6506 ----
  		if (tv->mult_val == const1_rtx
  		    && ! product_cheap_p (tv->add_val, v->mult_val))
  		  {
! 		    if (dump_file)
! 		      fprintf (dump_file,
  			       "giv of insn %d: would need a multiply.\n",
  			       INSN_UID (v->insn));
  		    v->ignore = 1;
*************** strength_reduce (struct loop *loop, int 
*** 6589,6596 ****
  				      gen_load_of_final_value (bl->biv->dest_reg,
  							       bl->final_value));
  
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "Reg %d: biv eliminated\n",
  		     bl->regno);
  	}
        /* See above note wrt final_value.  But since we couldn't eliminate
--- 6583,6590 ----
  				      gen_load_of_final_value (bl->biv->dest_reg,
  							       bl->final_value));
  
! 	  if (dump_file)
! 	    fprintf (dump_file, "Reg %d: biv eliminated\n",
  		     bl->regno);
  	}
        /* See above note wrt final_value.  But since we couldn't eliminate
*************** strength_reduce (struct loop *loop, int 
*** 6611,6618 ****
  	INSN_CODE (p) = -1;
        }
  
!   if (loop_dump_stream)
!     fprintf (loop_dump_stream, "\n");
  
    loop_ivs_free (loop);
    if (reg_map)
--- 6605,6612 ----
  	INSN_CODE (p) = -1;
        }
  
!   if (dump_file)
!     fprintf (dump_file, "\n");
  
    loop_ivs_free (loop);
    if (reg_map)
*************** record_biv (struct loop *loop, struct in
*** 6947,6954 ****
    if (mult_val == const1_rtx)
      bl->incremented = 1;
  
!   if (loop_dump_stream)
!     loop_biv_dump (v, loop_dump_stream, 0);
  }
  
  /* Fill in the data about one giv.
--- 6941,6948 ----
    if (mult_val == const1_rtx)
      bl->incremented = 1;
  
!   if (dump_file)
!     loop_biv_dump (v, dump_file, 0);
  }
  
  /* Fill in the data about one giv.
*************** record_giv (const struct loop *loop, str
*** 7155,7162 ****
        }
    }
  
!   if (loop_dump_stream)
!     loop_giv_dump (v, loop_dump_stream, 0);
  }
  
  /* Try to calculate the final value of the giv, the value it will have at
--- 7149,7156 ----
        }
    }
  
!   if (dump_file)
!     loop_giv_dump (v, dump_file, 0);
  }
  
  /* Try to calculate the final value of the giv, the value it will have at
*************** final_giv_value (const struct loop *loop
*** 7181,7188 ****
       and there are no other loop exits, so we can return any value.  */
    if (bl->reversed)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Final giv value for %d, depends on reversed biv\n",
  		 REGNO (v->dest_reg));
        return const0_rtx;
--- 7175,7182 ----
       and there are no other loop exits, so we can return any value.  */
    if (bl->reversed)
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Final giv value for %d, depends on reversed biv\n",
  		 REGNO (v->dest_reg));
        return const0_rtx;
*************** final_giv_value (const struct loop *loop
*** 7258,7265 ****
  	  /* Now calculate the giv's final value.  */
  	  loop_iv_add_mult_sink (loop, tem, v->mult_val, v->add_val, tem);
  
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Final giv value for %d, calc from biv's value.\n",
  		     REGNO (v->dest_reg));
  
--- 7252,7259 ----
  	  /* Now calculate the giv's final value.  */
  	  loop_iv_add_mult_sink (loop, tem, v->mult_val, v->add_val, tem);
  
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Final giv value for %d, calc from biv's value.\n",
  		     REGNO (v->dest_reg));
  
*************** final_giv_value (const struct loop *loop
*** 7273,7280 ****
    /* Check to see if the biv is dead at all loop exits.  */
    if (reg_dead_after_loop (loop, v->dest_reg))
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream,
  		 "Final giv value for %d, giv dead after loop exit.\n",
  		 REGNO (v->dest_reg));
  
--- 7267,7274 ----
    /* Check to see if the biv is dead at all loop exits.  */
    if (reg_dead_after_loop (loop, v->dest_reg))
      {
!       if (dump_file)
! 	fprintf (dump_file,
  		 "Final giv value for %d, giv dead after loop exit.\n",
  		 REGNO (v->dest_reg));
  
*************** check_final_value (const struct loop *lo
*** 7407,7414 ****
  		  v->replaceable = 0;
  		  v->not_replaceable = 1;
  
! 		  if (loop_dump_stream)
! 		    fprintf (loop_dump_stream,
  			     "Found branch outside giv lifetime.\n");
  
  		  break;
--- 7401,7408 ----
  		  v->replaceable = 0;
  		  v->not_replaceable = 1;
  
! 		  if (dump_file)
! 		    fprintf (dump_file,
  			     "Found branch outside giv lifetime.\n");
  
  		  break;
*************** check_final_value (const struct loop *lo
*** 7421,7428 ****
  	v->final_value = final_value;
      }
  
!   if (loop_dump_stream && v->replaceable)
!     fprintf (loop_dump_stream, "Insn %d: giv reg %d final_value replaceable\n",
  	     INSN_UID (v->insn), REGNO (v->dest_reg));
  }
  
--- 7415,7422 ----
  	v->final_value = final_value;
      }
  
!   if (dump_file && v->replaceable)
!     fprintf (dump_file, "Insn %d: giv reg %d final_value replaceable\n",
  	     INSN_UID (v->insn), REGNO (v->dest_reg));
  }
  
*************** check_ext_dependent_givs (const struct l
*** 8935,8949 ****
  	if (incr != 0
  	    && extension_within_bounds_p (loop, bl, incr, v->ext_dependent))
  	  {
! 	    if (loop_dump_stream)
! 	      fprintf (loop_dump_stream,
  		       "Verified ext dependent giv at %d of reg %d\n",
  		       INSN_UID (v->insn), bl->regno);
  	  }
  	else
  	  {
! 	    if (loop_dump_stream)
! 	      fprintf (loop_dump_stream,
  		       "Failed ext dependent giv at %d\n",
  		       INSN_UID (v->insn));
  
--- 8929,8943 ----
  	if (incr != 0
  	    && extension_within_bounds_p (loop, bl, incr, v->ext_dependent))
  	  {
! 	    if (dump_file)
! 	      fprintf (dump_file,
  		       "Verified ext dependent giv at %d of reg %d\n",
  		       INSN_UID (v->insn), bl->regno);
  	  }
  	else
  	  {
! 	    if (dump_file)
! 	      fprintf (dump_file,
  		       "Failed ext dependent giv at %d\n",
  		       INSN_UID (v->insn));
  
*************** combine_givs (struct loop_regs *regs, st
*** 9069,9086 ****
  restart:
    qsort (stats, giv_count, sizeof (*stats), cmp_combine_givs_stats);
  
!   if (loop_dump_stream)
      {
!       fprintf (loop_dump_stream, "Sorted combine statistics:\n");
        for (k = 0; k < giv_count; k++)
  	{
  	  g1 = giv_array[stats[k].giv_number];
  	  if (!g1->combined_with && !g1->same)
! 	    fprintf (loop_dump_stream, " {%d, %d}",
  		     INSN_UID (giv_array[stats[k].giv_number]->insn),
  		     stats[k].total_benefit);
  	}
!       putc ('\n', loop_dump_stream);
      }
  
    for (k = 0; k < giv_count; k++)
--- 9063,9080 ----
  restart:
    qsort (stats, giv_count, sizeof (*stats), cmp_combine_givs_stats);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "Sorted combine statistics:\n");
        for (k = 0; k < giv_count; k++)
  	{
  	  g1 = giv_array[stats[k].giv_number];
  	  if (!g1->combined_with && !g1->same)
! 	    fprintf (dump_file, " {%d, %d}",
  		     INSN_UID (giv_array[stats[k].giv_number]->insn),
  		     stats[k].total_benefit);
  	}
!       putc ('\n', dump_file);
      }
  
    for (k = 0; k < giv_count; k++)
*************** restart:
*** 9132,9139 ****
  		    stats[l].total_benefit -= g2->benefit + extra_benefit;
  		}
  
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "giv at %d combined with giv at %d; new benefit %d + %d, lifetime %d\n",
  			 INSN_UID (g2->insn), INSN_UID (g1->insn),
  			 g1->benefit, g1_add_benefit, g1->lifetime);
--- 9126,9133 ----
  		    stats[l].total_benefit -= g2->benefit + extra_benefit;
  		}
  
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "giv at %d combined with giv at %d; new benefit %d + %d, lifetime %d\n",
  			 INSN_UID (g2->insn), INSN_UID (g1->insn),
  			 g1->benefit, g1_add_benefit, g1->lifetime);
*************** check_dbra_loop (struct loop *loop, int 
*** 9694,9701 ****
  	  rtx tem;
  
  	  /* Loop can be reversed.  */
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream, "Can reverse loop\n");
  
  	  /* Now check other conditions:
  
--- 9688,9695 ----
  	  rtx tem;
  
  	  /* Loop can be reversed.  */
! 	  if (dump_file)
! 	    fprintf (dump_file, "Can reverse loop\n");
  
  	  /* Now check other conditions:
  
*************** check_dbra_loop (struct loop *loop, int 
*** 9989,10001 ****
  
  	      bl->reversed = 1;
  
! 	      if (loop_dump_stream)
  		{
! 		  fprintf (loop_dump_stream, "Reversed loop");
  		  if (bl->nonneg)
! 		    fprintf (loop_dump_stream, " and added reg_nonneg\n");
  		  else
! 		    fprintf (loop_dump_stream, "\n");
  		}
  
  	      return 1;
--- 9983,9995 ----
  
  	      bl->reversed = 1;
  
! 	      if (dump_file)
  		{
! 		  fprintf (dump_file, "Reversed loop");
  		  if (bl->nonneg)
! 		    fprintf (dump_file, " and added reg_nonneg\n");
  		  else
! 		    fprintf (dump_file, "\n");
  		}
  
  	      return 1;
*************** maybe_eliminate_biv (const struct loop *
*** 10061,10068 ****
  	  && ! maybe_eliminate_biv_1 (loop, PATTERN (p), p, bl,
  				      eliminate_p, where_bb, where_insn))
  	{
! 	  if (loop_dump_stream)
! 	    fprintf (loop_dump_stream,
  		     "Cannot eliminate biv %d: biv used in insn %d.\n",
  		     bl->regno, INSN_UID (p));
  	  break;
--- 10055,10062 ----
  	  && ! maybe_eliminate_biv_1 (loop, PATTERN (p), p, bl,
  				      eliminate_p, where_bb, where_insn))
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file,
  		     "Cannot eliminate biv %d: biv used in insn %d.\n",
  		     bl->regno, INSN_UID (p));
  	  break;
*************** maybe_eliminate_biv (const struct loop *
*** 10077,10084 ****
  
    if (p == loop->end)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "biv %d %s eliminated.\n",
  		 bl->regno, eliminate_p ? "was" : "can be");
        return 1;
      }
--- 10071,10078 ----
  
    if (p == loop->end)
      {
!       if (dump_file)
! 	fprintf (dump_file, "biv %d %s eliminated.\n",
  		 bl->regno, eliminate_p ? "was" : "can be");
        return 1;
      }
*************** load_mems (const struct loop *loop)
*** 11016,11027 ****
  	      loop_insn_emit_after (loop, 0, label, set);
  	    }
  
! 	  if (loop_dump_stream)
  	    {
! 	      fprintf (loop_dump_stream, "Hoisted regno %d %s from ",
  		       REGNO (reg), (written ? "r/w" : "r/o"));
! 	      print_rtl (loop_dump_stream, mem);
! 	      fputc ('\n', loop_dump_stream);
  	    }
  
  	  /* Attempt a bit of copy propagation.  This helps untangle the
--- 11010,11021 ----
  	      loop_insn_emit_after (loop, 0, label, set);
  	    }
  
! 	  if (dump_file)
  	    {
! 	      fprintf (dump_file, "Hoisted regno %d %s from ",
  		       REGNO (reg), (written ? "r/w" : "r/o"));
! 	      print_rtl (dump_file, mem);
! 	      fputc ('\n', dump_file);
  	    }
  
  	  /* Attempt a bit of copy propagation.  This helps untangle the
*************** try_copy_prop (const struct loop *loop, 
*** 11142,11149 ****
    gcc_assert (init_insn);
    if (apply_change_group ())
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, "  Replaced reg %d", regno);
        if (store_is_first && replaced_last)
  	{
  	  rtx first;
--- 11136,11143 ----
    gcc_assert (init_insn);
    if (apply_change_group ())
      {
!       if (dump_file)
! 	fprintf (dump_file, "  Replaced reg %d", regno);
        if (store_is_first && replaced_last)
  	{
  	  rtx first;
*************** try_copy_prop (const struct loop *loop, 
*** 11162,11169 ****
  	  /* Delete the instructions.  */
  	  loop_delete_insns (first, init_insn);
  	}
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, ".\n");
      }
  }
  
--- 11156,11163 ----
  	  /* Delete the instructions.  */
  	  loop_delete_insns (first, init_insn);
  	}
!       if (dump_file)
! 	fprintf (dump_file, ".\n");
      }
  }
  
*************** loop_delete_insns (rtx first, rtx last)
*** 11175,11182 ****
  {
    while (1)
      {
!       if (loop_dump_stream)
! 	fprintf (loop_dump_stream, ", deleting init_insn (%d)",
  		 INSN_UID (first));
        delete_insn (first);
  
--- 11169,11176 ----
  {
    while (1)
      {
!       if (dump_file)
! 	fprintf (dump_file, ", deleting init_insn (%d)",
  		 INSN_UID (first));
        delete_insn (first);
  
*************** try_swap_copy_prop (const struct loop *l
*** 11256,11263 ****
  
  	  if (apply_change_group ())
  	    {
! 	      if (loop_dump_stream)
! 		fprintf (loop_dump_stream,
  			 "  Swapped set of reg %d at %d with reg %d at %d.\n",
  			 regno, INSN_UID (insn),
  			 new_regno, INSN_UID (prev_insn));
--- 11250,11257 ----
  
  	  if (apply_change_group ())
  	    {
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "  Swapped set of reg %d at %d with reg %d at %d.\n",
  			 regno, INSN_UID (insn),
  			 new_regno, INSN_UID (prev_insn));
*************** rest_of_handle_loop_optimize (void)
*** 11793,11799 ****
        cleanup_barriers ();
        
        /* We only want to perform unrolling once.  */
!       loop_optimize (get_insns (), dump_file, 0);
        
        /* The first call to loop_optimize makes some instructions
           trivially dead.  We delete those instructions now in the
--- 11787,11793 ----
        cleanup_barriers ();
        
        /* We only want to perform unrolling once.  */
!       loop_optimize (get_insns (), 0);
        
        /* The first call to loop_optimize makes some instructions
           trivially dead.  We delete those instructions now in the
*************** rest_of_handle_loop_optimize (void)
*** 11806,11812 ****
        reg_scan (get_insns (), max_reg_num ());
      } 
    cleanup_barriers ();
!   loop_optimize (get_insns (), dump_file, do_prefetch);
        
    /* Loop can create trivially dead instructions.  */
    delete_trivially_dead_insns (get_insns (), max_reg_num ());
--- 11800,11806 ----
        reg_scan (get_insns (), max_reg_num ());
      } 
    cleanup_barriers ();
!   loop_optimize (get_insns (), do_prefetch);
        
    /* Loop can create trivially dead instructions.  */
    delete_trivially_dead_insns (get_insns (), max_reg_num ());
Index: ddg.c
===================================================================
*** ddg.c	(revision 110621)
--- ddg.c	(working copy)
*************** free_ddg (ddg_ptr g)
*** 546,552 ****
  }
  
  void
! print_ddg_edge (FILE *dump_file, ddg_edge_ptr e)
  {
    char dep_c;
  
--- 546,552 ----
  }
  
  void
! print_ddg_edge (FILE *file, ddg_edge_ptr e)
  {
    char dep_c;
  
*************** print_ddg_edge (FILE *dump_file, ddg_edg
*** 561,573 ****
        dep_c = 'T';
    }
  
!   fprintf (dump_file, " [%d -(%c,%d,%d)-> %d] ", INSN_UID (e->src->insn),
  	   dep_c, e->latency, e->distance, INSN_UID (e->dest->insn));
  }
  
  /* Print the DDG nodes with there in/out edges to the dump file.  */
  void
! print_ddg (FILE *dump_file, ddg_ptr g)
  {
    int i;
  
--- 561,573 ----
        dep_c = 'T';
    }
  
!   fprintf (file, " [%d -(%c,%d,%d)-> %d] ", INSN_UID (e->src->insn),
  	   dep_c, e->latency, e->distance, INSN_UID (e->dest->insn));
  }
  
  /* Print the DDG nodes with there in/out edges to the dump file.  */
  void
! print_ddg (FILE *file, ddg_ptr g)
  {
    int i;
  
*************** print_ddg (FILE *dump_file, ddg_ptr g)
*** 575,608 ****
      {
        ddg_edge_ptr e;
  
!       print_rtl_single (dump_file, g->nodes[i].insn);
!       fprintf (dump_file, "OUT ARCS: ");
        for (e = g->nodes[i].out; e; e = e->next_out)
! 	print_ddg_edge (dump_file, e);
  
!       fprintf (dump_file, "\nIN ARCS: ");
        for (e = g->nodes[i].in; e; e = e->next_in)
! 	print_ddg_edge (dump_file, e);
  
!       fprintf (dump_file, "\n");
      }
  }
  
  /* Print the given DDG in VCG format.  */
  void
! vcg_print_ddg (FILE *dump_file, ddg_ptr g)
  {
    int src_cuid;
  
!   fprintf (dump_file, "graph: {\n");
    for (src_cuid = 0; src_cuid < g->num_nodes; src_cuid++)
      {
        ddg_edge_ptr e;
        int src_uid = INSN_UID (g->nodes[src_cuid].insn);
  
!       fprintf (dump_file, "node: {title: \"%d_%d\" info1: \"", src_cuid, src_uid);
!       print_rtl_single (dump_file, g->nodes[src_cuid].insn);
!       fprintf (dump_file, "\"}\n");
        for (e = g->nodes[src_cuid].out; e; e = e->next_out)
  	{
  	  int dst_uid = INSN_UID (e->dest->insn);
--- 575,608 ----
      {
        ddg_edge_ptr e;
  
!       print_rtl_single (file, g->nodes[i].insn);
!       fprintf (file, "OUT ARCS: ");
        for (e = g->nodes[i].out; e; e = e->next_out)
! 	print_ddg_edge (file, e);
  
!       fprintf (file, "\nIN ARCS: ");
        for (e = g->nodes[i].in; e; e = e->next_in)
! 	print_ddg_edge (file, e);
  
!       fprintf (file, "\n");
      }
  }
  
  /* Print the given DDG in VCG format.  */
  void
! vcg_print_ddg (FILE *file, ddg_ptr g)
  {
    int src_cuid;
  
!   fprintf (file, "graph: {\n");
    for (src_cuid = 0; src_cuid < g->num_nodes; src_cuid++)
      {
        ddg_edge_ptr e;
        int src_uid = INSN_UID (g->nodes[src_cuid].insn);
  
!       fprintf (file, "node: {title: \"%d_%d\" info1: \"", src_cuid, src_uid);
!       print_rtl_single (file, g->nodes[src_cuid].insn);
!       fprintf (file, "\"}\n");
        for (e = g->nodes[src_cuid].out; e; e = e->next_out)
  	{
  	  int dst_uid = INSN_UID (e->dest->insn);
*************** vcg_print_ddg (FILE *dump_file, ddg_ptr 
*** 610,625 ****
  
  	  /* Give the backarcs a different color.  */
  	  if (e->distance > 0)
! 	    fprintf (dump_file, "backedge: {color: red ");
  	  else
! 	    fprintf (dump_file, "edge: { ");
  
! 	  fprintf (dump_file, "sourcename: \"%d_%d\" ", src_cuid, src_uid);
! 	  fprintf (dump_file, "targetname: \"%d_%d\" ", dst_cuid, dst_uid);
! 	  fprintf (dump_file, "label: \"%d_%d\"}\n", e->latency, e->distance);
  	}
      }
!   fprintf (dump_file, "}\n");
  }
  
  /* Create an edge and initialize it with given values.  */
--- 610,625 ----
  
  	  /* Give the backarcs a different color.  */
  	  if (e->distance > 0)
! 	    fprintf (file, "backedge: {color: red ");
  	  else
! 	    fprintf (file, "edge: { ");
  
! 	  fprintf (file, "sourcename: \"%d_%d\" ", src_cuid, src_uid);
! 	  fprintf (file, "targetname: \"%d_%d\" ", dst_cuid, dst_uid);
! 	  fprintf (file, "label: \"%d_%d\"}\n", e->latency, e->distance);
  	}
      }
!   fprintf (file, "}\n");
  }
  
  /* Create an edge and initialize it with given values.  */
Index: reorg.c
===================================================================
*** reorg.c	(revision 110621)
--- reorg.c	(working copy)
*************** make_return_insns (rtx first)
*** 3532,3538 ****
  /* Try to find insns to place in delay slots.  */
  
  void
! dbr_schedule (rtx first, FILE *file)
  {
    rtx insn, next, epilogue_insn = 0;
    int i;
--- 3532,3538 ----
  /* Try to find insns to place in delay slots.  */
  
  void
! dbr_schedule (rtx first)
  {
    rtx insn, next, epilogue_insn = 0;
    int i;
*************** static void
*** 3779,3785 ****
  rest_of_handle_delay_slots (void)
  {
  #ifdef DELAY_SLOTS
!   dbr_schedule (get_insns (), dump_file);
  #endif
  }   
  
--- 3779,3785 ----
  rest_of_handle_delay_slots (void)
  {
  #ifdef DELAY_SLOTS
!   dbr_schedule (get_insns ());
  #endif
  }   
  
Index: flow.c
===================================================================
*** flow.c	(revision 110621)
--- flow.c	(working copy)
*************** first_insn_after_basic_block_note (basic
*** 354,360 ****
     FLAGS is a set of PROP_* flags to be used in accumulating flow info.  */
  
  void
! life_analysis (FILE *file, int flags)
  {
  #ifdef ELIMINABLE_REGS
    int i;
--- 354,360 ----
     FLAGS is a set of PROP_* flags to be used in accumulating flow info.  */
  
  void
! life_analysis (int flags)
  {
  #ifdef ELIMINABLE_REGS
    int i;
*************** life_analysis (FILE *file, int flags)
*** 437,444 ****
    if (optimize && (flags & PROP_SCAN_DEAD_STORES))
      end_alias_analysis ();
  
!   if (file)
!     dump_flow_info (file);
  
    /* Removing dead insns should have made jumptables really dead.  */
    delete_dead_jumptables ();
--- 437,444 ----
    if (optimize && (flags & PROP_SCAN_DEAD_STORES))
      end_alias_analysis ();
  
!   if (dump_file)
!     dump_flow_info (dump_file);
  
    /* Removing dead insns should have made jumptables really dead.  */
    delete_dead_jumptables ();
*************** rest_of_handle_life (void)
*** 4637,4643 ****
  {
    regclass_init ();
  
!   life_analysis (dump_file, PROP_FINAL);
    if (optimize)
      cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE | CLEANUP_LOG_LINKS
                   | (flag_thread_jumps ? CLEANUP_THREADING : 0));
--- 4637,4643 ----
  {
    regclass_init ();
  
!   life_analysis (PROP_FINAL);
    if (optimize)
      cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE | CLEANUP_LOG_LINKS
                   | (flag_thread_jumps ? CLEANUP_THREADING : 0));
Index: haifa-sched.c
===================================================================
*** haifa-sched.c	(revision 110621)
--- haifa-sched.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 142,147 ****
--- 142,148 ----
  #include "recog.h"
  #include "sched-int.h"
  #include "target.h"
+ #include "output.h"
  
  #ifdef INSN_SCHEDULING
  
*************** struct sched_info *current_sched_info;
*** 501,507 ****
  
  #ifndef INSN_SCHEDULING
  void
! schedule_insns (FILE *dump_file ATTRIBUTE_UNUSED)
  {
  }
  #else
--- 502,508 ----
  
  #ifndef INSN_SCHEDULING
  void
! schedule_insns (void)
  {
  }
  #else
*************** set_priorities (rtx head, rtx tail)
*** 2210,2220 ****
    return n_insn;
  }
  
! /* Initialize some global state for the scheduler.  DUMP_FILE is to be used
!    for debugging output.  */
  
  void
! sched_init (FILE *dump_file)
  {
    int luid;
    basic_block b;
--- 2211,2220 ----
    return n_insn;
  }
  
! /* Initialize some global state for the scheduler.  */
  
  void
! sched_init (void)
  {
    int luid;
    basic_block b;
Index: mode-switching.c
===================================================================
*** mode-switching.c	(revision 110621)
--- mode-switching.c	(working copy)
*************** create_pre_exit (int n_entities, int *en
*** 383,389 ****
     necessary mode switches.  Return true if we did work.  */
  
  static int
! optimize_mode_switching (FILE *file)
  {
    rtx insn;
    int e;
--- 383,389 ----
     necessary mode switches.  Return true if we did work.  */
  
  static int
! optimize_mode_switching (void)
  {
    rtx insn;
    int e;
*************** optimize_mode_switching (FILE *file)
*** 563,569 ****
  
        FOR_EACH_BB (bb)
  	sbitmap_not (kill[bb->index], transp[bb->index]);
!       edge_list = pre_edge_lcm (file, n_entities, transp, comp, antic,
  				kill, &insert, &delete);
  
        for (j = n_entities - 1; j >= 0; j--)
--- 563,569 ----
  
        FOR_EACH_BB (bb)
  	sbitmap_not (kill[bb->index], transp[bb->index]);
!       edge_list = pre_edge_lcm (n_entities, transp, comp, antic,
  				kill, &insert, &delete);
  
        for (j = n_entities - 1; j >= 0; j--)
*************** rest_of_handle_mode_switching (void)
*** 740,746 ****
  {
  #ifdef OPTIMIZE_MODE_SWITCHING
    no_new_pseudos = 0;
!   optimize_mode_switching (NULL);
    no_new_pseudos = 1;
  #endif /* OPTIMIZE_MODE_SWITCHING */
  }
--- 740,746 ----
  {
  #ifdef OPTIMIZE_MODE_SWITCHING
    no_new_pseudos = 0;
!   optimize_mode_switching ();
    no_new_pseudos = 1;
  #endif /* OPTIMIZE_MODE_SWITCHING */
  }
Index: modulo-sched.c
===================================================================
*** modulo-sched.c	(revision 110621)
--- modulo-sched.c	(working copy)
*************** static bool ps_unschedule_node (partial_
*** 181,193 ****
  
  static int issue_rate;
  
- /* For printing statistics.  */
- static FILE *stats_file;
- 
  static int sms_order_nodes (ddg_ptr, int, int * result);
  static void set_node_sched_params (ddg_ptr);
! static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int,
! 						   int *, FILE*);
  static void permute_partial_schedule (partial_schedule_ptr ps, rtx last);
  static void generate_prolog_epilog (partial_schedule_ptr ,struct loop * loop, rtx);
  static void duplicate_insns_of_cycles (partial_schedule_ptr ps,
--- 181,189 ----
  
  static int issue_rate;
  
  static int sms_order_nodes (ddg_ptr, int, int * result);
  static void set_node_sched_params (ddg_ptr);
! static partial_schedule_ptr sms_schedule_by_order (ddg_ptr, int, int, int *);
  static void permute_partial_schedule (partial_schedule_ptr ps, rtx last);
  static void generate_prolog_epilog (partial_schedule_ptr ,struct loop * loop, rtx);
  static void duplicate_insns_of_cycles (partial_schedule_ptr ps,
*************** set_node_sched_params (ddg_ptr g)
*** 374,384 ****
  }
  
  static void
! print_node_sched_params (FILE * dump_file, int num_nodes)
  {
    int i;
  
!   if (! dump_file)
      return;
    for (i = 0; i < num_nodes; i++)
      {
--- 370,380 ----
  }
  
  static void
! print_node_sched_params (FILE * file, int num_nodes)
  {
    int i;
  
!   if (! file)
      return;
    for (i = 0; i < num_nodes; i++)
      {
*************** print_node_sched_params (FILE * dump_fil
*** 386,399 ****
        rtx reg_move = nsp->first_reg_move;
        int j;
  
!       fprintf (dump_file, "Node %d:\n", i);
!       fprintf (dump_file, " asap = %d:\n", nsp->asap);
!       fprintf (dump_file, " time = %d:\n", nsp->time);
!       fprintf (dump_file, " nreg_moves = %d:\n", nsp->nreg_moves);
        for (j = 0; j < nsp->nreg_moves; j++)
  	{
! 	  fprintf (dump_file, " reg_move = ");
! 	  print_rtl_single (dump_file, reg_move);
  	  reg_move = PREV_INSN (reg_move);
  	}
      }
--- 382,395 ----
        rtx reg_move = nsp->first_reg_move;
        int j;
  
!       fprintf (file, "Node %d:\n", i);
!       fprintf (file, " asap = %d:\n", nsp->asap);
!       fprintf (file, " time = %d:\n", nsp->time);
!       fprintf (file, " nreg_moves = %d:\n", nsp->nreg_moves);
        for (j = 0; j < nsp->nreg_moves; j++)
  	{
! 	  fprintf (file, " reg_move = ");
! 	  print_rtl_single (file, reg_move);
  	  reg_move = PREV_INSN (reg_move);
  	}
      }
*************** loop_single_full_bb_p (struct loop *loop
*** 824,830 ****
  /* Return true if the loop is in its canonical form and false if not.
     i.e. SIMPLE_SMS_LOOP_P and have one preheader block, and single exit.  */
  static bool
! loop_canon_p (struct loop *loop, FILE *dump_file)
  {
  
    if (loop->inner || ! loop->outer)
--- 820,826 ----
  /* Return true if the loop is in its canonical form and false if not.
     i.e. SIMPLE_SMS_LOOP_P and have one preheader block, and single exit.  */
  static bool
! loop_canon_p (struct loop *loop)
  {
  
    if (loop->inner || ! loop->outer)
*************** loop_canon_p (struct loop *loop, FILE *d
*** 841,847 ****
  	    {
  	      expanded_location xloc;
  	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (stats_file, " %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
  	}
--- 837,843 ----
  	    {
  	      expanded_location xloc;
  	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (dump_file, " %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
  	}
*************** loop_canon_p (struct loop *loop, FILE *d
*** 859,865 ****
  	    {
  	      expanded_location xloc;
    	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (stats_file, " %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
  	}
--- 855,861 ----
  	    {
  	      expanded_location xloc;
    	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (dump_file, " %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
  	}
*************** canon_loop (struct loop *loop)
*** 897,903 ****
  /* Main entry point, perform SMS scheduling on the loops of the function
     that consist of single basic blocks.  */
  static void
! sms_schedule (FILE *dump_file)
  {
    static int passes = 0;
    rtx insn;
--- 893,899 ----
  /* Main entry point, perform SMS scheduling on the loops of the function
     that consist of single basic blocks.  */
  static void
! sms_schedule (void)
  {
    static int passes = 0;
    rtx insn;
*************** sms_schedule (FILE *dump_file)
*** 915,927 ****
    edge latch_edge;
    gcov_type trip_count = 0;
  
!   loops = loop_optimizer_init (dump_file, (LOOPS_HAVE_PREHEADERS
! 					   | LOOPS_HAVE_MARKED_SINGLE_EXITS));
    if (!loops)
      return;  /* There is no loops to schedule.  */
  
-   stats_file = dump_file;
- 
    /* Initialize issue_rate.  */
    if (targetm.sched.issue_rate)
      {
--- 911,921 ----
    edge latch_edge;
    gcov_type trip_count = 0;
  
!   loops = loop_optimizer_init (LOOPS_HAVE_PREHEADERS
! 			       | LOOPS_HAVE_MARKED_SINGLE_EXITS);
    if (!loops)
      return;  /* There is no loops to schedule.  */
  
    /* Initialize issue_rate.  */
    if (targetm.sched.issue_rate)
      {
*************** sms_schedule (FILE *dump_file)
*** 936,942 ****
  
    /* Initialize the scheduler.  */
    current_sched_info = &sms_sched_info;
!   sched_init (NULL);
  
    /* Init Data Flow analysis, to be used in interloop dep calculation.  */
    df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |	DF_SUBREGS);
--- 930,936 ----
  
    /* Initialize the scheduler.  */
    current_sched_info = &sms_sched_info;
!   sched_init ();
  
    /* Init Data Flow analysis, to be used in interloop dep calculation.  */
    df = df_init (DF_HARD_REGS | DF_EQUIV_NOTES |	DF_SUBREGS);
*************** sms_schedule (FILE *dump_file)
*** 967,973 ****
            break;
          }
  
!       if (! loop_canon_p (loop, dump_file))
          continue;
  
        if (! loop_single_full_bb_p (loop))
--- 961,967 ----
            break;
          }
  
!       if (! loop_canon_p (loop))
          continue;
  
        if (! loop_single_full_bb_p (loop))
*************** sms_schedule (FILE *dump_file)
*** 986,992 ****
        if ( latch_edge->count
            && (latch_edge->count < loop->single_exit->count * SMS_LOOP_AVERAGE_COUNT_THRESHOLD))
  	{
! 	  if (stats_file)
  	    {
  	      rtx line_note = find_line_note (tail);
  
--- 980,986 ----
        if ( latch_edge->count
            && (latch_edge->count < loop->single_exit->count * SMS_LOOP_AVERAGE_COUNT_THRESHOLD))
  	{
! 	  if (dump_file)
  	    {
  	      rtx line_note = find_line_note (tail);
  
*************** sms_schedule (FILE *dump_file)
*** 994,1017 ****
  		{
  		  expanded_location xloc;
  		  NOTE_EXPANDED_LOCATION (xloc, line_note);
! 		  fprintf (stats_file, "SMS bb %s %d (file, line)\n",
  			   xloc.file, xloc.line);
  		}
! 	      fprintf (stats_file, "SMS single-bb-loop\n");
  	      if (profile_info && flag_branch_probabilities)
  	    	{
! 	      	  fprintf (stats_file, "SMS loop-count ");
! 	      	  fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
  	             	   (HOST_WIDEST_INT) bb->count);
! 	      	  fprintf (stats_file, "\n");
!                   fprintf (stats_file, "SMS trip-count ");
!                   fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
                             (HOST_WIDEST_INT) trip_count);
!                   fprintf (stats_file, "\n");
! 	      	  fprintf (stats_file, "SMS profile-sum-max ");
! 	      	  fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
  	          	   (HOST_WIDEST_INT) profile_info->sum_max);
! 	      	  fprintf (stats_file, "\n");
  	    	}
  	    }
            continue;
--- 988,1011 ----
  		{
  		  expanded_location xloc;
  		  NOTE_EXPANDED_LOCATION (xloc, line_note);
! 		  fprintf (dump_file, "SMS bb %s %d (file, line)\n",
  			   xloc.file, xloc.line);
  		}
! 	      fprintf (dump_file, "SMS single-bb-loop\n");
  	      if (profile_info && flag_branch_probabilities)
  	    	{
! 	      	  fprintf (dump_file, "SMS loop-count ");
! 	      	  fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
  	             	   (HOST_WIDEST_INT) bb->count);
! 	      	  fprintf (dump_file, "\n");
!                   fprintf (dump_file, "SMS trip-count ");
!                   fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
                             (HOST_WIDEST_INT) trip_count);
!                   fprintf (dump_file, "\n");
! 	      	  fprintf (dump_file, "SMS profile-sum-max ");
! 	      	  fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
  	          	   (HOST_WIDEST_INT) profile_info->sum_max);
! 	      	  fprintf (dump_file, "\n");
  	    	}
  	    }
            continue;
*************** sms_schedule (FILE *dump_file)
*** 1031,1045 ****
  
        if (insn != NEXT_INSN (tail))
  	{
! 	  if (stats_file)
  	    {
  	      if (CALL_P (insn))
! 		fprintf (stats_file, "SMS loop-with-call\n");
  	      else if (BARRIER_P (insn))
! 		fprintf (stats_file, "SMS loop-with-barrier\n");
  	      else
! 		fprintf (stats_file, "SMS loop-with-not-single-set\n");
! 	      print_rtl_single (stats_file, insn);
  	    }
  
  	  continue;
--- 1025,1039 ----
  
        if (insn != NEXT_INSN (tail))
  	{
! 	  if (dump_file)
  	    {
  	      if (CALL_P (insn))
! 		fprintf (dump_file, "SMS loop-with-call\n");
  	      else if (BARRIER_P (insn))
! 		fprintf (dump_file, "SMS loop-with-barrier\n");
  	      else
! 		fprintf (dump_file, "SMS loop-with-not-single-set\n");
! 	      print_rtl_single (dump_file, insn);
  	    }
  
  	  continue;
*************** sms_schedule (FILE *dump_file)
*** 1047,1054 ****
  
        if (! (g = create_ddg (bb, df, 0)))
          {
!           if (stats_file)
! 	    fprintf (stats_file, "SMS doloop\n");
  	  continue;
          }
  
--- 1041,1048 ----
  
        if (! (g = create_ddg (bb, df, 0)))
          {
!           if (dump_file)
! 	    fprintf (dump_file, "SMS doloop\n");
  	  continue;
          }
  
*************** sms_schedule (FILE *dump_file)
*** 1084,1090 ****
        if (loop->single_exit->count)
  	trip_count = latch_edge->count / loop->single_exit->count;
  
!       if (stats_file)
  	{
  	  rtx line_note = find_line_note (tail);
  
--- 1078,1084 ----
        if (loop->single_exit->count)
  	trip_count = latch_edge->count / loop->single_exit->count;
  
!       if (dump_file)
  	{
  	  rtx line_note = find_line_note (tail);
  
*************** sms_schedule (FILE *dump_file)
*** 1092,1116 ****
  	    {
  	      expanded_location xloc;
  	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (stats_file, "SMS bb %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
! 	  fprintf (stats_file, "SMS single-bb-loop\n");
  	  if (profile_info && flag_branch_probabilities)
  	    {
! 	      fprintf (stats_file, "SMS loop-count ");
! 	      fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
  	               (HOST_WIDEST_INT) bb->count);
! 	      fprintf (stats_file, "\n");
! 	      fprintf (stats_file, "SMS profile-sum-max ");
! 	      fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
  	               (HOST_WIDEST_INT) profile_info->sum_max);
! 	      fprintf (stats_file, "\n");
  	    }
! 	  fprintf (stats_file, "SMS doloop\n");
! 	  fprintf (stats_file, "SMS built-ddg %d\n", g->num_nodes);
!           fprintf (stats_file, "SMS num-loads %d\n", g->num_loads);
!           fprintf (stats_file, "SMS num-stores %d\n", g->num_stores);
  	}
  
  
--- 1086,1110 ----
  	    {
  	      expanded_location xloc;
  	      NOTE_EXPANDED_LOCATION (xloc, line_note);
! 	      fprintf (dump_file, "SMS bb %s %d (file, line)\n",
  		       xloc.file, xloc.line);
  	    }
! 	  fprintf (dump_file, "SMS single-bb-loop\n");
  	  if (profile_info && flag_branch_probabilities)
  	    {
! 	      fprintf (dump_file, "SMS loop-count ");
! 	      fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
  	               (HOST_WIDEST_INT) bb->count);
! 	      fprintf (dump_file, "\n");
! 	      fprintf (dump_file, "SMS profile-sum-max ");
! 	      fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
  	               (HOST_WIDEST_INT) profile_info->sum_max);
! 	      fprintf (dump_file, "\n");
  	    }
! 	  fprintf (dump_file, "SMS doloop\n");
! 	  fprintf (dump_file, "SMS built-ddg %d\n", g->num_nodes);
!           fprintf (dump_file, "SMS num-loads %d\n", g->num_loads);
!           fprintf (dump_file, "SMS num-stores %d\n", g->num_stores);
  	}
  
  
*************** sms_schedule (FILE *dump_file)
*** 1127,1138 ****
  	}
        gcc_assert (count_reg);
  
!       if (stats_file && count_init)
          {
!           fprintf (stats_file, "SMS const-doloop ");
!           fprintf (stats_file, HOST_WIDEST_INT_PRINT_DEC,
  		     loop_count);
!           fprintf (stats_file, "\n");
          }
  
        node_order = XNEWVEC (int, g->num_nodes);
--- 1121,1132 ----
  	}
        gcc_assert (count_reg);
  
!       if (dump_file && count_init)
          {
!           fprintf (dump_file, "SMS const-doloop ");
!           fprintf (dump_file, HOST_WIDEST_INT_PRINT_DEC,
  		     loop_count);
!           fprintf (dump_file, "\n");
          }
  
        node_order = XNEWVEC (int, g->num_nodes);
*************** sms_schedule (FILE *dump_file)
*** 1142,1156 ****
        mii = MAX (res_MII (g), rec_mii);
        maxii = (calculate_maxii (g) * SMS_MAX_II_FACTOR) / 100;
  
!       if (stats_file)
! 	fprintf (stats_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n",
  		 rec_mii, mii, maxii);
  
        /* After sms_order_nodes and before sms_schedule_by_order, to copy over
  	 ASAP.  */
        set_node_sched_params (g);
  
!       ps = sms_schedule_by_order (g, mii, maxii, node_order, dump_file);
  
        if (ps)
  	stage_count = PS_STAGE_COUNT (ps);
--- 1136,1150 ----
        mii = MAX (res_MII (g), rec_mii);
        maxii = (calculate_maxii (g) * SMS_MAX_II_FACTOR) / 100;
  
!       if (dump_file)
! 	fprintf (dump_file, "SMS iis %d %d %d (rec_mii, mii, maxii)\n",
  		 rec_mii, mii, maxii);
  
        /* After sms_order_nodes and before sms_schedule_by_order, to copy over
  	 ASAP.  */
        set_node_sched_params (g);
  
!       ps = sms_schedule_by_order (g, mii, maxii, node_order);
  
        if (ps)
  	stage_count = PS_STAGE_COUNT (ps);
*************** sms_schedule (FILE *dump_file)
*** 1178,1190 ****
  	  int new_cycles;
  	  struct undo_replace_buff_elem *reg_move_replaces;
  
! 	  if (stats_file)
  	    {
! 	      fprintf (stats_file,
  		       "SMS succeeded %d %d (with ii, sc)\n", ps->ii,
  		       stage_count);
! 	      print_partial_schedule (ps, stats_file);
! 	      fprintf (stats_file,
  		       "SMS Branch (%d) will later be scheduled at cycle %d.\n",
  		       g->closing_branch->cuid, PS_MIN_CYCLE (ps) - 1);
  	    }
--- 1172,1184 ----
  	  int new_cycles;
  	  struct undo_replace_buff_elem *reg_move_replaces;
  
! 	  if (dump_file)
  	    {
! 	      fprintf (dump_file,
  		       "SMS succeeded %d %d (with ii, sc)\n", ps->ii,
  		       stage_count);
! 	      print_partial_schedule (ps, dump_file);
! 	      fprintf (dump_file,
  		       "SMS Branch (%d) will later be scheduled at cycle %d.\n",
  		       g->closing_branch->cuid, PS_MIN_CYCLE (ps) - 1);
  	    }
*************** sms_schedule (FILE *dump_file)
*** 1267,1273 ****
  
    /* Release scheduler data, needed until now because of DFA.  */
    sched_finish ();
!   loop_optimizer_finalize (loops, dump_file);
  }
  
  /* The SMS scheduling algorithm itself
--- 1261,1267 ----
  
    /* Release scheduler data, needed until now because of DFA.  */
    sched_finish ();
!   loop_optimizer_finalize (loops);
  }
  
  /* The SMS scheduling algorithm itself
*************** get_sched_window (partial_schedule_ptr p
*** 1481,1487 ****
  /* This function implements the scheduling algorithm for SMS according to the
     above algorithm.  */
  static partial_schedule_ptr
! sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order, FILE *dump_file)
  {
    int ii = mii;
    int i, c, success;
--- 1475,1481 ----
  /* This function implements the scheduling algorithm for SMS according to the
     above algorithm.  */
  static partial_schedule_ptr
! sms_schedule_by_order (ddg_ptr g, int mii, int maxii, int *nodes_order)
  {
    int ii = mii;
    int i, c, success;
*************** rest_of_handle_sms (void)
*** 2510,2516 ****
    no_new_pseudos = 0;
    /* Collect loop information to be used in SMS.  */
    cfg_layout_initialize (CLEANUP_UPDATE_LIFE);
!   sms_schedule (dump_file);
  
    /* Update the life information, because we add pseudos.  */
    max_regno = max_reg_num ();
--- 2504,2510 ----
    no_new_pseudos = 0;
    /* Collect loop information to be used in SMS.  */
    cfg_layout_initialize (CLEANUP_UPDATE_LIFE);
!   sms_schedule ();
  
    /* Update the life information, because we add pseudos.  */
    max_regno = max_reg_num ();
Index: cse.c
===================================================================
*** cse.c	(revision 110621)
--- cse.c	(working copy)
*************** cse_end_of_basic_block (rtx insn, struct
*** 6803,6809 ****
     in conditional jump instructions.  */
  
  int
! cse_main (rtx f, int nregs, FILE *file)
  {
    struct cse_basic_block_data val;
    rtx insn = f;
--- 6803,6809 ----
     in conditional jump instructions.  */
  
  int
! cse_main (rtx f, int nregs)
  {
    struct cse_basic_block_data val;
    rtx insn = f;
*************** cse_main (rtx f, int nregs, FILE *file)
*** 6869,6876 ****
        cse_basic_block_end = val.high_cuid;
        max_qty = val.nsets * 2;
  
!       if (file)
! 	fprintf (file, ";; Processing block from %d to %d, %d sets.\n",
  		 INSN_UID (insn), val.last ? INSN_UID (val.last) : 0,
  		 val.nsets);
  
--- 6869,6876 ----
        cse_basic_block_end = val.high_cuid;
        max_qty = val.nsets * 2;
  
!       if (dump_file)
! 	fprintf (dump_file, ";; Processing block from %d to %d, %d sets.\n",
  		 INSN_UID (insn), val.last ? INSN_UID (val.last) : 0,
  		 val.nsets);
  
*************** rest_of_handle_cse (void)
*** 7848,7854 ****
  
    reg_scan (get_insns (), max_reg_num ());
  
!   tem = cse_main (get_insns (), max_reg_num (), dump_file);
    if (tem)
      rebuild_jump_labels (get_insns ());
    if (purge_all_dead_edges ())
--- 7848,7854 ----
  
    reg_scan (get_insns (), max_reg_num ());
  
!   tem = cse_main (get_insns (), max_reg_num ());
    if (tem)
      rebuild_jump_labels (get_insns ());
    if (purge_all_dead_edges ())
*************** rest_of_handle_cse2 (void)
*** 7901,7907 ****
    if (dump_file)
      dump_flow_info (dump_file);
  
!   tem = cse_main (get_insns (), max_reg_num (), dump_file);
  
    /* Run a pass to eliminate duplicated assignments to condition code
       registers.  We have to run this after bypass_jumps, because it
--- 7901,7907 ----
    if (dump_file)
      dump_flow_info (dump_file);
  
!   tem = cse_main (get_insns (), max_reg_num ());
  
    /* Run a pass to eliminate duplicated assignments to condition code
       registers.  We have to run this after bypass_jumps, because it
Index: loop-init.c
===================================================================
*** loop-init.c	(revision 110621)
--- loop-init.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 38,44 ****
     loops.  */
  
  struct loops *
! loop_optimizer_init (FILE *dumpfile, unsigned flags)
  {
    struct loops *loops = XCNEW (struct loops);
    edge e;
--- 38,44 ----
     loops.  */
  
  struct loops *
! loop_optimizer_init (unsigned flags)
  {
    struct loops *loops = XCNEW (struct loops);
    edge e;
*************** loop_optimizer_init (FILE *dumpfile, uns
*** 93,99 ****
      mark_single_exit_loops (loops);
  
    /* Dump loops.  */
!   flow_loops_dump (loops, dumpfile, NULL, 1);
  
  #ifdef ENABLE_CHECKING
    verify_dominators (CDI_DOMINATORS);
--- 93,99 ----
      mark_single_exit_loops (loops);
  
    /* Dump loops.  */
!   flow_loops_dump (loops, dump_file, NULL, 1);
  
  #ifdef ENABLE_CHECKING
    verify_dominators (CDI_DOMINATORS);
*************** loop_optimizer_init (FILE *dumpfile, uns
*** 105,111 ****
  
  /* Finalize loop optimizer.  */
  void
! loop_optimizer_finalize (struct loops *loops, FILE *dumpfile)
  {
    unsigned i;
  
--- 105,111 ----
  
  /* Finalize loop optimizer.  */
  void
! loop_optimizer_finalize (struct loops *loops)
  {
    unsigned i;
  
*************** loop_optimizer_finalize (struct loops *l
*** 116,124 ****
      if (loops->parray[i])
        free_simple_loop_desc (loops->parray[i]);
  
-   /* Another dump.  */
-   flow_loops_dump (loops, dumpfile, NULL, 1);
- 
    /* Clean up.  */
    flow_loops_free (loops);
    free (loops);
--- 116,121 ----
*************** rtl_loop_init (void)
*** 173,179 ****
    /* Initialize structures for layout changes.  */
    cfg_layout_initialize (0);
  
!   current_loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
  }
  
  struct tree_opt_pass pass_rtl_loop_init =
--- 170,176 ----
    /* Initialize structures for layout changes.  */
    cfg_layout_initialize (0);
  
!   current_loops = loop_optimizer_init (LOOPS_NORMAL);
  }
  
  struct tree_opt_pass pass_rtl_loop_init =
*************** rtl_loop_done (void)
*** 201,207 ****
    basic_block bb;
  
    if (current_loops)
!     loop_optimizer_finalize (current_loops, dump_file);
  
    free_dominance_info (CDI_DOMINATORS);
  
--- 198,204 ----
    basic_block bb;
  
    if (current_loops)
!     loop_optimizer_finalize (current_loops);
  
    free_dominance_info (CDI_DOMINATORS);
  
Index: tree-ssa-sink.c
===================================================================
*** tree-ssa-sink.c	(revision 110621)
--- tree-ssa-sink.c	(working copy)
*************** sink_code_in_bb (basic_block bb)
*** 522,528 ****
  static void
  execute_sink_code (void)
  {
!   struct loops *loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
    connect_infinite_loops_to_exit ();
    memset (&sink_stats, 0, sizeof (sink_stats));
    calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
--- 522,529 ----
  static void
  execute_sink_code (void)
  {
!   struct loops *loops = loop_optimizer_init (LOOPS_NORMAL);
! 
    connect_infinite_loops_to_exit ();
    memset (&sink_stats, 0, sizeof (sink_stats));
    calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
*************** execute_sink_code (void)
*** 531,537 ****
      fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
    free_dominance_info (CDI_POST_DOMINATORS);
    remove_fake_exit_edges ();
!   loop_optimizer_finalize (loops, dump_file);
  }
  
  /* Gate and execute functions for PRE.  */
--- 532,538 ----
      fprintf (dump_file, "Sunk statements:%d\n", sink_stats.sunk);
    free_dominance_info (CDI_POST_DOMINATORS);
    remove_fake_exit_edges ();
!   loop_optimizer_finalize (loops);
  }
  
  /* Gate and execute functions for PRE.  */
Index: global.c
===================================================================
*** global.c	(revision 110621)
--- global.c	(working copy)
*************** static void make_accurate_live_analysis 
*** 326,339 ****
  
  
  /* Perform allocation of pseudo-registers not allocated by local_alloc.
-    FILE is a file to output debugging information on,
-    or zero if such output is not desired.
  
     Return value is nonzero if reload failed
     and we must not do any more for this function.  */
  
  static int
! global_alloc (FILE *file)
  {
    int retval;
  #ifdef ELIMINABLE_REGS
--- 326,337 ----
  
  
  /* Perform allocation of pseudo-registers not allocated by local_alloc.
  
     Return value is nonzero if reload failed
     and we must not do any more for this function.  */
  
  static int
! global_alloc (void)
  {
    int retval;
  #ifdef ELIMINABLE_REGS
*************** global_alloc (FILE *file)
*** 590,597 ****
  
        prune_preferences ();
  
!       if (file)
! 	dump_conflicts (file);
  
        /* Try allocating them, one by one, in that order,
  	 except for parameters marked with reg_live_length[regno] == -2.  */
--- 588,595 ----
  
        prune_preferences ();
  
!       if (dump_file)
! 	dump_conflicts (dump_file);
  
        /* Try allocating them, one by one, in that order,
  	 except for parameters marked with reg_live_length[regno] == -2.  */
*************** rest_of_handle_global_alloc (void)
*** 2510,2516 ****
       pass fixing up any insns that are invalid.  */
  
    if (optimize)
!     failure = global_alloc (dump_file);
    else
      {
        build_insn_chain (get_insns ());
--- 2508,2514 ----
       pass fixing up any insns that are invalid.  */
  
    if (optimize)
!     failure = global_alloc ();
    else
      {
        build_insn_chain (get_insns ());
Index: tree-ssa-loop.c
===================================================================
*** tree-ssa-loop.c	(revision 110621)
--- tree-ssa-loop.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 42,57 ****
  
  struct loops *current_loops = NULL;
  
! /* Initializes the loop structures.  DUMP is the file to that the details
!    about the analysis should be dumped.  */
  
  static struct loops *
! tree_loop_optimizer_init (FILE *dump)
  {
    struct loops *loops;
   
!   loops = loop_optimizer_init (dump, (LOOPS_NORMAL
! 				      | LOOPS_HAVE_MARKED_SINGLE_EXITS));
  
    if (!loops)
      return NULL;
--- 42,56 ----
  
  struct loops *current_loops = NULL;
  
! /* Initializes the loop structures.  */
  
  static struct loops *
! tree_loop_optimizer_init (void)
  {
    struct loops *loops;
   
!   loops = loop_optimizer_init (LOOPS_NORMAL
! 			       | LOOPS_HAVE_MARKED_SINGLE_EXITS);
  
    if (!loops)
      return NULL;
*************** struct tree_opt_pass pass_tree_loop = 
*** 91,97 ****
  static void
  tree_ssa_loop_init (void)
  {
!   current_loops = tree_loop_optimizer_init (dump_file);
    if (!current_loops)
      return;
  
--- 90,96 ----
  static void
  tree_ssa_loop_init (void)
  {
!   current_loops = tree_loop_optimizer_init ();
    if (!current_loops)
      return;
  
*************** tree_ssa_loop_done (void)
*** 448,455 ****
  
    free_numbers_of_iterations_estimates (current_loops);
    scev_finalize ();
!   loop_optimizer_finalize (current_loops,
! 			   (dump_flags & TDF_DETAILS ? dump_file : NULL));
    current_loops = NULL;
  }
    
--- 447,453 ----
  
    free_numbers_of_iterations_estimates (current_loops);
    scev_finalize ();
!   loop_optimizer_finalize (current_loops);
    current_loops = NULL;
  }
    
Index: predict.c
===================================================================
*** predict.c	(revision 110621)
--- predict.c	(working copy)
*************** combine_predictions_for_insn (rtx insn, 
*** 478,484 ****
     Remove now useless prediction entries.  */
  
  static void
! combine_predictions_for_bb (FILE *file, basic_block bb)
  {
    int best_probability = PROB_EVEN;
    int best_predictor = END_PREDICTORS;
--- 478,484 ----
     Remove now useless prediction entries.  */
  
  static void
! combine_predictions_for_bb (basic_block bb)
  {
    int best_probability = PROB_EVEN;
    int best_predictor = END_PREDICTORS;
*************** combine_predictions_for_bb (FILE *file, 
*** 512,525 ****
        if (!bb->count)
  	set_even_probabilities (bb);
        bb->predictions = NULL;
!       if (file)
! 	fprintf (file, "%i edges in bb %i predicted to even probabilities\n",
  		 nedges, bb->index);
        return;
      }
  
!   if (file)
!     fprintf (file, "Predictions for bb %i\n", bb->index);
  
    /* We implement "first match" heuristics and use probability guessed
       by predictor with smallest index.  */
--- 512,525 ----
        if (!bb->count)
  	set_even_probabilities (bb);
        bb->predictions = NULL;
!       if (dump_file)
! 	fprintf (dump_file, "%i edges in bb %i predicted to even probabilities\n",
  		 nedges, bb->index);
        return;
      }
  
!   if (dump_file)
!     fprintf (dump_file, "Predictions for bb %i\n", bb->index);
  
    /* We implement "first match" heuristics and use probability guessed
       by predictor with smallest index.  */
*************** combine_predictions_for_bb (FILE *file, 
*** 556,573 ****
      first_match = true;
  
    if (!found)
!     dump_prediction (file, PRED_NO_PREDICTION, combined_probability, bb, true);
    else
      {
!       dump_prediction (file, PRED_DS_THEORY, combined_probability, bb,
  		       !first_match);
!       dump_prediction (file, PRED_FIRST_MATCH, best_probability, bb,
  		       first_match);
      }
  
    if (first_match)
      combined_probability = best_probability;
!   dump_prediction (file, PRED_COMBINED, combined_probability, bb, true);
  
    for (pred = bb->predictions; pred; pred = pred->ep_next)
      {
--- 556,573 ----
      first_match = true;
  
    if (!found)
!     dump_prediction (dump_file, PRED_NO_PREDICTION, combined_probability, bb, true);
    else
      {
!       dump_prediction (dump_file, PRED_DS_THEORY, combined_probability, bb,
  		       !first_match);
!       dump_prediction (dump_file, PRED_FIRST_MATCH, best_probability, bb,
  		       first_match);
      }
  
    if (first_match)
      combined_probability = best_probability;
!   dump_prediction (dump_file, PRED_COMBINED, combined_probability, bb, true);
  
    for (pred = bb->predictions; pred; pred = pred->ep_next)
      {
*************** combine_predictions_for_bb (FILE *file, 
*** 576,582 ****
  
        if (pred->ep_edge != EDGE_SUCC (bb, 0))
  	probability = REG_BR_PROB_BASE - probability;
!       dump_prediction (file, predictor, probability, bb,
  		       !first_match || best_predictor == predictor);
      }
    bb->predictions = NULL;
--- 576,582 ----
  
        if (pred->ep_edge != EDGE_SUCC (bb, 0))
  	probability = REG_BR_PROB_BASE - probability;
!       dump_prediction (dump_file, predictor, probability, bb,
  		       !first_match || best_predictor == predictor);
      }
    bb->predictions = NULL;
*************** tree_estimate_probability (void)
*** 1385,1391 ****
        tree_predict_by_opcode (bb);
      }
    FOR_EACH_BB (bb)
!     combine_predictions_for_bb (dump_file, bb);
  
    if (!flag_loop_optimize)
      strip_builtin_expect ();
--- 1385,1391 ----
        tree_predict_by_opcode (bb);
      }
    FOR_EACH_BB (bb)
!     combine_predictions_for_bb (bb);
  
    if (!flag_loop_optimize)
      strip_builtin_expect ();
Index: recog.c
===================================================================
*** recog.c	(revision 110621)
--- recog.c	(working copy)
*************** peep2_find_free_register (int from, int 
*** 3023,3029 ****
  /* Perform the peephole2 optimization pass.  */
  
  static void
! peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
  {
    rtx insn, prev;
    regset live;
--- 3023,3029 ----
  /* Perform the peephole2 optimization pass.  */
  
  static void
! peephole2_optimize (void)
  {
    rtx insn, prev;
    regset live;
*************** static void
*** 3446,3452 ****
  rest_of_handle_peephole2 (void)
  {
  #ifdef HAVE_peephole2
!   peephole2_optimize (dump_file);
  #endif
  }
  
--- 3446,3452 ----
  rest_of_handle_peephole2 (void)
  {
  #ifdef HAVE_peephole2
!   peephole2_optimize ();
  #endif
  }
  
Index: lcm.c
===================================================================
*** lcm.c	(revision 110621)
--- lcm.c	(working copy)
*************** compute_insert_delete (struct edge_list 
*** 376,382 ****
     map the insert vector to what edge an expression should be inserted on.  */
  
  struct edge_list *
! pre_edge_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
  	      sbitmap *avloc, sbitmap *antloc, sbitmap *kill,
  	      sbitmap **insert, sbitmap **delete)
  {
--- 376,382 ----
     map the insert vector to what edge an expression should be inserted on.  */
  
  struct edge_list *
! pre_edge_lcm (int n_exprs, sbitmap *transp,
  	      sbitmap *avloc, sbitmap *antloc, sbitmap *kill,
  	      sbitmap **insert, sbitmap **delete)
  {
*************** pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
*** 390,404 ****
    num_edges = NUM_EDGES (edge_list);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       fprintf (file, "Edge List:\n");
!       verify_edge_list (file, edge_list);
!       print_edge_list (file, edge_list);
!       dump_sbitmap_vector (file, "transp", "", transp, last_basic_block);
!       dump_sbitmap_vector (file, "antloc", "", antloc, last_basic_block);
!       dump_sbitmap_vector (file, "avloc", "", avloc, last_basic_block);
!       dump_sbitmap_vector (file, "kill", "", kill, last_basic_block);
      }
  #endif
  
--- 390,404 ----
    num_edges = NUM_EDGES (edge_list);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       fprintf (dump_file, "Edge List:\n");
!       verify_edge_list (dump_file, edge_list);
!       print_edge_list (dump_file, edge_list);
!       dump_sbitmap_vector (dump_file, "transp", "", transp, last_basic_block);
!       dump_sbitmap_vector (dump_file, "antloc", "", antloc, last_basic_block);
!       dump_sbitmap_vector (dump_file, "avloc", "", avloc, last_basic_block);
!       dump_sbitmap_vector (dump_file, "kill", "", kill, last_basic_block);
      }
  #endif
  
*************** pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
*** 414,423 ****
    compute_antinout_edge (antloc, transp, antin, antout);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "antin", "", antin, last_basic_block);
!       dump_sbitmap_vector (file, "antout", "", antout, last_basic_block);
      }
  #endif
  
--- 414,423 ----
    compute_antinout_edge (antloc, transp, antin, antout);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "antin", "", antin, last_basic_block);
!       dump_sbitmap_vector (dump_file, "antout", "", antout, last_basic_block);
      }
  #endif
  
*************** pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
*** 426,433 ****
    compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
!     dump_sbitmap_vector (file, "earliest", "", earliest, num_edges);
  #endif
  
    sbitmap_vector_free (antout);
--- 426,433 ----
    compute_earliest (edge_list, n_exprs, antin, antout, avout, kill, earliest);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
!     dump_sbitmap_vector (dump_file, "earliest", "", earliest, num_edges);
  #endif
  
    sbitmap_vector_free (antout);
*************** pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
*** 441,450 ****
    compute_laterin (edge_list, earliest, antloc, later, laterin);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "laterin", "", laterin, last_basic_block + 1);
!       dump_sbitmap_vector (file, "later", "", later, num_edges);
      }
  #endif
  
--- 441,450 ----
    compute_laterin (edge_list, earliest, antloc, later, laterin);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "laterin", "", laterin, last_basic_block + 1);
!       dump_sbitmap_vector (dump_file, "later", "", later, num_edges);
      }
  #endif
  
*************** pre_edge_lcm (FILE *file ATTRIBUTE_UNUSE
*** 458,467 ****
    sbitmap_vector_free (later);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "pre_insert_map", "", *insert, num_edges);
!       dump_sbitmap_vector (file, "pre_delete_map", "", *delete,
  			   last_basic_block);
      }
  #endif
--- 458,467 ----
    sbitmap_vector_free (later);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
!       dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
  			   last_basic_block);
      }
  #endif
*************** compute_rev_insert_delete (struct edge_l
*** 710,716 ****
     an expression should be inserted on.  */
  
  struct edge_list *
! pre_edge_rev_lcm (FILE *file ATTRIBUTE_UNUSED, int n_exprs, sbitmap *transp,
  		  sbitmap *st_avloc, sbitmap *st_antloc, sbitmap *kill,
  		  sbitmap **insert, sbitmap **delete)
  {
--- 710,716 ----
     an expression should be inserted on.  */
  
  struct edge_list *
! pre_edge_rev_lcm (int n_exprs, sbitmap *transp,
  		  sbitmap *st_avloc, sbitmap *st_antloc, sbitmap *kill,
  		  sbitmap **insert, sbitmap **delete)
  {
*************** pre_edge_rev_lcm (FILE *file ATTRIBUTE_U
*** 735,759 ****
    compute_available (st_avloc, kill, st_avout, st_avin);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       fprintf (file, "Edge List:\n");
!       verify_edge_list (file, edge_list);
!       print_edge_list (file, edge_list);
!       dump_sbitmap_vector (file, "transp", "", transp, last_basic_block);
!       dump_sbitmap_vector (file, "st_avloc", "", st_avloc, last_basic_block);
!       dump_sbitmap_vector (file, "st_antloc", "", st_antloc, last_basic_block);
!       dump_sbitmap_vector (file, "st_antin", "", st_antin, last_basic_block);
!       dump_sbitmap_vector (file, "st_antout", "", st_antout, last_basic_block);
!       dump_sbitmap_vector (file, "st_kill", "", kill, last_basic_block);
      }
  #endif
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "st_avout", "", st_avout, last_basic_block);
!       dump_sbitmap_vector (file, "st_avin", "", st_avin, last_basic_block);
      }
  #endif
  
--- 735,759 ----
    compute_available (st_avloc, kill, st_avout, st_avin);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       fprintf (dump_file, "Edge List:\n");
!       verify_edge_list (dump_file, edge_list);
!       print_edge_list (dump_file, edge_list);
!       dump_sbitmap_vector (dump_file, "transp", "", transp, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_avloc", "", st_avloc, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_antloc", "", st_antloc, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_antin", "", st_antin, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_antout", "", st_antout, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_kill", "", kill, last_basic_block);
      }
  #endif
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "st_avout", "", st_avout, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_avin", "", st_avin, last_basic_block);
      }
  #endif
  
*************** pre_edge_rev_lcm (FILE *file ATTRIBUTE_U
*** 763,770 ****
  		    kill, farthest);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
!     dump_sbitmap_vector (file, "farthest", "", farthest, num_edges);
  #endif
  
    sbitmap_vector_free (st_antin);
--- 763,770 ----
  		    kill, farthest);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
!     dump_sbitmap_vector (dump_file, "farthest", "", farthest, num_edges);
  #endif
  
    sbitmap_vector_free (st_antin);
*************** pre_edge_rev_lcm (FILE *file ATTRIBUTE_U
*** 780,790 ****
    compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "nearerout", "", nearerout,
  			   last_basic_block + 1);
!       dump_sbitmap_vector (file, "nearer", "", nearer, num_edges);
      }
  #endif
  
--- 780,790 ----
    compute_nearerout (edge_list, farthest, st_avloc, nearer, nearerout);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "nearerout", "", nearerout,
  			   last_basic_block + 1);
!       dump_sbitmap_vector (dump_file, "nearer", "", nearer, num_edges);
      }
  #endif
  
*************** pre_edge_rev_lcm (FILE *file ATTRIBUTE_U
*** 799,808 ****
    sbitmap_vector_free (nearer);
  
  #ifdef LCM_DEBUG_INFO
!   if (file)
      {
!       dump_sbitmap_vector (file, "pre_insert_map", "", *insert, num_edges);
!       dump_sbitmap_vector (file, "pre_delete_map", "", *delete,
  			   last_basic_block);
      }
  #endif
--- 799,808 ----
    sbitmap_vector_free (nearer);
  
  #ifdef LCM_DEBUG_INFO
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "pre_insert_map", "", *insert, num_edges);
!       dump_sbitmap_vector (dump_file, "pre_delete_map", "", *delete,
  			   last_basic_block);
      }
  #endif
Index: regmove.c
===================================================================
*** regmove.c	(revision 110621)
--- regmove.c	(working copy)
*************** static void flags_set_1 (rtx, rtx, void 
*** 76,87 ****
  static int try_auto_increment (rtx, rtx, rtx, rtx, HOST_WIDE_INT, int);
  static int find_matches (rtx, struct match *);
  static void replace_in_call_usage (rtx *, unsigned int, rtx, rtx);
! static int fixup_match_1 (rtx, rtx, rtx, rtx, rtx, int, int, int, FILE *);
  static int reg_is_remote_constant_p (rtx, rtx, rtx);
  static int stable_and_no_regs_but_for_p (rtx, rtx, rtx);
  static int regclass_compatible_p (int, int);
  static int replacement_quality (rtx);
! static int fixup_match_2 (rtx, rtx, rtx, rtx, FILE *);
  
  /* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
     causing too much register allocation problems.  */
--- 76,87 ----
  static int try_auto_increment (rtx, rtx, rtx, rtx, HOST_WIDE_INT, int);
  static int find_matches (rtx, struct match *);
  static void replace_in_call_usage (rtx *, unsigned int, rtx, rtx);
! static int fixup_match_1 (rtx, rtx, rtx, rtx, rtx, int, int, int);
  static int reg_is_remote_constant_p (rtx, rtx, rtx);
  static int stable_and_no_regs_but_for_p (rtx, rtx, rtx);
  static int regclass_compatible_p (int, int);
  static int replacement_quality (rtx);
! static int fixup_match_2 (rtx, rtx, rtx, rtx);
  
  /* Return nonzero if registers with CLASS1 and CLASS2 can be merged without
     causing too much register allocation problems.  */
*************** reg_is_remote_constant_p (rtx reg, rtx i
*** 916,922 ****
     hard register as ultimate source, like the frame pointer.  */
  
  static int
! fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset, FILE *regmove_dump_file)
  {
    rtx p, dst_death = 0;
    int length, num_calls = 0;
--- 916,922 ----
     hard register as ultimate source, like the frame pointer.  */
  
  static int
! fixup_match_2 (rtx insn, rtx dst, rtx src, rtx offset)
  {
    rtx p, dst_death = 0;
    int length, num_calls = 0;
*************** fixup_match_2 (rtx insn, rtx dst, rtx sr
*** 965,972 ****
  		  REG_N_CALLS_CROSSED (REGNO (dst)) += num_calls;
  		}
  
! 	      if (regmove_dump_file)
! 		fprintf (regmove_dump_file,
  			 "Fixed operand of insn %d.\n",
  			  INSN_UID (insn));
  
--- 965,972 ----
  		  REG_N_CALLS_CROSSED (REGNO (dst)) += num_calls;
  		}
  
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "Fixed operand of insn %d.\n",
  			  INSN_UID (insn));
  
*************** fixup_match_2 (rtx insn, rtx dst, rtx sr
*** 1038,1044 ****
     (or 0 if none should be output).  */
  
  static void
! regmove_optimize (rtx f, int nregs, FILE *regmove_dump_file)
  {
    int old_max_uid = get_max_uid ();
    rtx insn;
--- 1038,1044 ----
     (or 0 if none should be output).  */
  
  static void
! regmove_optimize (rtx f, int nregs)
  {
    int old_max_uid = get_max_uid ();
    rtx insn;
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1072,1079 ****
        if (! flag_regmove && pass >= flag_expensive_optimizations)
  	goto done;
  
!       if (regmove_dump_file)
! 	fprintf (regmove_dump_file, "Starting %s pass...\n",
  		 pass ? "backward" : "forward");
  
        for (insn = pass ? get_last_insn () : f; insn;
--- 1072,1079 ----
        if (! flag_regmove && pass >= flag_expensive_optimizations)
  	goto done;
  
!       if (dump_file)
! 	fprintf (dump_file, "Starting %s pass...\n",
  		 pass ? "backward" : "forward");
  
        for (insn = pass ? get_last_insn () : f; insn;
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1209,1216 ****
  		continue;
  
  	      if (fixup_match_1 (insn, set, src, src_subreg, dst, pass,
! 				 op_no, match_no,
! 				 regmove_dump_file))
  		break;
  	    }
  	}
--- 1209,1215 ----
  		continue;
  
  	      if (fixup_match_1 (insn, set, src, src_subreg, dst, pass,
! 				 op_no, match_no))
  		break;
  	    }
  	}
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1218,1225 ****
  
    /* A backward pass.  Replace input operands with output operands.  */
  
!   if (regmove_dump_file)
!     fprintf (regmove_dump_file, "Starting backward pass...\n");
  
    for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
      {
--- 1217,1224 ----
  
    /* A backward pass.  Replace input operands with output operands.  */
  
!   if (dump_file)
!     fprintf (dump_file, "Starting backward pass...\n");
  
    for (insn = get_last_insn (); insn; insn = PREV_INSN (insn))
      {
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1308,1315 ****
  		      && GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT
  		      && XEXP (SET_SRC (set), 0) == src
  		      && fixup_match_2 (insn, dst, src,
! 					XEXP (SET_SRC (set), 1),
! 					regmove_dump_file))
  		    break;
  		  continue;
  		}
--- 1307,1313 ----
  		      && GET_CODE (XEXP (SET_SRC (set), 1)) == CONST_INT
  		      && XEXP (SET_SRC (set), 0) == src
  		      && fixup_match_2 (insn, dst, src,
! 					XEXP (SET_SRC (set), 1)))
  		    break;
  		  continue;
  		}
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1368,1375 ****
  		}
  
  
! 	      if (regmove_dump_file)
! 		fprintf (regmove_dump_file,
  			 "Could fix operand %d of insn %d matching operand %d.\n",
  			 op_no, INSN_UID (insn), match_no);
  
--- 1366,1373 ----
  		}
  
  
! 	      if (dump_file)
! 		fprintf (dump_file,
  			 "Could fix operand %d of insn %d matching operand %d.\n",
  			 op_no, INSN_UID (insn), match_no);
  
*************** regmove_optimize (rtx f, int nregs, FILE
*** 1472,1479 ****
  			REG_LIVE_LENGTH (srcno) = 2;
  		    }
  
! 		  if (regmove_dump_file)
! 		    fprintf (regmove_dump_file,
  			     "Fixed operand %d of insn %d matching operand %d.\n",
  			     op_no, INSN_UID (insn), match_no);
  
--- 1470,1477 ----
  			REG_LIVE_LENGTH (srcno) = 2;
  		    }
  
! 		  if (dump_file)
! 		    fprintf (dump_file,
  			     "Fixed operand %d of insn %d matching operand %d.\n",
  			     op_no, INSN_UID (insn), match_no);
  
*************** replace_in_call_usage (rtx *loc, unsigne
*** 1643,1650 ****
  
  static int
  fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
! 	       int backward, int operand_number, int match_number,
! 	       FILE *regmove_dump_file)
  {
    rtx p;
    rtx post_inc = 0, post_inc_set = 0, search_end = 0;
--- 1641,1647 ----
  
  static int
  fixup_match_1 (rtx insn, rtx set, rtx src, rtx src_subreg, rtx dst,
! 	       int backward, int operand_number, int match_number)
  {
    rtx p;
    rtx post_inc = 0, post_inc_set = 0, search_end = 0;
*************** fixup_match_1 (rtx insn, rtx set, rtx sr
*** 1679,1686 ****
  	code = NOTE;
      }
  
!   if (regmove_dump_file)
!     fprintf (regmove_dump_file,
  	     "Could fix operand %d of insn %d matching operand %d.\n",
  	     operand_number, INSN_UID (insn), match_number);
  
--- 1676,1683 ----
  	code = NOTE;
      }
  
!   if (dump_file)
!     fprintf (dump_file,
  	     "Could fix operand %d of insn %d matching operand %d.\n",
  	     operand_number, INSN_UID (insn), match_number);
  
*************** fixup_match_1 (rtx insn, rtx set, rtx sr
*** 2020,2027 ****
        if (REG_LIVE_LENGTH (REGNO (dst)) < 2)
  	REG_LIVE_LENGTH (REGNO (dst)) = 2;
      }
!   if (regmove_dump_file)
!     fprintf (regmove_dump_file,
  	     "Fixed operand %d of insn %d matching operand %d.\n",
  	     operand_number, INSN_UID (insn), match_number);
    return 1;
--- 2017,2024 ----
        if (REG_LIVE_LENGTH (REGNO (dst)) < 2)
  	REG_LIVE_LENGTH (REGNO (dst)) = 2;
      }
!   if (dump_file)
!     fprintf (dump_file,
  	     "Fixed operand %d of insn %d matching operand %d.\n",
  	     operand_number, INSN_UID (insn), match_number);
    return 1;
*************** gate_handle_regmove (void)
*** 2476,2482 ****
  static void
  rest_of_handle_regmove (void)
  {
!   regmove_optimize (get_insns (), max_reg_num (), dump_file);
    cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
  }
  
--- 2473,2479 ----
  static void
  rest_of_handle_regmove (void)
  {
!   regmove_optimize (get_insns (), max_reg_num ());
    cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE);
  }
  
*************** gate_handle_stack_adjustments (void)
*** 2508,2514 ****
  static void
  rest_of_handle_stack_adjustments (void)
  {
!   life_analysis (dump_file, PROP_POSTRELOAD);
    cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
                 | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
  
--- 2505,2511 ----
  static void
  rest_of_handle_stack_adjustments (void)
  {
!   life_analysis (PROP_POSTRELOAD);
    cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_UPDATE_LIFE
                 | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0));
  
Index: local-alloc.c
===================================================================
*** local-alloc.c	(revision 110621)
--- local-alloc.c	(working copy)
*************** rest_of_handle_local_alloc (void)
*** 2542,2548 ****
  
    allocate_initial_values (reg_equiv_memory_loc);
  
!   regclass (get_insns (), max_reg_num (), dump_file);
    rebuild_notes = local_alloc ();
  
    /* Local allocation may have turned an indirect jump into a direct
--- 2542,2548 ----
  
    allocate_initial_values (reg_equiv_memory_loc);
  
!   regclass (get_insns (), max_reg_num ());
    rebuild_notes = local_alloc ();
  
    /* Local allocation may have turned an indirect jump into a direct
Index: gcse.c
===================================================================
*** gcse.c	(revision 110621)
--- gcse.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 271,279 ****
  
  /* GCSE global vars.  */
  
- /* -dG dump file.  */
- static FILE *gcse_file;
- 
  /* Note whether or not we should run jump optimization after gcse.  We
     want to do this for two cases.
  
--- 271,276 ----
*************** static FILE *gcse_file;
*** 282,294 ****
      * If we added any labels via edge splitting.  */
  static int run_jump_opt_after_gcse;
  
- /* Bitmaps are normally not included in debugging dumps.
-    However it's useful to be able to print them from GDB.
-    We could create special functions for this, but it's simpler to
-    just allow passing stderr to the dump_foo fns.  Since stderr can
-    be a macro, we store a copy here.  */
- static FILE *debug_stderr;
- 
  /* An obstack for our working variables.  */
  static struct obstack gcse_obstack;
  
--- 279,284 ----
*************** static bool is_too_expensive (const char
*** 661,667 ****
     change is mode.  */
  
  static int
! gcse_main (rtx f ATTRIBUTE_UNUSED, FILE *file)
  {
    int changed, pass;
    /* Bytes used at start of pass.  */
--- 651,657 ----
     change is mode.  */
  
  static int
! gcse_main (rtx f ATTRIBUTE_UNUSED)
  {
    int changed, pass;
    /* Bytes used at start of pass.  */
*************** gcse_main (rtx f ATTRIBUTE_UNUSED, FILE 
*** 679,694 ****
    /* Assume that we do not need to run jump optimizations after gcse.  */
    run_jump_opt_after_gcse = 0;
  
-   /* For calling dump_foo fns from gdb.  */
-   debug_stderr = stderr;
-   gcse_file = file;
- 
    /* Identify the basic block information for this function, including
       successors and predecessors.  */
    max_gcse_regno = max_reg_num ();
  
!   if (file)
!     dump_flow_info (file);
  
    /* Return if there's nothing to do, or it is too expensive.  */
    if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
--- 669,680 ----
    /* Assume that we do not need to run jump optimizations after gcse.  */
    run_jump_opt_after_gcse = 0;
  
    /* Identify the basic block information for this function, including
       successors and predecessors.  */
    max_gcse_regno = max_reg_num ();
  
!   if (dump_file)
!     dump_flow_info (dump_file);
  
    /* Return if there's nothing to do, or it is too expensive.  */
    if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
*************** gcse_main (rtx f ATTRIBUTE_UNUSED, FILE 
*** 720,727 ****
    while (changed && pass < MAX_GCSE_PASSES)
      {
        changed = 0;
!       if (file)
! 	fprintf (file, "GCSE pass %d\n\n", pass + 1);
  
        /* Initialize bytes_used to the space for the pred/succ lists,
  	 and the reg_set_table data.  */
--- 706,713 ----
    while (changed && pass < MAX_GCSE_PASSES)
      {
        changed = 0;
!       if (dump_file)
! 	fprintf (dump_file, "GCSE pass %d\n\n", pass + 1);
  
        /* Initialize bytes_used to the space for the pred/succ lists,
  	 and the reg_set_table data.  */
*************** gcse_main (rtx f ATTRIBUTE_UNUSED, FILE 
*** 786,795 ****
  	  timevar_pop (TV_HOIST);
  	}
  
!       if (file)
  	{
! 	  fprintf (file, "\n");
! 	  fflush (file);
  	}
  
        obstack_free (&gcse_obstack, gcse_obstack_bottom);
--- 772,781 ----
  	  timevar_pop (TV_HOIST);
  	}
  
!       if (dump_file)
  	{
! 	  fprintf (dump_file, "\n");
! 	  fflush (dump_file);
  	}
  
        obstack_free (&gcse_obstack, gcse_obstack_bottom);
*************** gcse_main (rtx f ATTRIBUTE_UNUSED, FILE 
*** 807,817 ****
    timevar_pop (TV_CPROP2);
    free_gcse_mem ();
  
!   if (file)
      {
!       fprintf (file, "GCSE of %s: %d basic blocks, ",
  	       current_function_name (), n_basic_blocks);
!       fprintf (file, "%d pass%s, %d bytes\n\n",
  	       pass, pass > 1 ? "es" : "", max_pass_bytes);
      }
  
--- 793,803 ----
    timevar_pop (TV_CPROP2);
    free_gcse_mem ();
  
!   if (dump_file)
      {
!       fprintf (dump_file, "GCSE of %s: %d basic blocks, ",
  	       current_function_name (), n_basic_blocks);
!       fprintf (dump_file, "%d pass%s, %d bytes\n\n",
  	       pass, pass > 1 ? "es" : "", max_pass_bytes);
      }
  
*************** cprop_jump (basic_block bb, rtx setcc, r
*** 2861,2873 ****
    run_jump_opt_after_gcse = 1;
  
    global_const_prop_count++;
!   if (gcse_file != NULL)
      {
!       fprintf (gcse_file,
  	       "GLOBAL CONST-PROP: Replacing reg %d in jump_insn %d with constant ",
  	       REGNO (from), INSN_UID (jump));
!       print_rtl (gcse_file, src);
!       fprintf (gcse_file, "\n");
      }
    purge_dead_edges (bb);
  
--- 2847,2859 ----
    run_jump_opt_after_gcse = 1;
  
    global_const_prop_count++;
!   if (dump_file != NULL)
      {
!       fprintf (dump_file,
  	       "GLOBAL CONST-PROP: Replacing reg %d in jump_insn %d with constant ",
  	       REGNO (from), INSN_UID (jump));
!       print_rtl (dump_file, src);
!       fprintf (dump_file, "\n");
      }
    purge_dead_edges (bb);
  
*************** cprop_insn (rtx insn, int alter_jumps)
*** 2966,2977 ****
  	    {
  	      changed = 1;
  	      global_const_prop_count++;
! 	      if (gcse_file != NULL)
  		{
! 		  fprintf (gcse_file, "GLOBAL CONST-PROP: Replacing reg %d in ", regno);
! 		  fprintf (gcse_file, "insn %d with constant ", INSN_UID (insn));
! 		  print_rtl (gcse_file, src);
! 		  fprintf (gcse_file, "\n");
  		}
  	      if (INSN_DELETED_P (insn))
  		return 1;
--- 2952,2963 ----
  	    {
  	      changed = 1;
  	      global_const_prop_count++;
! 	      if (dump_file != NULL)
  		{
! 		  fprintf (dump_file, "GLOBAL CONST-PROP: Replacing reg %d in ", regno);
! 		  fprintf (dump_file, "insn %d with constant ", INSN_UID (insn));
! 		  print_rtl (dump_file, src);
! 		  fprintf (dump_file, "\n");
  		}
  	      if (INSN_DELETED_P (insn))
  		return 1;
*************** cprop_insn (rtx insn, int alter_jumps)
*** 2985,2995 ****
  	    {
  	      changed = 1;
  	      global_copy_prop_count++;
! 	      if (gcse_file != NULL)
  		{
! 		  fprintf (gcse_file, "GLOBAL COPY-PROP: Replacing reg %d in insn %d",
  			   regno, INSN_UID (insn));
! 		  fprintf (gcse_file, " with reg %d\n", REGNO (src));
  		}
  
  	      /* The original insn setting reg_used may or may not now be
--- 2971,2981 ----
  	    {
  	      changed = 1;
  	      global_copy_prop_count++;
! 	      if (dump_file != NULL)
  		{
! 		  fprintf (dump_file, "GLOBAL COPY-PROP: Replacing reg %d in insn %d",
  			   regno, INSN_UID (insn));
! 		  fprintf (dump_file, " with reg %d\n", REGNO (src));
  		}
  
  	      /* The original insn setting reg_used may or may not now be
*************** do_local_cprop (rtx x, rtx insn, bool al
*** 3102,3115 ****
  	  adjusted = adjust_libcall_notes (x, newcnst, insn, libcall_sp);
  	  gcc_assert (adjusted);
  	  
! 	  if (gcse_file != NULL)
  	    {
! 	      fprintf (gcse_file, "LOCAL CONST-PROP: Replacing reg %d in ",
  		       REGNO (x));
! 	      fprintf (gcse_file, "insn %d with constant ",
  		       INSN_UID (insn));
! 	      print_rtl (gcse_file, newcnst);
! 	      fprintf (gcse_file, "\n");
  	    }
  	  local_const_prop_count++;
  	  return true;
--- 3088,3101 ----
  	  adjusted = adjust_libcall_notes (x, newcnst, insn, libcall_sp);
  	  gcc_assert (adjusted);
  	  
! 	  if (dump_file != NULL)
  	    {
! 	      fprintf (dump_file, "LOCAL CONST-PROP: Replacing reg %d in ",
  		       REGNO (x));
! 	      fprintf (dump_file, "insn %d with constant ",
  		       INSN_UID (insn));
! 	      print_rtl (dump_file, newcnst);
! 	      fprintf (dump_file, "\n");
  	    }
  	  local_const_prop_count++;
  	  return true;
*************** do_local_cprop (rtx x, rtx insn, bool al
*** 3117,3128 ****
        else if (newreg && newreg != x && try_replace_reg (x, newreg, insn))
  	{
  	  adjust_libcall_notes (x, newreg, insn, libcall_sp);
! 	  if (gcse_file != NULL)
  	    {
! 	      fprintf (gcse_file,
  		       "LOCAL COPY-PROP: Replacing reg %d in insn %d",
  		       REGNO (x), INSN_UID (insn));
! 	      fprintf (gcse_file, " with reg %d\n", REGNO (newreg));
  	    }
  	  local_copy_prop_count++;
  	  return true;
--- 3103,3114 ----
        else if (newreg && newreg != x && try_replace_reg (x, newreg, insn))
  	{
  	  adjust_libcall_notes (x, newreg, insn, libcall_sp);
! 	  if (dump_file != NULL)
  	    {
! 	      fprintf (dump_file,
  		       "LOCAL COPY-PROP: Replacing reg %d in insn %d",
  		       REGNO (x), INSN_UID (insn));
! 	      fprintf (dump_file, " with reg %d\n", REGNO (newreg));
  	    }
  	  local_copy_prop_count++;
  	  return true;
*************** cprop (int alter_jumps)
*** 3259,3266 ****
    /* Note we start at block 1.  */
    if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      {
!       if (gcse_file != NULL)
! 	fprintf (gcse_file, "\n");
        return 0;
      }
  
--- 3245,3252 ----
    /* Note we start at block 1.  */
    if (ENTRY_BLOCK_PTR->next_bb == EXIT_BLOCK_PTR)
      {
!       if (dump_file != NULL)
! 	fprintf (dump_file, "\n");
        return 0;
      }
  
*************** cprop (int alter_jumps)
*** 3284,3291 ****
  	  }
      }
  
!   if (gcse_file != NULL)
!     fprintf (gcse_file, "\n");
  
    return changed;
  }
--- 3270,3277 ----
  	  }
      }
  
!   if (dump_file != NULL)
!     fprintf (dump_file, "\n");
  
    return changed;
  }
*************** find_implicit_sets (void)
*** 3374,3392 ****
  		new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
  					     XEXP (cond, 1));
  		implicit_sets[dest->index] = new;
! 		if (gcse_file)
  		  {
! 		    fprintf(gcse_file, "Implicit set of reg %d in ",
  			    REGNO (XEXP (cond, 0)));
! 		    fprintf(gcse_file, "basic block %d\n", dest->index);
  		  }
  		count++;
  	      }
  	  }
        }
  
!   if (gcse_file)
!     fprintf (gcse_file, "Found %d implicit sets\n", count);
  }
  
  /* Perform one copy/constant propagation pass.
--- 3360,3378 ----
  		new = gen_rtx_SET (VOIDmode, XEXP (cond, 0),
  					     XEXP (cond, 1));
  		implicit_sets[dest->index] = new;
! 		if (dump_file)
  		  {
! 		    fprintf(dump_file, "Implicit set of reg %d in ",
  			    REGNO (XEXP (cond, 0)));
! 		    fprintf(dump_file, "basic block %d\n", dest->index);
  		  }
  		count++;
  	      }
  	  }
        }
  
!   if (dump_file)
!     fprintf (dump_file, "Found %d implicit sets\n", count);
  }
  
  /* Perform one copy/constant propagation pass.
*************** one_cprop_pass (int pass, bool cprop_jum
*** 3415,3422 ****
    free (implicit_sets);
    implicit_sets = NULL;
  
!   if (gcse_file)
!     dump_hash_table (gcse_file, "SET", &set_hash_table);
    if (set_hash_table.n_elems > 0)
      {
        alloc_cprop_mem (last_basic_block, set_hash_table.n_elems);
--- 3401,3408 ----
    free (implicit_sets);
    implicit_sets = NULL;
  
!   if (dump_file)
!     dump_hash_table (dump_file, "SET", &set_hash_table);
    if (set_hash_table.n_elems > 0)
      {
        alloc_cprop_mem (last_basic_block, set_hash_table.n_elems);
*************** one_cprop_pass (int pass, bool cprop_jum
*** 3429,3441 ****
  
    free_hash_table (&set_hash_table);
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "CPROP of %s, pass %d: %d bytes needed, ",
  	       current_function_name (), pass, bytes_used);
!       fprintf (gcse_file, "%d local const props, %d local copy props, ",
  	       local_const_prop_count, local_copy_prop_count);
!       fprintf (gcse_file, "%d global const props, %d global copy props\n\n",
  	       global_const_prop_count, global_copy_prop_count);
      }
    /* Global analysis may get into infinite loops for unreachable blocks.  */
--- 3415,3427 ----
  
    free_hash_table (&set_hash_table);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "CPROP of %s, pass %d: %d bytes needed, ",
  	       current_function_name (), pass, bytes_used);
!       fprintf (dump_file, "%d local const props, %d local copy props, ",
  	       local_const_prop_count, local_copy_prop_count);
!       fprintf (dump_file, "%d global const props, %d global copy props\n\n",
  	       global_const_prop_count, global_copy_prop_count);
      }
    /* Global analysis may get into infinite loops for unreachable blocks.  */
*************** bypass_block (basic_block bb, rtx setcc,
*** 3651,3663 ****
  		    insert_insn_on_edge (copy_insn (pat), e);
  		}
  
! 	      if (gcse_file != NULL)
  		{
! 		  fprintf (gcse_file, "JUMP-BYPASS: Proved reg %d "
  				      "in jump_insn %d equals constant ",
  			   regno, INSN_UID (jump));
! 		  print_rtl (gcse_file, SET_SRC (set->expr));
! 		  fprintf (gcse_file, "\nBypass edge from %d->%d to %d\n",
  			   e->src->index, old_dest->index, dest->index);
  		}
  	      change = 1;
--- 3637,3649 ----
  		    insert_insn_on_edge (copy_insn (pat), e);
  		}
  
! 	      if (dump_file != NULL)
  		{
! 		  fprintf (dump_file, "JUMP-BYPASS: Proved reg %d "
  				      "in jump_insn %d equals constant ",
  			   regno, INSN_UID (jump));
! 		  print_rtl (dump_file, SET_SRC (set->expr));
! 		  fprintf (dump_file, "\nBypass edge from %d->%d to %d\n",
  			   e->src->index, old_dest->index, dest->index);
  		}
  	      change = 1;
*************** compute_pre_data (void)
*** 3862,3868 ****
        sbitmap_not (ae_kill[bb->index], ae_kill[bb->index]);
      }
  
!   edge_list = pre_edge_lcm (gcse_file, expr_hash_table.n_elems, transp, comp, antloc,
  			    ae_kill, &pre_insert_map, &pre_delete_map);
    sbitmap_vector_free (antloc);
    antloc = NULL;
--- 3848,3854 ----
        sbitmap_not (ae_kill[bb->index], ae_kill[bb->index]);
      }
  
!   edge_list = pre_edge_lcm (expr_hash_table.n_elems, transp, comp, antloc,
  			    ae_kill, &pre_insert_map, &pre_delete_map);
    sbitmap_vector_free (antloc);
    antloc = NULL;
*************** insert_insn_end_bb (struct expr *expr, b
*** 4105,4115 ****
  
    gcse_create_count++;
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "PRE/HOIST: end of bb %d, insn %d, ",
  	       bb->index, INSN_UID (new_insn));
!       fprintf (gcse_file, "copying expression %d to reg %d\n",
  	       expr->bitmap_index, regno);
      }
  }
--- 4091,4101 ----
  
    gcse_create_count++;
  
!   if (dump_file)
      {
!       fprintf (dump_file, "PRE/HOIST: end of bb %d, insn %d, ",
  	       bb->index, INSN_UID (new_insn));
!       fprintf (dump_file, "copying expression %d to reg %d\n",
  	       expr->bitmap_index, regno);
      }
  }
*************** pre_edge_insert (struct edge_list *edge_
*** 4174,4185 ****
  			    insert_insn_on_edge (insn, eg);
  			  }
  
! 			if (gcse_file)
  			  {
! 			    fprintf (gcse_file, "PRE/HOIST: edge (%d,%d), ",
  				     bb->index,
  				     INDEX_EDGE_SUCC_BB (edge_list, e)->index);
! 			    fprintf (gcse_file, "copy expression %d\n",
  				     expr->bitmap_index);
  			  }
  
--- 4160,4171 ----
  			    insert_insn_on_edge (insn, eg);
  			  }
  
! 			if (dump_file)
  			  {
! 			    fprintf (dump_file, "PRE/HOIST: edge (%d,%d), ",
  				     bb->index,
  				     INDEX_EDGE_SUCC_BB (edge_list, e)->index);
! 			    fprintf (dump_file, "copy expression %d\n",
  				     expr->bitmap_index);
  			  }
  
*************** pre_insert_copy_insn (struct expr *expr,
*** 4300,4307 ****
  
    gcse_create_count++;
  
!   if (gcse_file)
!     fprintf (gcse_file,
  	     "PRE: bb %d, insn %d, copy expression %d in insn %d to reg %d\n",
  	      BLOCK_NUM (insn), INSN_UID (new_insn), indx,
  	      INSN_UID (insn), regno);
--- 4286,4293 ----
  
    gcse_create_count++;
  
!   if (dump_file)
!     fprintf (dump_file,
  	     "PRE: bb %d, insn %d, copy expression %d in insn %d to reg %d\n",
  	      BLOCK_NUM (insn), INSN_UID (new_insn), indx,
  	      INSN_UID (insn), regno);
*************** pre_delete (void)
*** 4453,4464 ****
  		changed = 1;
  		gcse_subst_count++;
  
! 		if (gcse_file)
  		  {
! 		    fprintf (gcse_file,
  			     "PRE: redundant insn %d (expression %d) in ",
  			       INSN_UID (insn), indx);
! 		    fprintf (gcse_file, "bb %d, reaching reg is %d\n",
  			     bb->index, REGNO (expr->reaching_reg));
  		  }
  	      }
--- 4439,4450 ----
  		changed = 1;
  		gcse_subst_count++;
  
! 		if (dump_file)
  		  {
! 		    fprintf (dump_file,
  			     "PRE: redundant insn %d (expression %d) in ",
  			       INSN_UID (insn), indx);
! 		    fprintf (dump_file, "bb %d, reaching reg is %d\n",
  			     bb->index, REGNO (expr->reaching_reg));
  		  }
  	      }
*************** one_pre_gcse_pass (int pass)
*** 4550,4557 ****
  
    compute_hash_table (&expr_hash_table);
    trim_ld_motion_mems ();
!   if (gcse_file)
!     dump_hash_table (gcse_file, "Expression", &expr_hash_table);
  
    if (expr_hash_table.n_elems > 0)
      {
--- 4536,4543 ----
  
    compute_hash_table (&expr_hash_table);
    trim_ld_motion_mems ();
!   if (dump_file)
!     dump_hash_table (dump_file, "Expression", &expr_hash_table);
  
    if (expr_hash_table.n_elems > 0)
      {
*************** one_pre_gcse_pass (int pass)
*** 4566,4576 ****
    remove_fake_exit_edges ();
    free_hash_table (&expr_hash_table);
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ",
  	       current_function_name (), pass, bytes_used);
!       fprintf (gcse_file, "%d substs, %d insns created\n",
  	       gcse_subst_count, gcse_create_count);
      }
  
--- 4552,4562 ----
    remove_fake_exit_edges ();
    free_hash_table (&expr_hash_table);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "\nPRE GCSE of %s, pass %d: %d bytes needed, ",
  	       current_function_name (), pass, bytes_used);
!       fprintf (dump_file, "%d substs, %d insns created\n",
  	       gcse_subst_count, gcse_create_count);
      }
  
*************** compute_code_hoist_vbeinout (void)
*** 4749,4756 ****
        passes++;
      }
  
!   if (gcse_file)
!     fprintf (gcse_file, "hoisting vbeinout computation: %d passes\n", passes);
  }
  
  /* Top level routine to do the dataflow analysis needed by code hoisting.  */
--- 4735,4742 ----
        passes++;
      }
  
!   if (dump_file)
!     fprintf (dump_file, "hoisting vbeinout computation: %d passes\n", passes);
  }
  
  /* Top level routine to do the dataflow analysis needed by code hoisting.  */
*************** compute_code_hoist_data (void)
*** 4762,4769 ****
    compute_transpout ();
    compute_code_hoist_vbeinout ();
    calculate_dominance_info (CDI_DOMINATORS);
!   if (gcse_file)
!     fprintf (gcse_file, "\n");
  }
  
  /* Determine if the expression identified by EXPR_INDEX would
--- 4748,4755 ----
    compute_transpout ();
    compute_code_hoist_vbeinout ();
    calculate_dominance_info (CDI_DOMINATORS);
!   if (dump_file)
!     fprintf (dump_file, "\n");
  }
  
  /* Determine if the expression identified by EXPR_INDEX would
*************** one_code_hoisting_pass (void)
*** 4995,5002 ****
  
    alloc_hash_table (max_cuid, &expr_hash_table, 0);
    compute_hash_table (&expr_hash_table);
!   if (gcse_file)
!     dump_hash_table (gcse_file, "Code Hosting Expressions", &expr_hash_table);
  
    if (expr_hash_table.n_elems > 0)
      {
--- 4981,4988 ----
  
    alloc_hash_table (max_cuid, &expr_hash_table, 0);
    compute_hash_table (&expr_hash_table);
!   if (dump_file)
!     dump_hash_table (dump_file, "Code Hosting Expressions", &expr_hash_table);
  
    if (expr_hash_table.n_elems > 0)
      {
*************** trim_ld_motion_mems (void)
*** 5389,5396 ****
      }
  
    /* Show the world what we've found.  */
!   if (gcse_file && pre_ldst_mems != NULL)
!     print_ldst_list (gcse_file);
  }
  
  /* This routine will take an expression which we are replacing with
--- 5375,5382 ----
      }
  
    /* Show the world what we've found.  */
!   if (dump_file && pre_ldst_mems != NULL)
!     print_ldst_list (dump_file);
  }
  
  /* This routine will take an expression which we are replacing with
*************** update_ld_motion_stores (struct expr * e
*** 5429,5441 ****
  	  if (expr->reaching_reg == src)
  	    continue;
  
! 	  if (gcse_file)
  	    {
! 	      fprintf (gcse_file, "PRE:  store updated with reaching reg ");
! 	      print_rtl (gcse_file, expr->reaching_reg);
! 	      fprintf (gcse_file, ":\n	");
! 	      print_inline_rtx (gcse_file, insn, 8);
! 	      fprintf (gcse_file, "\n");
  	    }
  
  	  copy = gen_move_insn ( reg, copy_rtx (SET_SRC (pat)));
--- 5415,5427 ----
  	  if (expr->reaching_reg == src)
  	    continue;
  
! 	  if (dump_file)
  	    {
! 	      fprintf (dump_file, "PRE:  store updated with reaching reg ");
! 	      print_rtl (dump_file, expr->reaching_reg);
! 	      fprintf (dump_file, ":\n	");
! 	      print_inline_rtx (dump_file, insn, 8);
! 	      fprintf (dump_file, "\n");
  	    }
  
  	  copy = gen_move_insn ( reg, copy_rtx (SET_SRC (pat)));
*************** compute_store_table (void)
*** 5848,5857 ****
  
    ret = enumerate_ldsts ();
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "ST_avail and ST_antic (shown under loads..)\n");
!       print_ldst_list (gcse_file);
      }
  
    free (last_set_in);
--- 5834,5843 ----
  
    ret = enumerate_ldsts ();
  
!   if (dump_file)
      {
!       fprintf (dump_file, "ST_avail and ST_antic (shown under loads..)\n");
!       print_ldst_list (dump_file);
      }
  
    free (last_set_in);
*************** build_store_vectors (void)
*** 6073,6080 ****
  	  if (TEST_BIT (ae_gen[bb->index], ptr->index))
  	    {
  	      rtx r = gen_reg_rtx (GET_MODE (ptr->pattern));
! 	      if (gcse_file)
! 		fprintf (gcse_file, "Removing redundant store:\n");
  	      replace_store_insn (r, XEXP (st, 0), bb, ptr);
  	      continue;
  	    }
--- 6059,6066 ----
  	  if (TEST_BIT (ae_gen[bb->index], ptr->index))
  	    {
  	      rtx r = gen_reg_rtx (GET_MODE (ptr->pattern));
! 	      if (dump_file)
! 		fprintf (dump_file, "Removing redundant store:\n");
  	      replace_store_insn (r, XEXP (st, 0), bb, ptr);
  	      continue;
  	    }
*************** build_store_vectors (void)
*** 6119,6130 ****
  
    free (regs_set_in_block);
  
!   if (gcse_file)
      {
!       dump_sbitmap_vector (gcse_file, "st_antloc", "", st_antloc, last_basic_block);
!       dump_sbitmap_vector (gcse_file, "st_kill", "", ae_kill, last_basic_block);
!       dump_sbitmap_vector (gcse_file, "Transpt", "", transp, last_basic_block);
!       dump_sbitmap_vector (gcse_file, "st_avloc", "", ae_gen, last_basic_block);
      }
  }
  
--- 6105,6116 ----
  
    free (regs_set_in_block);
  
!   if (dump_file)
      {
!       dump_sbitmap_vector (dump_file, "st_antloc", "", st_antloc, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_kill", "", ae_kill, last_basic_block);
!       dump_sbitmap_vector (dump_file, "Transpt", "", transp, last_basic_block);
!       dump_sbitmap_vector (dump_file, "st_avloc", "", ae_gen, last_basic_block);
      }
  }
  
*************** insert_insn_start_bb (rtx insn, basic_bl
*** 6151,6162 ****
  
    insn = emit_insn_after_noloc (insn, prev);
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "STORE_MOTION  insert store at start of BB %d:\n",
  	       bb->index);
!       print_inline_rtx (gcse_file, insn, 6);
!       fprintf (gcse_file, "\n");
      }
  }
  
--- 6137,6148 ----
  
    insn = emit_insn_after_noloc (insn, prev);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "STORE_MOTION  insert store at start of BB %d:\n",
  	       bb->index);
!       print_inline_rtx (dump_file, insn, 6);
!       fprintf (dump_file, "\n");
      }
  }
  
*************** insert_store (struct ls_expr * expr, edg
*** 6216,6227 ****
  
    insert_insn_on_edge (insn, e);
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "STORE_MOTION  insert insn on edge (%d, %d):\n",
  	       e->src->index, e->dest->index);
!       print_inline_rtx (gcse_file, insn, 6);
!       fprintf (gcse_file, "\n");
      }
  
    return 1;
--- 6202,6213 ----
  
    insert_insn_on_edge (insn, e);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "STORE_MOTION  insert insn on edge (%d, %d):\n",
  	       e->src->index, e->dest->index);
!       print_inline_rtx (dump_file, insn, 6);
!       fprintf (dump_file, "\n");
      }
  
    return 1;
*************** remove_reachable_equiv_notes (basic_bloc
*** 6291,6298 ****
  	    if (!note || !expr_equiv_p (XEXP (note, 0), mem))
  	      continue;
  
! 	    if (gcse_file)
! 	      fprintf (gcse_file, "STORE_MOTION  drop REG_EQUAL note at insn %d:\n",
  		       INSN_UID (insn));
  	    remove_note (insn, note);
  	  }
--- 6277,6284 ----
  	    if (!note || !expr_equiv_p (XEXP (note, 0), mem))
  	      continue;
  
! 	    if (dump_file)
! 	      fprintf (dump_file, "STORE_MOTION  drop REG_EQUAL note at insn %d:\n",
  		       INSN_UID (insn));
  	    remove_note (insn, note);
  	  }
*************** replace_store_insn (rtx reg, rtx del, ba
*** 6322,6335 ****
    insn = gen_move_insn (reg, SET_SRC (single_set (del)));
    insn = emit_insn_after (insn, del);
  
!   if (gcse_file)
      {
!       fprintf (gcse_file,
  	       "STORE_MOTION  delete insn in BB %d:\n      ", bb->index);
!       print_inline_rtx (gcse_file, del, 6);
!       fprintf (gcse_file, "\nSTORE MOTION  replaced with insn:\n      ");
!       print_inline_rtx (gcse_file, insn, 6);
!       fprintf (gcse_file, "\n");
      }
  
    for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1))
--- 6308,6321 ----
    insn = gen_move_insn (reg, SET_SRC (single_set (del)));
    insn = emit_insn_after (insn, del);
  
!   if (dump_file)
      {
!       fprintf (dump_file,
  	       "STORE_MOTION  delete insn in BB %d:\n      ", bb->index);
!       print_inline_rtx (dump_file, del, 6);
!       fprintf (dump_file, "\nSTORE MOTION  replaced with insn:\n      ");
!       print_inline_rtx (dump_file, insn, 6);
!       fprintf (dump_file, "\n");
      }
  
    for (ptr = ANTIC_STORE_LIST (smexpr); ptr; ptr = XEXP (ptr, 1))
*************** replace_store_insn (rtx reg, rtx del, ba
*** 6375,6382 ****
  	if (!note || !expr_equiv_p (XEXP (note, 0), mem))
  	  continue;
  
! 	if (gcse_file)
! 	  fprintf (gcse_file, "STORE_MOTION  drop REG_EQUAL note at insn %d:\n",
  		   INSN_UID (insn));
  	remove_note (insn, note);
        }
--- 6361,6368 ----
  	if (!note || !expr_equiv_p (XEXP (note, 0), mem))
  	  continue;
  
! 	if (dump_file)
! 	  fprintf (dump_file, "STORE_MOTION  drop REG_EQUAL note at insn %d:\n",
  		   INSN_UID (insn));
  	remove_note (insn, note);
        }
*************** store_motion (void)
*** 6447,6456 ****
    struct ls_expr * ptr;
    int update_flow = 0;
  
!   if (gcse_file)
      {
!       fprintf (gcse_file, "before store motion\n");
!       print_rtl (gcse_file, get_insns ());
      }
  
    init_alias_analysis ();
--- 6433,6442 ----
    struct ls_expr * ptr;
    int update_flow = 0;
  
!   if (dump_file)
      {
!       fprintf (dump_file, "before store motion\n");
!       print_rtl (dump_file, get_insns ());
      }
  
    init_alias_analysis ();
*************** store_motion (void)
*** 6471,6477 ****
    add_noreturn_fake_exit_edges ();
    connect_infinite_loops_to_exit ();
  
!   edge_list = pre_edge_rev_lcm (gcse_file, num_stores, transp, ae_gen,
  				st_antloc, ae_kill, &pre_insert_map,
  				&pre_delete_map);
  
--- 6457,6463 ----
    add_noreturn_fake_exit_edges ();
    connect_infinite_loops_to_exit ();
  
!   edge_list = pre_edge_rev_lcm (num_stores, transp, ae_gen,
  				st_antloc, ae_kill, &pre_insert_map,
  				&pre_delete_map);
  
*************** store_motion (void)
*** 6487,6494 ****
  
        if (x >= 0)
  	{
! 	  if (gcse_file != NULL)
! 	    fprintf (gcse_file,
  		     "Can't replace store %d: abnormal edge from %d to %d\n",
  		     ptr->index, INDEX_EDGE (edge_list, x)->src->index,
  		     INDEX_EDGE (edge_list, x)->dest->index);
--- 6473,6480 ----
  
        if (x >= 0)
  	{
! 	  if (dump_file != NULL)
! 	    fprintf (dump_file,
  		     "Can't replace store %d: abnormal edge from %d to %d\n",
  		     ptr->index, INDEX_EDGE (edge_list, x)->src->index,
  		     INDEX_EDGE (edge_list, x)->dest->index);
*************** store_motion (void)
*** 6519,6525 ****
  /* Entry point for jump bypassing optimization pass.  */
  
  static int
! bypass_jumps (FILE *file)
  {
    int changed;
  
--- 6505,6511 ----
  /* Entry point for jump bypassing optimization pass.  */
  
  static int
! bypass_jumps (void)
  {
    int changed;
  
*************** bypass_jumps (FILE *file)
*** 6528,6543 ****
    if (current_function_calls_setjmp)
      return 0;
  
-   /* For calling dump_foo fns from gdb.  */
-   debug_stderr = stderr;
-   gcse_file = file;
- 
    /* Identify the basic block information for this function, including
       successors and predecessors.  */
    max_gcse_regno = max_reg_num ();
  
!   if (file)
!     dump_flow_info (file);
  
    /* Return if there's nothing to do, or it is too expensive.  */
    if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
--- 6514,6525 ----
    if (current_function_calls_setjmp)
      return 0;
  
    /* Identify the basic block information for this function, including
       successors and predecessors.  */
    max_gcse_regno = max_reg_num ();
  
!   if (dump_file)
!     dump_flow_info (dump_file);
  
    /* Return if there's nothing to do, or it is too expensive.  */
    if (n_basic_blocks <= NUM_FIXED_BLOCKS + 1
*************** bypass_jumps (FILE *file)
*** 6567,6577 ****
    changed = one_cprop_pass (MAX_GCSE_PASSES + 2, true, true);
    free_gcse_mem ();
  
!   if (file)
      {
!       fprintf (file, "BYPASS of %s: %d basic blocks, ",
  	       current_function_name (), n_basic_blocks);
!       fprintf (file, "%d bytes\n\n", bytes_used);
      }
  
    obstack_free (&gcse_obstack, NULL);
--- 6549,6559 ----
    changed = one_cprop_pass (MAX_GCSE_PASSES + 2, true, true);
    free_gcse_mem ();
  
!   if (dump_file)
      {
!       fprintf (dump_file, "BYPASS of %s: %d basic blocks, ",
  	       current_function_name (), n_basic_blocks);
!       fprintf (dump_file, "%d bytes\n\n", bytes_used);
      }
  
    obstack_free (&gcse_obstack, NULL);
*************** rest_of_handle_jump_bypass (void)
*** 6637,6643 ****
    cleanup_cfg (CLEANUP_EXPENSIVE);
    reg_scan (get_insns (), max_reg_num ());
  
!   if (bypass_jumps (dump_file))
      {
        rebuild_jump_labels (get_insns ());
        cleanup_cfg (CLEANUP_EXPENSIVE);
--- 6619,6625 ----
    cleanup_cfg (CLEANUP_EXPENSIVE);
    reg_scan (get_insns (), max_reg_num ());
  
!   if (bypass_jumps ())
      {
        rebuild_jump_labels (get_insns ());
        cleanup_cfg (CLEANUP_EXPENSIVE);
*************** rest_of_handle_gcse (void)
*** 6677,6683 ****
    int save_csb, save_cfj;
    int tem2 = 0, tem;
  
!   tem = gcse_main (get_insns (), dump_file);
    rebuild_jump_labels (get_insns ());
    delete_trivially_dead_insns (get_insns (), max_reg_num ());
  
--- 6659,6665 ----
    int save_csb, save_cfj;
    int tem2 = 0, tem;
  
!   tem = gcse_main (get_insns ());
    rebuild_jump_labels (get_insns ());
    delete_trivially_dead_insns (get_insns (), max_reg_num ());
  
*************** rest_of_handle_gcse (void)
*** 6691,6697 ****
      {
        timevar_push (TV_CSE);
        reg_scan (get_insns (), max_reg_num ());
!       tem2 = cse_main (get_insns (), max_reg_num (), dump_file);
        purge_all_dead_edges ();
        delete_trivially_dead_insns (get_insns (), max_reg_num ());
        timevar_pop (TV_CSE);
--- 6673,6679 ----
      {
        timevar_push (TV_CSE);
        reg_scan (get_insns (), max_reg_num ());
!       tem2 = cse_main (get_insns (), max_reg_num ());
        purge_all_dead_edges ();
        delete_trivially_dead_insns (get_insns (), max_reg_num ());
        timevar_pop (TV_CSE);
Index: ipa-type-escape.c
===================================================================
*** ipa-type-escape.c	(revision 110621)
--- ipa-type-escape.c	(working copy)
*************** type_escape_execute (void)
*** 1773,1781 ****
        result = splay_tree_successor (all_canon_types, (splay_tree_key) key);
      }
  
- /*   { */
- /*     FILE * tmp = dump_file; */
- /*     dump_file = stderr; */
    if (dump_file)
      { 
        EXECUTE_IF_SET_IN_BITMAP (global_types_seen, 0, i, bi)
--- 1773,1778 ----
*************** type_escape_execute (void)
*** 1792,1799 ****
  	    fprintf(dump_file, " contained\n");
  	}
      }
- /*   dump_file = tmp; */
- /*   } */
  
    /* Get rid of uid_to_addressof_up_map and its bitmaps.  */
    result = splay_tree_min (uid_to_addressof_up_map);
--- 1789,1794 ----
Index: profile.c
===================================================================
*** profile.c	(revision 110621)
--- profile.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 72,83 ****
  /* Hooks for profiling.  */
  static struct profile_hooks* profile_hooks;
  
- /* File for profiling debug output.  */
- static inline FILE*
- profile_dump_file (void) {
-   return profile_hooks->profile_dump_file ();
- }
- 
  /* Additional information about the edges we need.  */
  struct edge_info {
    unsigned int count_valid : 1;
--- 72,77 ----
*************** branch_prob (void)
*** 1155,1162 ****
        /* Re-merge split basic blocks and the mess introduced by
  	 insert_insn_on_edge.  */
        cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
!       if (profile_dump_file())
! 	dump_flow_info (profile_dump_file());
      }
  
    free_edge_list (el);
--- 1149,1156 ----
        /* Re-merge split basic blocks and the mess introduced by
  	 insert_insn_on_edge.  */
        cleanup_cfg (profile_arc_flag ? CLEANUP_EXPENSIVE : 0);
!       if (dump_file)
! 	dump_flow_info (dump_file);
      }
  
    free_edge_list (el);
Index: ipa.c
===================================================================
*** ipa.c	(revision 110621)
--- ipa.c	(working copy)
*************** cgraph_postorder (struct cgraph_node **o
*** 94,100 ****
     removes unneeded bodies of extern inline functions.  */
  
  bool
! cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
  {
    struct cgraph_node *first = (void *) 1;
    struct cgraph_node *node;
--- 94,100 ----
     removes unneeded bodies of extern inline functions.  */
  
  bool
! cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
  {
    struct cgraph_node *first = (void *) 1;
    struct cgraph_node *node;
*************** cgraph_remove_unreachable_nodes (bool be
*** 104,111 ****
  #ifdef ENABLE_CHECKING
    verify_cgraph ();
  #endif
!   if (dump_file)
!     fprintf (dump_file, "\nReclaiming functions:");
  #ifdef ENABLE_CHECKING
    for (node = cgraph_nodes; node; node = node->next)
      gcc_assert (!node->aux);
--- 104,111 ----
  #ifdef ENABLE_CHECKING
    verify_cgraph ();
  #endif
!   if (file)
!     fprintf (file, "\nReclaiming functions:");
  #ifdef ENABLE_CHECKING
    for (node = cgraph_nodes; node; node = node->next)
      gcc_assert (!node->aux);
*************** cgraph_remove_unreachable_nodes (bool be
*** 163,170 ****
  	    local_insns = node->local.self_insns;
  	  else
  	    local_insns = 0;
! 	  if (dump_file)
! 	    fprintf (dump_file, " %s", cgraph_node_name (node));
  	  if (!node->analyzed || !DECL_EXTERNAL (node->decl)
  	      || before_inlining_p)
  	    cgraph_remove_node (node);
--- 163,170 ----
  	    local_insns = node->local.self_insns;
  	  else
  	    local_insns = 0;
! 	  if (file)
! 	    fprintf (file, " %s", cgraph_node_name (node));
  	  if (!node->analyzed || !DECL_EXTERNAL (node->decl)
  	      || before_inlining_p)
  	    cgraph_remove_node (node);
*************** cgraph_remove_unreachable_nodes (bool be
*** 203,209 ****
      }
    for (node = cgraph_nodes; node; node = node->next)
      node->aux = NULL;
!   if (dump_file)
!     fprintf (dump_file, "\nReclaimed %i insns", insns);
    return changed;
  }
--- 203,209 ----
      }
    for (node = cgraph_nodes; node; node = node->next)
      node->aux = NULL;
!   if (file)
!     fprintf (file, "\nReclaimed %i insns", insns);
    return changed;
  }
Index: rtl-factoring.c
===================================================================
*** rtl-factoring.c	(revision 110621)
--- rtl-factoring.c	(working copy)
*************** rtl_seqabstr (void)
*** 1394,1402 ****
        /* Update notes.  */
        count_or_remove_death_notes (NULL, 1);
  
!       life_analysis (dump_file, PROP_DEATH_NOTES |
!                                 PROP_SCAN_DEAD_CODE |
!                                 PROP_KILL_DEAD_CODE);
  
        /* Extra cleanup.  */
        cleanup_cfg (CLEANUP_EXPENSIVE |
--- 1394,1401 ----
        /* Update notes.  */
        count_or_remove_death_notes (NULL, 1);
  
!       life_analysis (PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE
! 		     | PROP_KILL_DEAD_CODE);
  
        /* Extra cleanup.  */
        cleanup_cfg (CLEANUP_EXPENSIVE |
*************** gate_rtl_seqabstr (void)
*** 1418,1426 ****
  static void
  rest_of_rtl_seqabstr (void)
  {
!   life_analysis (dump_file, PROP_DEATH_NOTES |
!                             PROP_SCAN_DEAD_CODE |
!                             PROP_KILL_DEAD_CODE);
  
    cleanup_cfg (CLEANUP_EXPENSIVE |
                 CLEANUP_UPDATE_LIFE |
--- 1417,1423 ----
  static void
  rest_of_rtl_seqabstr (void)
  {
!   life_analysis (PROP_DEATH_NOTES | PROP_SCAN_DEAD_CODE | PROP_KILL_DEAD_CODE);
  
    cleanup_cfg (CLEANUP_EXPENSIVE |
                 CLEANUP_UPDATE_LIFE |
Index: bt-load.c
===================================================================
*** bt-load.c	(revision 110621)
--- bt-load.c	(working copy)
*************** branch_target_load_optimize (bool after_
*** 1467,1473 ****
        cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
  #endif
  
!       life_analysis (NULL, 0);
  
        /* Dominator info is also needed for migrate_btr_def.  */
        calculate_dominance_info (CDI_DOMINATORS);
--- 1467,1473 ----
        cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
  #endif
  
!       life_analysis (0);
  
        /* Dominator info is also needed for migrate_btr_def.  */
        calculate_dominance_info (CDI_DOMINATORS);
Index: emit-rtl.c
===================================================================
*** emit-rtl.c	(revision 110621)
--- emit-rtl.c	(working copy)
*************** get_max_uid (void)
*** 2811,2817 ****
  /* Renumber instructions so that no instruction UIDs are wasted.  */
  
  void
! renumber_insns (FILE *stream)
  {
    rtx insn;
  
--- 2811,2817 ----
  /* Renumber instructions so that no instruction UIDs are wasted.  */
  
  void
! renumber_insns (void)
  {
    rtx insn;
  
*************** renumber_insns (FILE *stream)
*** 2828,2835 ****
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
      {
!       if (stream)
! 	fprintf (stream, "Renumbering insn %d to %d\n",
  		 INSN_UID (insn), cur_insn_uid);
        INSN_UID (insn) = cur_insn_uid++;
      }
--- 2828,2835 ----
  
    for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
      {
!       if (dump_file)
! 	fprintf (dump_file, "Renumbering insn %d to %d\n",
  		 INSN_UID (insn), cur_insn_uid);
        INSN_UID (insn) = cur_insn_uid++;
      }
Index: cfgexpand.c
===================================================================
*** cfgexpand.c	(revision 110621)
--- cfgexpand.c	(working copy)
*************** Boston, MA 02110-1301, USA.  */
*** 46,52 ****
     re-distribute it when the conditional expands into multiple conditionals.
     This is however difficult to do.  */
  static void
! add_reg_br_prob_note (FILE *dump_file, rtx last, int probability)
  {
    if (profile_status == PROFILE_ABSENT)
      return;
--- 46,52 ----
     re-distribute it when the conditional expands into multiple conditionals.
     This is however difficult to do.  */
  static void
! add_reg_br_prob_note (rtx last, int probability)
  {
    if (profile_status == PROFILE_ABSENT)
      return;
*************** expand_gimple_cond_expr (basic_block bb,
*** 1113,1119 ****
    if (TREE_CODE (then_exp) == GOTO_EXPR && IS_EMPTY_STMT (else_exp))
      {
        jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
!       add_reg_br_prob_note (dump_file, last, true_edge->probability);
        maybe_dump_rtl_for_tree_stmt (stmt, last);
        if (EXPR_LOCUS (then_exp))
  	emit_line_note (*(EXPR_LOCUS (then_exp)));
--- 1113,1119 ----
    if (TREE_CODE (then_exp) == GOTO_EXPR && IS_EMPTY_STMT (else_exp))
      {
        jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
!       add_reg_br_prob_note (last, true_edge->probability);
        maybe_dump_rtl_for_tree_stmt (stmt, last);
        if (EXPR_LOCUS (then_exp))
  	emit_line_note (*(EXPR_LOCUS (then_exp)));
*************** expand_gimple_cond_expr (basic_block bb,
*** 1122,1128 ****
    if (TREE_CODE (else_exp) == GOTO_EXPR && IS_EMPTY_STMT (then_exp))
      {
        jumpifnot (pred, label_rtx (GOTO_DESTINATION (else_exp)));
!       add_reg_br_prob_note (dump_file, last, false_edge->probability);
        maybe_dump_rtl_for_tree_stmt (stmt, last);
        if (EXPR_LOCUS (else_exp))
  	emit_line_note (*(EXPR_LOCUS (else_exp)));
--- 1122,1128 ----
    if (TREE_CODE (else_exp) == GOTO_EXPR && IS_EMPTY_STMT (then_exp))
      {
        jumpifnot (pred, label_rtx (GOTO_DESTINATION (else_exp)));
!       add_reg_br_prob_note (last, false_edge->probability);
        maybe_dump_rtl_for_tree_stmt (stmt, last);
        if (EXPR_LOCUS (else_exp))
  	emit_line_note (*(EXPR_LOCUS (else_exp)));
*************** expand_gimple_cond_expr (basic_block bb,
*** 1132,1138 ****
  	      && TREE_CODE (else_exp) == GOTO_EXPR);
  
    jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
!   add_reg_br_prob_note (dump_file, last, true_edge->probability);
    last = get_last_insn ();
    expand_expr (else_exp, const0_rtx, VOIDmode, 0);
  
--- 1132,1138 ----
  	      && TREE_CODE (else_exp) == GOTO_EXPR);
  
    jumpif (pred, label_rtx (GOTO_DESTINATION (then_exp)));
!   add_reg_br_prob_note (last, true_edge->probability);
    last = get_last_insn ();
    expand_expr (else_exp, const0_rtx, VOIDmode, 0);
  
*************** expand_gimple_tailcall (basic_block bb, 
*** 1272,1278 ****
  /* Expand basic block BB from GIMPLE trees to RTL.  */
  
  static basic_block
! expand_gimple_basic_block (basic_block bb, FILE * dump_file)
  {
    block_stmt_iterator bsi = bsi_start (bb);
    tree stmt = NULL;
--- 1272,1278 ----
  /* Expand basic block BB from GIMPLE trees to RTL.  */
  
  static basic_block
! expand_gimple_basic_block (basic_block bb)
  {
    block_stmt_iterator bsi = bsi_start (bb);
    tree stmt = NULL;
*************** tree_expand_cfg (void)
*** 1621,1627 ****
    init_block = construct_init_block ();
  
    FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
!     bb = expand_gimple_basic_block (bb, dump_file);
  
    construct_exit_block ();
  
--- 1621,1627 ----
    init_block = construct_init_block ();
  
    FOR_BB_BETWEEN (bb, init_block->next_bb, EXIT_BLOCK_PTR, next_bb)
!     bb = expand_gimple_basic_block (bb);
  
    construct_exit_block ();
  
Index: tree-ssa-pre.c
===================================================================
*** tree-ssa-pre.c	(revision 110621)
--- tree-ssa-pre.c	(working copy)
*************** init_pre (bool do_fre)
*** 3441,3447 ****
  
    vn_init ();
    if (!do_fre)
!     current_loops = loop_optimizer_init (dump_file, LOOPS_NORMAL);
  
    connect_infinite_loops_to_exit ();
    memset (&pre_stats, 0, sizeof (pre_stats));
--- 3441,3447 ----
  
    vn_init ();
    if (!do_fre)
!     current_loops = loop_optimizer_init (LOOPS_NORMAL);
  
    connect_infinite_loops_to_exit ();
    memset (&pre_stats, 0, sizeof (pre_stats));
*************** fini_pre (bool do_fre)
*** 3556,3562 ****
      }
    if (!do_fre && current_loops)
      {
!       loop_optimizer_finalize (current_loops, dump_file);
        current_loops = NULL;
      }
  }
--- 3556,3562 ----
      }
    if (!do_fre && current_loops)
      {
!       loop_optimizer_finalize (current_loops);
        current_loops = NULL;
      }
  }
Index: cfgcleanup.c
===================================================================
*** cfgcleanup.c	(revision 110621)
--- cfgcleanup.c	(working copy)
*************** rest_of_handle_jump2 (void)
*** 2356,2362 ****
       future passes, allocate arrays whose dimensions involve the
       maximum instruction UID, so if we can reduce the maximum UID
       we'll save big on memory.  */
!   renumber_insns (dump_file);
  }
  
  
--- 2356,2362 ----
       future passes, allocate arrays whose dimensions involve the
       maximum instruction UID, so if we can reduce the maximum UID
       we'll save big on memory.  */
!   renumber_insns ();
  }
  
  
Index: tree-ssa-copy.c
===================================================================
*** tree-ssa-copy.c	(revision 110621)
--- tree-ssa-copy.c	(working copy)
*************** set_copy_of_val (tree dest, tree first, 
*** 479,493 ****
  }
  
  
! /* Dump the copy-of value for variable VAR to DUMP_FILE.  */
  
  static void
! dump_copy_of (FILE *dump_file, tree var)
  {
    tree val;
    sbitmap visited;
  
!   print_generic_expr (dump_file, var, dump_flags);
  
    if (TREE_CODE (var) != SSA_NAME)
      return;
--- 479,493 ----
  }
  
  
! /* Dump the copy-of value for variable VAR to FILE.  */
  
  static void
! dump_copy_of (FILE *file, tree var)
  {
    tree val;
    sbitmap visited;
  
!   print_generic_expr (file, var, dump_flags);
  
    if (TREE_CODE (var) != SSA_NAME)
      return;
*************** dump_copy_of (FILE *dump_file, tree var)
*** 496,512 ****
    sbitmap_zero (visited);
    SET_BIT (visited, SSA_NAME_VERSION (var));
    
!   fprintf (dump_file, " copy-of chain: ");
  
    val = var;
!   print_generic_expr (dump_file, val, 0);
!   fprintf (dump_file, " ");
    while (copy_of[SSA_NAME_VERSION (val)].value)
      {
!       fprintf (dump_file, "-> ");
        val = copy_of[SSA_NAME_VERSION (val)].value;
!       print_generic_expr (dump_file, val, 0);
!       fprintf (dump_file, " ");
        if (TEST_BIT (visited, SSA_NAME_VERSION (val)))
          break;
        SET_BIT (visited, SSA_NAME_VERSION (val));
--- 496,512 ----
    sbitmap_zero (visited);
    SET_BIT (visited, SSA_NAME_VERSION (var));
    
!   fprintf (file, " copy-of chain: ");
  
    val = var;
!   print_generic_expr (file, val, 0);
!   fprintf (file, " ");
    while (copy_of[SSA_NAME_VERSION (val)].value)
      {
!       fprintf (file, "-> ");
        val = copy_of[SSA_NAME_VERSION (val)].value;
!       print_generic_expr (file, val, 0);
!       fprintf (file, " ");
        if (TEST_BIT (visited, SSA_NAME_VERSION (val)))
          break;
        SET_BIT (visited, SSA_NAME_VERSION (val));
*************** dump_copy_of (FILE *dump_file, tree var)
*** 514,524 ****
  
    val = get_copy_of_val (var)->value;
    if (val == NULL_TREE)
!     fprintf (dump_file, "[UNDEFINED]");
    else if (val != var)
!     fprintf (dump_file, "[COPY]");
    else
!     fprintf (dump_file, "[NOT A COPY]");
    
    sbitmap_free (visited);
  }
--- 514,524 ----
  
    val = get_copy_of_val (var)->value;
    if (val == NULL_TREE)
!     fprintf (file, "[UNDEFINED]");
    else if (val != var)
!     fprintf (file, "[COPY]");
    else
!     fprintf (file, "[NOT A COPY]");
    
    sbitmap_free (visited);
  }
Index: regclass.c
===================================================================
*** regclass.c	(revision 110621)
--- regclass.c	(working copy)
*************** init_reg_autoinc (void)
*** 1182,1188 ****
     This pass comes just before local register allocation.  */
  
  void
! regclass (rtx f, int nregs, FILE *dump)
  {
    rtx insn;
    int i;
--- 1182,1188 ----
     This pass comes just before local register allocation.  */
  
  void
! regclass (rtx f, int nregs)
  {
    rtx insn;
    int i;
*************** regclass (rtx f, int nregs, FILE *dump)
*** 1207,1214 ****
      {
        basic_block bb;
  
!       if (dump)
! 	fprintf (dump, "\n\nPass %i\n\n",pass);
        /* Zero out our accumulation of the cost of each class for each reg.  */
  
        memset (costs, 0, nregs * sizeof (struct costs));
--- 1207,1214 ----
      {
        basic_block bb;
  
!       if (dump_file)
! 	fprintf (dump_file, "\n\nPass %i\n\n",pass);
        /* Zero out our accumulation of the cost of each class for each reg.  */
  
        memset (costs, 0, nregs * sizeof (struct costs));
*************** regclass (rtx f, int nregs, FILE *dump)
*** 1250,1259 ****
        if (pass == 0)
  	reg_pref = reg_pref_buffer;
  
!       if (dump)
  	{
! 	  dump_regclass (dump);
! 	  fprintf (dump,"\n");
  	}
        for (i = FIRST_PSEUDO_REGISTER; i < nregs; i++)
  	{
--- 1250,1259 ----
        if (pass == 0)
  	reg_pref = reg_pref_buffer;
  
!       if (dump_file)
  	{
! 	  dump_regclass (dump_file);
! 	  fprintf (dump_file,"\n");
  	}
        for (i = FIRST_PSEUDO_REGISTER; i < nregs; i++)
  	{
*************** regclass (rtx f, int nregs, FILE *dump)
*** 1299,1305 ****
  	     should be provided as a register class.  Don't do this if we
  	     will be doing it again later.  */
  
! 	  if ((pass == 1  || dump) || ! flag_expensive_optimizations)
  	    for (class = 0; class < N_REG_CLASSES; class++)
  	      if (p->cost[class] < p->mem_cost
  		  && (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
--- 1299,1305 ----
  	     should be provided as a register class.  Don't do this if we
  	     will be doing it again later.  */
  
! 	  if ((pass == 1  || dump_file) || ! flag_expensive_optimizations)
  	    for (class = 0; class < N_REG_CLASSES; class++)
  	      if (p->cost[class] < p->mem_cost
  		  && (reg_class_size[(int) reg_class_subunion[(int) alt][class]]
*************** regclass (rtx f, int nregs, FILE *dump)
*** 1318,1334 ****
  	  if (alt == best)
  	    alt = NO_REGS;
  
! 	  if (dump
  	      && (reg_pref[i].prefclass != (int) best
  		  || reg_pref[i].altclass != (int) alt))
  	    {
! 	      fprintf (dump, "  Register %i", i);
  	      if (alt == ALL_REGS || best == ALL_REGS)
! 		fprintf (dump, " pref %s\n", reg_class_names[(int) best]);
  	      else if (alt == NO_REGS)
! 		fprintf (dump, " pref %s or none\n", reg_class_names[(int) best]);
  	      else
! 		fprintf (dump, " pref %s, else %s\n",
  			 reg_class_names[(int) best],
  			 reg_class_names[(int) alt]);
  	    }
--- 1318,1334 ----
  	  if (alt == best)
  	    alt = NO_REGS;
  
! 	  if (dump_file
  	      && (reg_pref[i].prefclass != (int) best
  		  || reg_pref[i].altclass != (int) alt))
  	    {
! 	      fprintf (dump_file, "  Register %i", i);
  	      if (alt == ALL_REGS || best == ALL_REGS)
! 		fprintf (dump_file, " pref %s\n", reg_class_names[(int) best]);
  	      else if (alt == NO_REGS)
! 		fprintf (dump_file, " pref %s or none\n", reg_class_names[(int) best]);
  	      else
! 		fprintf (dump_file, " pref %s, else %s\n",
  			 reg_class_names[(int) best],
  			 reg_class_names[(int) alt]);
  	    }
Index: rtl.h
===================================================================
*** rtl.h	(revision 110621)
--- rtl.h	(working copy)
*************** extern int rtx_to_tree_code (enum rtx_co
*** 1908,1914 ****
  
  /* In cse.c */
  extern int delete_trivially_dead_insns (rtx, int);
! extern int cse_main (rtx, int, FILE *);
  extern int exp_equiv_p (rtx, rtx, int, bool);
  extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
  
--- 1908,1914 ----
  
  /* In cse.c */
  extern int delete_trivially_dead_insns (rtx, int);
! extern int cse_main (rtx, int);
  extern int exp_equiv_p (rtx, rtx, int, bool);
  extern unsigned hash_rtx (rtx x, enum machine_mode, int *, int *, bool);
  
*************** extern void add_insn_after (rtx, rtx);
*** 1974,1980 ****
  extern void remove_insn (rtx);
  extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
  extern rtx emit (rtx);
! extern void renumber_insns (FILE *);
  extern void remove_unnecessary_notes (void);
  extern rtx delete_insn (rtx);
  extern rtx entry_of_function (void);
--- 1974,1980 ----
  extern void remove_insn (rtx);
  extern void emit_insn_after_with_line_notes (rtx, rtx, rtx);
  extern rtx emit (rtx);
! extern void renumber_insns (void);
  extern void remove_unnecessary_notes (void);
  extern rtx delete_insn (rtx);
  extern rtx entry_of_function (void);
*************** extern void dump_insn_slim (FILE *f, rtx
*** 2001,2010 ****
  extern void debug_insn_slim (rtx x);
  
  /* In sched-rgn.c.  */
! extern void schedule_insns (FILE *);
  
  /* In sched-ebb.c.  */
! extern void schedule_ebbs (FILE *);
  
  /* In haifa-sched.c.  */
  extern void fix_sched_param (const char *, const char *);
--- 2001,2010 ----
  extern void debug_insn_slim (rtx x);
  
  /* In sched-rgn.c.  */
! extern void schedule_insns (void);
  
  /* In sched-ebb.c.  */
! extern void schedule_ebbs (void);
  
  /* In haifa-sched.c.  */
  extern void fix_sched_param (const char *, const char *);
*************** extern void init_regs (void);
*** 2077,2083 ****
  extern void init_fake_stack_mems (void);
  extern void init_reg_sets (void);
  extern void regclass_init (void);
! extern void regclass (rtx, int, FILE *);
  extern void reg_scan (rtx, unsigned int);
  extern void reg_scan_update (rtx, rtx, unsigned int);
  extern void fix_register (const char *, int, int);
--- 2077,2083 ----
  extern void init_fake_stack_mems (void);
  extern void init_reg_sets (void);
  extern void regclass_init (void);
! extern void regclass (rtx, int);
  extern void reg_scan (rtx, unsigned int);
  extern void reg_scan_update (rtx, rtx, unsigned int);
  extern void fix_register (const char *, int, int);
*************** extern bool invalid_mode_change_p (unsig
*** 2091,2097 ****
  				   enum machine_mode);
  
  /* In reorg.c */
! extern void dbr_schedule (rtx, FILE *);
  
  /* In local-alloc.c */
  extern void dump_local_alloc (FILE *);
--- 2091,2097 ----
  				   enum machine_mode);
  
  /* In reorg.c */
! extern void dbr_schedule (rtx);
  
  /* In local-alloc.c */
  extern void dump_local_alloc (FILE *);
Index: sched-int.h
===================================================================
*** sched-int.h	(revision 110621)
--- sched-int.h	(working copy)
*************** extern int insn_cost (rtx, rtx, rtx);
*** 359,365 ****
  extern int set_priorities (rtx, rtx);
  
  extern void schedule_block (int, int);
! extern void sched_init (FILE *);
  extern void sched_finish (void);
  
  extern void ready_add (struct ready_list *, rtx);
--- 359,365 ----
  extern int set_priorities (rtx, rtx);
  
  extern void schedule_block (int, int);
! extern void sched_init (void);
  extern void sched_finish (void);
  
  extern void ready_add (struct ready_list *, rtx);
Index: tree-outof-ssa.c
===================================================================
*** tree-outof-ssa.c	(revision 110621)
--- tree-outof-ssa.c	(working copy)
*************** fini_analyze_edges_for_bb (void)
*** 2052,2062 ****
  
  
  /* Look at all the incoming edges to block BB, and decide where the best place
!    to insert the stmts on each edge are, and perform those insertions.   Output
!    any debug information to DEBUG_FILE.  */
  
  static void
! analyze_edges_for_bb (basic_block bb, FILE *debug_file)
  {
    edge e;
    edge_iterator ei;
--- 2052,2061 ----
  
  
  /* Look at all the incoming edges to block BB, and decide where the best place
!    to insert the stmts on each edge are, and perform those insertions.  */
  
  static void
! analyze_edges_for_bb (basic_block bb)
  {
    edge e;
    edge_iterator ei;
*************** analyze_edges_for_bb (basic_block bb, FI
*** 2180,2187 ****
      }
  
  
!   if (debug_file)
!     fprintf (debug_file, "\nOpportunities in BB %d for stmt/block reduction:\n",
  	     bb->index);
  
    
--- 2179,2186 ----
      }
  
  
!   if (dump_file)
!     fprintf (dump_file, "\nOpportunities in BB %d for stmt/block reduction:\n",
  	     bb->index);
  
    
*************** analyze_edges_for_bb (basic_block bb, FI
*** 2207,2225 ****
          new_edge = make_forwarder_block (leader->dest, same_stmt_list_p, 
  					 NULL);
  	bb = new_edge->dest;
! 	if (debug_file)
  	  {
! 	    fprintf (debug_file, "Splitting BB %d for Common stmt list.  ", 
  		     leader->dest->index);
! 	    fprintf (debug_file, "Original block is now BB%d.\n", bb->index);
! 	    print_generic_stmt (debug_file, curr_stmt_list, TDF_VOPS);
  	  }
  
  	FOR_EACH_EDGE (e, ei, new_edge->src->preds)
  	  {
  	    e->aux = NULL;
! 	    if (debug_file)
! 	      fprintf (debug_file, "  Edge (%d->%d) lands here.\n", 
  		       e->src->index, e->dest->index);
  	  }
  
--- 2206,2224 ----
          new_edge = make_forwarder_block (leader->dest, same_stmt_list_p, 
  					 NULL);
  	bb = new_edge->dest;
! 	if (dump_file)
  	  {
! 	    fprintf (dump_file, "Splitting BB %d for Common stmt list.  ", 
  		     leader->dest->index);
! 	    fprintf (dump_file, "Original block is now BB%d.\n", bb->index);
! 	    print_generic_stmt (dump_file, curr_stmt_list, TDF_VOPS);
  	  }
  
  	FOR_EACH_EDGE (e, ei, new_edge->src->preds)
  	  {
  	    e->aux = NULL;
! 	    if (dump_file)
! 	      fprintf (dump_file, "  Edge (%d->%d) lands here.\n", 
  		       e->src->index, e->dest->index);
  	  }
  
*************** analyze_edges_for_bb (basic_block bb, FI
*** 2246,2256 ****
  /* This function will analyze the insertions which were performed on edges,
     and decide whether they should be left on that edge, or whether it is more
     efficient to emit some subset of them in a single block.  All stmts are
!    inserted somewhere, and if non-NULL, debug information is printed via 
!    DUMP_FILE.  */
  
  static void
! perform_edge_inserts (FILE *dump_file)
  {
    basic_block bb;
  
--- 2245,2254 ----
  /* This function will analyze the insertions which were performed on edges,
     and decide whether they should be left on that edge, or whether it is more
     efficient to emit some subset of them in a single block.  All stmts are
!    inserted somewhere.  */
  
  static void
! perform_edge_inserts (void)
  {
    basic_block bb;
  
*************** perform_edge_inserts (FILE *dump_file)
*** 2268,2276 ****
    init_analyze_edges_for_bb ();
  
    FOR_EACH_BB (bb)
!     analyze_edges_for_bb (bb, dump_file);
  
!   analyze_edges_for_bb (EXIT_BLOCK_PTR, dump_file);
  
    /* Free data structures used in analyze_edges_for_bb.   */
    fini_analyze_edges_for_bb ();
--- 2266,2274 ----
    init_analyze_edges_for_bb ();
  
    FOR_EACH_BB (bb)
!     analyze_edges_for_bb (bb);
  
!   analyze_edges_for_bb (EXIT_BLOCK_PTR);
  
    /* Free data structures used in analyze_edges_for_bb.   */
    fini_analyze_edges_for_bb ();
*************** perform_edge_inserts (FILE *dump_file)
*** 2311,2331 ****
  }
  
  
! /* Remove the variables specified in MAP from SSA form.  Any debug information
!    is sent to DUMP.  FLAGS indicate what options should be used.  */
  
  static void
! remove_ssa_form (FILE *dump, var_map map, int flags)
  {
    tree_live_info_p liveinfo;
    basic_block bb;
    tree phi, next;
-   FILE *save;
    tree *values = NULL;
  
-   save = dump_file;
-   dump_file = dump;
- 
    /* If we are not combining temps, don't calculate live ranges for variables
       with only one SSA version.  */
    if ((flags & SSANORM_COMBINE_TEMPS) == 0)
--- 2309,2325 ----
  }
  
  
! /* Remove the variables specified in MAP from SSA form.  FLAGS indicate what
!    options should be used.  */
  
  static void
! remove_ssa_form (var_map map, int flags)
  {
    tree_live_info_p liveinfo;
    basic_block bb;
    tree phi, next;
    tree *values = NULL;
  
    /* If we are not combining temps, don't calculate live ranges for variables
       with only one SSA version.  */
    if ((flags & SSANORM_COMBINE_TEMPS) == 0)
*************** remove_ssa_form (FILE *dump, var_map map
*** 2396,2404 ****
    fini_ssa_operands ();
  
    /* If any copies were inserted on edges, analyze and insert them now.  */
!   perform_edge_inserts (dump_file);
! 
!   dump_file = save;
  }
  
  /* Search every PHI node for arguments associated with backedges which
--- 2390,2396 ----
    fini_ssa_operands ();
  
    /* If any copies were inserted on edges, analyze and insert them now.  */
!   perform_edge_inserts ();
  }
  
  /* Search every PHI node for arguments associated with backedges which
*************** rewrite_out_of_ssa (void)
*** 2527,2533 ****
    if (flag_tree_ter && !flag_mudflap)
      ssa_flags |= SSANORM_PERFORM_TER;
  
!   remove_ssa_form (dump_file, map, ssa_flags);
  
    if (dump_file && (dump_flags & TDF_DETAILS))
      dump_tree_cfg (dump_file, dump_flags & ~TDF_DETAILS);
--- 2519,2525 ----
    if (flag_tree_ter && !flag_mudflap)
      ssa_flags |= SSANORM_PERFORM_TER;
  
!   remove_ssa_form (map, ssa_flags);
  
    if (dump_file && (dump_flags & TDF_DETAILS))
      dump_tree_cfg (dump_file, dump_flags & ~TDF_DETAILS);
Index: tree-profile.c
===================================================================
*** tree-profile.c	(revision 110621)
--- tree-profile.c	(working copy)
*************** do_tree_profiling (void)
*** 234,245 ****
    return false;
  }
  
- /* Return the file on which profile dump output goes, if any.  */
- 
- static FILE *tree_profile_dump_file (void) {
-   return dump_file;
- }
- 
  static void
  tree_profiling (void)
  {
--- 234,239 ----
*************** struct profile_hooks tree_profile_hooks 
*** 306,313 ****
    tree_gen_interval_profiler,   /* gen_interval_profiler */
    tree_gen_pow2_profiler,       /* gen_pow2_profiler */
    tree_gen_one_value_profiler,  /* gen_one_value_profiler */
!   tree_gen_const_delta_profiler,/* gen_const_delta_profiler */
!   tree_profile_dump_file	/* profile_dump_file */
  };
  
  #include "gt-tree-profile.h"
--- 300,306 ----
    tree_gen_interval_profiler,   /* gen_interval_profiler */
    tree_gen_pow2_profiler,       /* gen_pow2_profiler */
    tree_gen_one_value_profiler,  /* gen_one_value_profiler */
!   tree_gen_const_delta_profiler /* gen_const_delta_profiler */
  };
  
  #include "gt-tree-profile.h"
Index: cfgloop.h
===================================================================
*** cfgloop.h	(revision 110621)
--- cfgloop.h	(working copy)
*************** extern unsigned global_cost_for_size (un
*** 437,444 ****
  extern void init_set_costs (void);
  
  /* Loop optimizer initialization.  */
! extern struct loops *loop_optimizer_init (FILE *, unsigned);
! extern void loop_optimizer_finalize (struct loops *, FILE *);
  
  /* Optimization passes.  */
  extern void unswitch_loops (struct loops *);
--- 437,444 ----
  extern void init_set_costs (void);
  
  /* Loop optimizer initialization.  */
! extern struct loops *loop_optimizer_init (unsigned);
! extern void loop_optimizer_finalize (struct loops *);
  
  /* Optimization passes.  */
  extern void unswitch_loops (struct loops *);
Index: c-gimplify.c
===================================================================
*** c-gimplify.c	(revision 110621)
--- c-gimplify.c	(working copy)
*************** Software Foundation, 51 Franklin Street,
*** 77,105 ****
  void
  c_genericize (tree fndecl)
  {
!   FILE *dump_file;
    int local_dump_flags;
    struct cgraph_node *cgn;
  
    /* Dump the C-specific tree IR.  */
!   dump_file = dump_begin (TDI_original, &local_dump_flags);
!   if (dump_file)
      {
!       fprintf (dump_file, "\n;; Function %s",
  	       lang_hooks.decl_printable_name (fndecl, 2));
!       fprintf (dump_file, " (%s)\n",
  	       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)));
!       fprintf (dump_file, ";; enabled by -%s\n", dump_flag_name (TDI_original));
!       fprintf (dump_file, "\n");
  
        if (local_dump_flags & TDF_RAW)
  	dump_node (DECL_SAVED_TREE (fndecl),
! 		   TDF_SLIM | local_dump_flags, dump_file);
        else
! 	print_c_tree (dump_file, DECL_SAVED_TREE (fndecl));
!       fprintf (dump_file, "\n");
  
!       dump_end (TDI_original, dump_file);
      }
  
    /* Go ahead and gimplify for now.  */
--- 77,105 ----
  void
  c_genericize (tree fndecl)
  {
!   FILE *dump_orig;
    int local_dump_flags;
    struct cgraph_node *cgn;
  
    /* Dump the C-specific tree IR.  */
!   dump_orig = dump_begin (TDI_original, &local_dump_flags);
!   if (dump_orig)
      {
!       fprintf (dump_orig, "\n;; Function %s",
  	       lang_hooks.decl_printable_name (fndecl, 2));
!       fprintf (dump_orig, " (%s)\n",
  	       IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (fndecl)));
!       fprintf (dump_orig, ";; enabled by -%s\n", dump_flag_name (TDI_original));
!       fprintf (dump_orig, "\n");
  
        if (local_dump_flags & TDF_RAW)
  	dump_node (DECL_SAVED_TREE (fndecl),
! 		   TDF_SLIM | local_dump_flags, dump_orig);
        else
! 	print_c_tree (dump_orig, DECL_SAVED_TREE (fndecl));
!       fprintf (dump_orig, "\n");
  
!       dump_end (TDI_original, dump_orig);
      }
  
    /* Go ahead and gimplify for now.  */
Index: reg-stack.c
===================================================================
*** reg-stack.c	(revision 110621)
--- reg-stack.c	(working copy)
*************** propagate_stack (edge e)
*** 2624,2630 ****
     should have been defined by now.  */
  
  static bool
! compensate_edge (edge e, FILE *file)
  {
    basic_block source = e->src, target = e->dest;
    stack target_stack = &BLOCK_INFO (target)->stack_in;
--- 2624,2630 ----
     should have been defined by now.  */
  
  static bool
! compensate_edge (edge e)
  {
    basic_block source = e->src, target = e->dest;
    stack target_stack = &BLOCK_INFO (target)->stack_in;
*************** compensate_edge (edge e, FILE *file)
*** 2632,2639 ****
    struct stack_def regstack;
    int reg;
  
!   if (file)
!     fprintf (file, "Edge %d->%d: ", source->index, target->index);
  
    gcc_assert (target_stack->top != -2);
  
--- 2632,2639 ----
    struct stack_def regstack;
    int reg;
  
!   if (dump_file)
!     fprintf (dump_file, "Edge %d->%d: ", source->index, target->index);
  
    gcc_assert (target_stack->top != -2);
  
*************** compensate_edge (edge e, FILE *file)
*** 2646,2661 ****
  
        if (reg == -1)
  	{
! 	  if (file)
! 	    fprintf (file, "no changes needed\n");
  	  return false;
  	}
      }
  
!   if (file)
      {
!       fprintf (file, "correcting stack to ");
!       print_stack (file, target_stack);
      }
  
    /* Abnormal calls may appear to have values live in st(0), but the
--- 2646,2661 ----
  
        if (reg == -1)
  	{
! 	  if (dump_file)
! 	    fprintf (dump_file, "no changes needed\n");
  	  return false;
  	}
      }
  
!   if (dump_file)
      {
!       fprintf (dump_file, "correcting stack to ");
!       print_stack (dump_file, target_stack);
      }
  
    /* Abnormal calls may appear to have values live in st(0), but the
*************** compensate_edge (edge e, FILE *file)
*** 2724,2730 ****
     source block to the stack_in of the destination block.  */
  
  static bool
! compensate_edges (FILE *file)
  {
    bool inserted = false;
    basic_block bb;
--- 2724,2730 ----
     source block to the stack_in of the destination block.  */
  
  static bool
! compensate_edges (void)
  {
    bool inserted = false;
    basic_block bb;
*************** compensate_edges (FILE *file)
*** 2738,2744 ****
          edge_iterator ei;
  
          FOR_EACH_EDGE (e, ei, bb->succs)
! 	  inserted |= compensate_edge (e, file);
        }
    return inserted;
  }
--- 2738,2744 ----
          edge_iterator ei;
  
          FOR_EACH_EDGE (e, ei, bb->succs)
! 	  inserted |= compensate_edge (e);
        }
    return inserted;
  }
*************** better_edge (edge e1, edge e2)
*** 2777,2783 ****
  /* Convert stack register references in one block.  */
  
  static void
! convert_regs_1 (FILE *file, basic_block block)
  {
    struct stack_def regstack;
    block_info bi = BLOCK_INFO (block);
--- 2777,2783 ----
  /* Convert stack register references in one block.  */
  
  static void
! convert_regs_1 (basic_block block)
  {
    struct stack_def regstack;
    block_info bi = BLOCK_INFO (block);
*************** convert_regs_1 (FILE *file, basic_block 
*** 2811,2820 ****
  	}
      }
  
!   if (file)
      {
!       fprintf (file, "\nBasic block %d\nInput stack: ", block->index);
!       print_stack (file, &bi->stack_in);
      }
  
    /* Process all insns in this block.  Keep track of NEXT so that we
--- 2811,2820 ----
  	}
      }
  
!   if (dump_file)
      {
!       fprintf (dump_file, "\nBasic block %d\nInput stack: ", block->index);
!       print_stack (dump_file, &bi->stack_in);
      }
  
    /* Process all insns in this block.  Keep track of NEXT so that we
*************** convert_regs_1 (FILE *file, basic_block 
*** 2839,2849 ****
        if (stack_regs_mentioned (insn)
  	  || CALL_P (insn))
  	{
! 	  if (file)
  	    {
! 	      fprintf (file, "  insn %d input stack: ",
  		       INSN_UID (insn));
! 	      print_stack (file, &regstack);
  	    }
  	  control_flow_insn_deleted |= subst_stack_regs (insn, &regstack);
  	  starting_stack_p = false;
--- 2839,2849 ----
        if (stack_regs_mentioned (insn)
  	  || CALL_P (insn))
  	{
! 	  if (dump_file)
  	    {
! 	      fprintf (dump_file, "  insn %d input stack: ",
  		       INSN_UID (insn));
! 	      print_stack (dump_file, &regstack);
  	    }
  	  control_flow_insn_deleted |= subst_stack_regs (insn, &regstack);
  	  starting_stack_p = false;
*************** convert_regs_1 (FILE *file, basic_block 
*** 2851,2864 ****
      }
    while (next);
  
!   if (file)
      {
!       fprintf (file, "Expected live registers [");
        for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; ++reg)
  	if (TEST_HARD_REG_BIT (bi->out_reg_set, reg))
! 	  fprintf (file, " %d", reg);
!       fprintf (file, " ]\nOutput stack: ");
!       print_stack (file, &regstack);
      }
  
    insn = BB_END (block);
--- 2851,2864 ----
      }
    while (next);
  
!   if (dump_file)
      {
!       fprintf (dump_file, "Expected live registers [");
        for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; ++reg)
  	if (TEST_HARD_REG_BIT (bi->out_reg_set, reg))
! 	  fprintf (dump_file, " %d", reg);
!       fprintf (dump_file, " ]\nOutput stack: ");
!       print_stack (dump_file, &regstack);
      }
  
    insn = BB_END (block);
*************** convert_regs_1 (FILE *file, basic_block 
*** 2876,2883 ****
  	{
  	  rtx set;
  
! 	  if (file)
! 	    fprintf (file, "Emitting insn initializing reg %d\n", reg);
  
  	  set = gen_rtx_SET (VOIDmode, FP_MODE_REG (reg, SFmode), not_a_num);
  	  insn = emit_insn_after (set, insn);
--- 2876,2883 ----
  	{
  	  rtx set;
  
! 	  if (dump_file)
! 	    fprintf (dump_file, "Emitting insn initializing reg %d\n", reg);
  
  	  set = gen_rtx_SET (VOIDmode, FP_MODE_REG (reg, SFmode), not_a_num);
  	  insn = emit_insn_after (set, insn);
*************** convert_regs_1 (FILE *file, basic_block 
*** 2918,2924 ****
  /* Convert registers in all blocks reachable from BLOCK.  */
  
  static void
! convert_regs_2 (FILE *file, basic_block block)
  {
    basic_block *stack, *sp;
  
--- 2918,2924 ----
  /* Convert registers in all blocks reachable from BLOCK.  */
  
  static void
! convert_regs_2 (basic_block block)
  {
    basic_block *stack, *sp;
  
*************** convert_regs_2 (FILE *file, basic_block 
*** 2959,2965 ****
  	      *sp++ = e->dest;
  	  }
  
!       convert_regs_1 (file, block);
      }
    while (sp != stack);
  
--- 2959,2965 ----
  	      *sp++ = e->dest;
  	  }
  
!       convert_regs_1 (block);
      }
    while (sp != stack);
  
*************** convert_regs_2 (FILE *file, basic_block 
*** 2971,2977 ****
     to the stack-like registers the 387 uses.  */
  
  static void
! convert_regs (FILE *file)
  {
    int inserted;
    basic_block b;
--- 2971,2977 ----
     to the stack-like registers the 387 uses.  */
  
  static void
! convert_regs (void)
  {
    int inserted;
    basic_block b;
*************** convert_regs (FILE *file)
*** 2991,2997 ****
  
    /* Process all blocks reachable from all entry points.  */
    FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
!     convert_regs_2 (file, e->dest);
  
    /* ??? Process all unreachable blocks.  Though there's no excuse
       for keeping these even when not optimizing.  */
--- 2991,2997 ----
  
    /* Process all blocks reachable from all entry points.  */
    FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
!     convert_regs_2 (e->dest);
  
    /* ??? Process all unreachable blocks.  Though there's no excuse
       for keeping these even when not optimizing.  */
*************** convert_regs (FILE *file)
*** 3000,3009 ****
        block_info bi = BLOCK_INFO (b);
  
        if (! bi->done)
! 	convert_regs_2 (file, b);
      }
  
!   inserted |= compensate_edges (file);
  
    clear_aux_for_blocks ();
  
--- 3000,3009 ----
        block_info bi = BLOCK_INFO (b);
  
        if (! bi->done)
! 	convert_regs_2 (b);
      }
  
!   inserted |= compensate_edges ();
  
    clear_aux_for_blocks ();
  
*************** convert_regs (FILE *file)
*** 3011,3018 ****
    if (inserted)
      commit_edge_insertions ();
  
!   if (file)
!     fputc ('\n', file);
  }
  
  /* Convert register usage from "flat" register file usage to a "stack
--- 3011,3018 ----
    if (inserted)
      commit_edge_insertions ();
  
!   if (dump_file)
!     fputc ('\n', dump_file);
  }
  
  /* Convert register usage from "flat" register file usage to a "stack
*************** convert_regs (FILE *file)
*** 3024,3030 ****
     the edges.  */
  
  static bool
! reg_to_stack (FILE *file)
  {
    basic_block bb;
    int i;
--- 3024,3030 ----
     the edges.  */
  
  static bool
! reg_to_stack (void)
  {
    basic_block bb;
    int i;
*************** reg_to_stack (FILE *file)
*** 3050,3056 ****
  	  && flag_schedule_insns_after_reload))
      {
        count_or_remove_death_notes (NULL, 1);
!       life_analysis (file, PROP_DEATH_NOTES);
      }
    mark_dfs_back_edges ();
  
--- 3050,3056 ----
  	  && flag_schedule_insns_after_reload))
      {
        count_or_remove_death_notes (NULL, 1);
!       life_analysis (PROP_DEATH_NOTES);
      }
    mark_dfs_back_edges ();
  
*************** reg_to_stack (FILE *file)
*** 3117,3123 ****
    VARRAY_CHAR_INIT (stack_regs_mentioned_data, max_uid + 1,
  		    "stack_regs_mentioned cache");
  
!   convert_regs (file);
  
    free_aux_for_blocks ();
    return true;
--- 3117,3123 ----
    VARRAY_CHAR_INIT (stack_regs_mentioned_data, max_uid + 1,
  		    "stack_regs_mentioned cache");
  
!   convert_regs ();
  
    free_aux_for_blocks ();
    return true;
*************** static void
*** 3140,3146 ****
  rest_of_handle_stack_regs (void)
  {
  #ifdef STACK_REGS
!   if (reg_to_stack (dump_file) && optimize)
      {
        if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
                         | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
--- 3140,3146 ----
  rest_of_handle_stack_regs (void)
  {
  #ifdef STACK_REGS
!   if (reg_to_stack () && optimize)
      {
        if (cleanup_cfg (CLEANUP_EXPENSIVE | CLEANUP_POST_REGSTACK
                         | (flag_crossjumping ? CLEANUP_CROSSJUMP : 0))
Index: Makefile.in
===================================================================
*** Makefile.in	(revision 110621)
--- Makefile.in	(working copy)
*************** modulo-sched.o : modulo-sched.c $(DDG_H)
*** 2505,2511 ****
     cfghooks.h $(DF_H) $(GCOV_IO_H) hard-reg-set.h $(TM_H) timevar.h tree-pass.h
  haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
!    $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H)
  sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h \
--- 2505,2511 ----
     cfghooks.h $(DF_H) $(GCOV_IO_H) hard-reg-set.h $(TM_H) timevar.h tree-pass.h
  haifa-sched.o : haifa-sched.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(RTL_H) \
     $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h $(FUNCTION_H) \
!    $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) $(TARGET_H) output.h
  sched-deps.o : sched-deps.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h cselib.h \
*************** sched-rgn.o : sched-rgn.c $(CONFIG_H) $(
*** 2517,2523 ****
  sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) \
!    $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H)
  sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
     $(TM_P_H) real.h toplev.h tree-pass.h
--- 2517,2523 ----
  sched-ebb.o : sched-ebb.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) $(REGS_H) hard-reg-set.h $(FLAGS_H) insn-config.h \
     $(FUNCTION_H) $(INSN_ATTR_H) toplev.h $(RECOG_H) except.h $(TM_P_H) \
!    $(PARAMS_H) $(CFGLAYOUT_H) $(TARGET_H) output.h
  sched-vis.o : sched-vis.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
     $(RTL_H) $(SCHED_INT_H) hard-reg-set.h $(BASIC_BLOCK_H) $(OBSTACK_H) \
     $(TM_P_H) real.h toplev.h tree-pass.h
Index: sched-rgn.c
===================================================================
*** sched-rgn.c	(revision 110621)
--- sched-rgn.c	(working copy)
*************** init_regions (void)
*** 2511,2521 ****
      count_or_remove_death_notes (NULL, 1);
  }
  
! /* The one entry point in this file.  DUMP_FILE is the dump file for
!    this pass.  */
  
  void
! schedule_insns (FILE *dump_file)
  {
    sbitmap large_region_blocks, blocks;
    int rgn;
--- 2511,2520 ----
      count_or_remove_death_notes (NULL, 1);
  }
  
! /* The one entry point in this file.  */
  
  void
! schedule_insns (void)
  {
    sbitmap large_region_blocks, blocks;
    int rgn;
*************** schedule_insns (FILE *dump_file)
*** 2529,2535 ****
  
    nr_inter = 0;
    nr_spec = 0;
!   sched_init (dump_file);
  
    init_regions ();
  
--- 2528,2534 ----
  
    nr_inter = 0;
    nr_spec = 0;
!   sched_init ();
  
    init_regions ();
  
*************** rest_of_handle_sched (void)
*** 2656,2662 ****
    /* Do control and data sched analysis,
       and write some of the results to dump file.  */
  
!   schedule_insns (dump_file);
  #endif
  }
  
--- 2655,2661 ----
    /* Do control and data sched analysis,
       and write some of the results to dump file.  */
  
!   schedule_insns ();
  #endif
  }
  
*************** rest_of_handle_sched2 (void)
*** 2682,2695 ****
  
    if (flag_sched2_use_superblocks || flag_sched2_use_traces)
      {
!       schedule_ebbs (dump_file);
        /* No liveness updating code yet, but it should be easy to do.
           reg-stack recomputes the liveness when needed for now.  */
        count_or_remove_death_notes (NULL, 1);
        cleanup_cfg (CLEANUP_EXPENSIVE);
      }
    else
!     schedule_insns (dump_file);
  #endif
  }
  
--- 2681,2694 ----
  
    if (flag_sched2_use_superblocks || flag_sched2_use_traces)
      {
!       schedule_ebbs ();
        /* No liveness updating code yet, but it should be easy to do.
           reg-stack recomputes the liveness when needed for now.  */
        count_or_remove_death_notes (NULL, 1);
        cleanup_cfg (CLEANUP_EXPENSIVE);
      }
    else
!     schedule_insns ();
  #endif
  }
  
Index: basic-block.h
===================================================================
*** basic-block.h	(revision 110621)
--- basic-block.h	(working copy)
*************** enum update_life_extent
*** 852,858 ****
  					     to match only full blocks  */
  #define STRUCT_EQUIV_MATCH_JUMPS 8192	/* Also include the jumps at the end of the block in the comparison.  */
  
! extern void life_analysis (FILE *, int);
  extern int update_life_info (sbitmap, enum update_life_extent, int);
  extern int update_life_info_in_dirty_blocks (enum update_life_extent, int);
  extern int count_or_remove_death_notes (sbitmap, int);
--- 852,858 ----
  					     to match only full blocks  */
  #define STRUCT_EQUIV_MATCH_JUMPS 8192	/* Also include the jumps at the end of the block in the comparison.  */
  
! extern void life_analysis (int);
  extern int update_life_info (sbitmap, enum update_life_extent, int);
  extern int update_life_info_in_dirty_blocks (enum update_life_extent, int);
  extern int count_or_remove_death_notes (sbitmap, int);
*************** extern struct propagate_block_info *init
*** 865,874 ****
  extern void free_propagate_block_info (struct propagate_block_info *);
  
  /* In lcm.c */
! extern struct edge_list *pre_edge_lcm (FILE *, int, sbitmap *, sbitmap *,
  				       sbitmap *, sbitmap *, sbitmap **,
  				       sbitmap **);
! extern struct edge_list *pre_edge_rev_lcm (FILE *, int, sbitmap *,
  					   sbitmap *, sbitmap *,
  					   sbitmap *, sbitmap **,
  					   sbitmap **);
--- 865,874 ----
  extern void free_propagate_block_info (struct propagate_block_info *);
  
  /* In lcm.c */
! extern struct edge_list *pre_edge_lcm (int, sbitmap *, sbitmap *,
  				       sbitmap *, sbitmap *, sbitmap **,
  				       sbitmap **);
! extern struct edge_list *pre_edge_rev_lcm (int, sbitmap *,
  					   sbitmap *, sbitmap *,
  					   sbitmap *, sbitmap **,
  					   sbitmap **);
Index: tree-cfg.c
===================================================================
*** tree-cfg.c	(revision 110621)
--- tree-cfg.c	(working copy)
*************** build_tree_cfg (tree *tp)
*** 207,217 ****
    /* Write the flowgraph to a VCG file.  */
    {
      int local_dump_flags;
!     FILE *dump_file = dump_begin (TDI_vcg, &local_dump_flags);
!     if (dump_file)
        {
! 	tree_cfg2vcg (dump_file);
! 	dump_end (TDI_vcg, dump_file);
        }
    }
  
--- 207,217 ----
    /* Write the flowgraph to a VCG file.  */
    {
      int local_dump_flags;
!     FILE *vcg_file = dump_begin (TDI_vcg, &local_dump_flags);
!     if (vcg_file)
        {
! 	tree_cfg2vcg (vcg_file);
! 	dump_end (TDI_vcg, vcg_file);
        }
    }
  
Index: config/sh/sh.c
===================================================================
*** config/sh/sh.c	(revision 110621)
--- config/sh/sh.c	(working copy)
*************** sh_output_mi_thunk (FILE *file, tree thu
*** 9820,9830 ****
  
        if (flag_schedule_insns_after_reload)
  	{
! 	  life_analysis (dump_file, PROP_FINAL);
  
  	  split_all_insns (1);
  
! 	  schedule_insns (dump_file);
  	}
        /* We must split jmp insn in PIC case.  */
        else if (flag_pic)
--- 9820,9830 ----
  
        if (flag_schedule_insns_after_reload)
  	{
! 	  life_analysis (PROP_FINAL);
  
  	  split_all_insns (1);
  
! 	  schedule_insns ();
  	}
        /* We must split jmp insn in PIC case.  */
        else if (flag_pic)
*************** sh_output_mi_thunk (FILE *file, tree thu
*** 9834,9840 ****
    sh_reorg ();
  
    if (optimize > 0 && flag_delayed_branch)
!     dbr_schedule (insns, dump_file);
  
    shorten_branches (insns);
    final_start_function (insns, file, 1);
--- 9834,9840 ----
    sh_reorg ();
  
    if (optimize > 0 && flag_delayed_branch)
!     dbr_schedule (insns);
  
    shorten_branches (insns);
    final_start_function (insns, file, 1);
Index: config/m68hc11/m68hc11.c
===================================================================
*** config/m68hc11/m68hc11.c	(revision 110621)
--- config/m68hc11/m68hc11.c	(working copy)
*************** m68hc11_reorg (void)
*** 5062,5068 ****
              }
          }
  
!       life_analysis (0, PROP_REG_INFO | PROP_DEATH_NOTES);
      }
  
    z_replacement_completed = 2;
--- 5062,5068 ----
              }
          }
  
!       life_analysis (PROP_REG_INFO | PROP_DEATH_NOTES);
      }
  
    z_replacement_completed = 2;
Index: config/mt/mt.c
===================================================================
*** config/mt/mt.c	(revision 110621)
--- config/mt/mt.c	(working copy)
*************** mt_machine_reorg (void)
*** 2452,2458 ****
      mt_reorg_loops (dump_file);
  
    if (mt_flag_delayed_branch)
!     dbr_schedule (get_insns (), dump_file);
    
    if (TARGET_MS2)
      {
--- 2452,2458 ----
      mt_reorg_loops (dump_file);
  
    if (mt_flag_delayed_branch)
!     dbr_schedule (get_insns ());
    
    if (TARGET_MS2)
      {
Index: config/ia64/ia64.c
===================================================================
*** config/ia64/ia64.c	(revision 110621)
--- config/ia64/ia64.c	(working copy)
*************** ia64_reorg (void)
*** 7796,7802 ****
  	  _1mfb_ = get_cpu_unit_code ("1b_1mfb.");
  	  _1mlx_ = get_cpu_unit_code ("1b_1mlx.");
  	}
!       schedule_ebbs (dump_file);
        finish_bundle_states ();
        if (ia64_tune == PROCESSOR_ITANIUM)
  	{
--- 7796,7802 ----
  	  _1mfb_ = get_cpu_unit_code ("1b_1mfb.");
  	  _1mlx_ = get_cpu_unit_code ("1b_1mlx.");
  	}
!       schedule_ebbs ();
        finish_bundle_states ();
        if (ia64_tune == PROCESSOR_ITANIUM)
  	{
Index: config/mips/mips.c
===================================================================
*** config/mips/mips.c	(revision 110621)
--- config/mips/mips.c	(working copy)
*************** mips_reorg (void)
*** 8922,8928 ****
    else if (TARGET_EXPLICIT_RELOCS)
      {
        if (mips_flag_delayed_branch)
! 	dbr_schedule (get_insns (), dump_file);
        mips_avoid_hazards ();
        if (TUNE_MIPS4130 && TARGET_VR4130_ALIGN)
  	vr4130_align_insns ();
--- 8922,8928 ----
    else if (TARGET_EXPLICIT_RELOCS)
      {
        if (mips_flag_delayed_branch)
! 	dbr_schedule (get_insns ());
        mips_avoid_hazards ();
        if (TUNE_MIPS4130 && TARGET_VR4130_ALIGN)
  	vr4130_align_insns ();
Index: rtl-profile.c
===================================================================
*** rtl-profile.c	(revision 110621)
--- rtl-profile.c	(working copy)
*************** rtl_gen_const_delta_profiler (histogram_
*** 358,368 ****
    safe_insert_insn_on_edge (sequence, e);
  }
  
- /* Return the file on which profile dump output goes, if any.  */
- 
- static FILE *rtl_profile_dump_file (void) {
-   return dump_file;
- }
  
  struct profile_hooks rtl_profile_hooks =
  {
--- 358,363 ----
*************** struct profile_hooks rtl_profile_hooks =
*** 371,376 ****
    rtl_gen_interval_profiler,
    rtl_gen_pow2_profiler,
    rtl_gen_one_value_profiler,
!   rtl_gen_const_delta_profiler,
!   rtl_profile_dump_file
  };
--- 366,370 ----
    rtl_gen_interval_profiler,
    rtl_gen_pow2_profiler,
    rtl_gen_one_value_profiler,
!   rtl_gen_const_delta_profiler
  };


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