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]

delay slot debug dump bug




When debugging dumps are enabled, dbr_schedule does not write any of
the delay slot statistics to the dump file.

This occurs because the dump file is not opened before calling dbr_schedule
and thus rtl_dump_file is zero and nothing is written by dbr_schedule.

This patch fixes the problem:

        * toplev.c (rest_of_compilation): Allow dbr_schedule to write to
        the dump file too.

Index: toplev.c
===================================================================
RCS file: /cvs/cvsfiles/devo/gcc/toplev.c,v
retrieving revision 1.353
diff -c -3 -p -r1.353 toplev.c
*** toplev.c	1999/03/31 20:55:36	1.353
--- toplev.c	1999/04/01 00:10:16
*************** rest_of_compilation (decl)
*** 4371,4381 ****
  #ifdef DELAY_SLOTS
    if (optimize > 0 && flag_delayed_branch)
      {
        TIMEVAR (dbr_sched_time, dbr_schedule (insns, rtl_dump_file));
  
        if (dbr_sched_dump)
  	{
! 	  dump_rtl (".dbr", decl, print_rtl_with_bb, insns);
  	  if (graph_dump_format != no_graph)
  	    print_rtl_graph_with_bb (dump_base_name, ".dbr", insns);
  	}
--- 4371,4384 ----
  #ifdef DELAY_SLOTS
    if (optimize > 0 && flag_delayed_branch)
      {
+       if (dbr_sched_dump)
+ 	open_dump_file (".dbr", decl_printable_name (decl, 2));
+ 
        TIMEVAR (dbr_sched_time, dbr_schedule (insns, rtl_dump_file));
  
        if (dbr_sched_dump)
  	{
! 	  close_dump_file (print_rtl_with_bb, insns);
  	  if (graph_dump_format != no_graph)
  	    print_rtl_graph_with_bb (dump_base_name, ".dbr", insns);
  	}



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