Commit 61098249 by Richard Henderson Committed by Richard Henderson

Makefile.in (STAGESTUFF): Wildcard all debugging dumps at once.

	* Makefile.in (STAGESTUFF): Wildcard all debugging dumps at once.
	(mostlyclean): Likewise.

	* toplev.c (rtl_dump, jump_opt_dump, etc): Remove.
	(struct dump_file_info, enum dump_file_index, dump_file): New.
	(open_dump_file): Take a dump_file_index not a suffix, and a decl
	not a string.  Clean out file if we havn't yet done so.  Do nothing
	if the dump isn't enabled.
	(close_dump_file): Do nothing if the dump isn't open.  Dump
	graph data if requested.
	(dump_rtl, clean_dump_file): Remove.
	(compile_file): Don't clean the dump files.  Only finalize .bp dump
	if flag_test_coverage or flag_branch_probabilities.  Only finalize
	.combine dump if optimizing.  Iterate over dump_file to finalize the
	graph dumps.
	(rest_of_compilation): Update for open_dump_file/close_dump_file.
	Convert all uses of dump_rtl.
	(decode_d_option): Iterate over dump_file to implement 'a' and to
	locate pass-specific dumps.

From-SVN: r32857
parent 9d26ffb2
2000-04-01 Richard Henderson <rth@cygnus.com>
* Makefile.in (STAGESTUFF): Wildcard all debugging dumps at once.
(mostlyclean): Likewise.
* toplev.c (rtl_dump, jump_opt_dump, etc): Remove.
(struct dump_file_info, enum dump_file_index, dump_file): New.
(open_dump_file): Take a dump_file_index not a suffix, and a decl
not a string. Clean out file if we havn't yet done so. Do nothing
if the dump isn't enabled.
(close_dump_file): Do nothing if the dump isn't open. Dump
graph data if requested.
(dump_rtl, clean_dump_file): Remove.
(compile_file): Don't clean the dump files. Only finalize .bp dump
if flag_test_coverage or flag_branch_probabilities. Only finalize
.combine dump if optimizing. Iterate over dump_file to finalize the
graph dumps.
(rest_of_compilation): Update for open_dump_file/close_dump_file.
Convert all uses of dump_rtl.
(decode_d_option): Iterate over dump_file to implement 'a' and to
locate pass-specific dumps.
2000-04-01 Neil Booth <NeilB@earthling.net> 2000-04-01 Neil Booth <NeilB@earthling.net>
* cppexp.c: Redefine priority constants. * cppexp.c: Redefine priority constants.
......
...@@ -707,11 +707,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \ ...@@ -707,11 +707,7 @@ STAGESTUFF = *$(objext) insn-flags.h insn-config.h insn-codes.h \
$(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \ $(CCCP)$(exeext) cc1obj$(exeext) enquire$(exeext) \
protoize$(exeext) unprotoize$(exeext) \ protoize$(exeext) unprotoize$(exeext) \
specs collect2$(exeext) $(USE_COLLECT2) underscore.c \ specs collect2$(exeext) $(USE_COLLECT2) underscore.c \
gcov$(exeext) *.bp \ gcov$(exeext) *.[0-9][0-9].* *.[si] libcpp.a \
*.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop \
*.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.gcse *.flow2 *.peephole2 \
*.ssa *.ussa \
*.[si] libcpp.a \
$(LANG_STAGESTUFF) $(LANG_STAGESTUFF)
# Members of libgcc1.a. # Members of libgcc1.a.
...@@ -2381,13 +2377,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean ...@@ -2381,13 +2377,7 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
-rm -f s-* tmp-* stamp-* stmp-* -rm -f s-* tmp-* stamp-* stmp-*
-rm -f */stamp-* */tmp-* -rm -f */stamp-* */tmp-*
# Delete debugging dump files. # Delete debugging dump files.
-rm -f *.greg *.lreg *.combine *.flow *.cse *.jump *.rtl *.tree *.loop -rm -f *.[0-9][0-9].* */*.[0-9][0-9].*
-rm -f *.dbr *.jump2 *.sched *.cse2 *.sched2 *.stack *.addressof
-rm -f *.regmove *.mach *.bp *.gcse *.flow2 *.peephole2 *.ssa *.ussa
-rm -f */*.greg */*.lreg */*.combine */*.flow */*.cse */*.jump */*.rtl
-rm -f */*.tree */*.loop */*.dbr */*.jump2 */*.sched */*.cse2
-rm -f */*.sched2 */*.stack */*.regmove */*.gcse */*.flow2
-rm -f */*.peephole2 */*.ssa */*.ussa
# Delete some files made during installation. # Delete some files made during installation.
-rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c -rm -f specs float.h-* enquire SYSCALLS.c.X SYSCALLS.c
-rm -f collect collect2 mips-tfile mips-tdump alloca.s -rm -f collect collect2 mips-tfile mips-tdump alloca.s
...@@ -2401,7 +2391,6 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean ...@@ -2401,7 +2391,6 @@ mostlyclean: $(INTL_MOSTLYCLEAN) lang.mostlyclean
-rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns -rm -f gcc.vrs gcc.kys gcc.tps gcc.pgs gcc.fns
# Delete core dumps. # Delete core dumps.
-rm -f core */core -rm -f core */core
-rm -f *.bp */*.bp
# Delete all files made by compilation # Delete all files made by compilation
# that don't exist in the distribution. # that don't exist in the distribution.
......
...@@ -162,10 +162,6 @@ static void pipe_closed PARAMS ((int)) ATTRIBUTE_NORETURN; ...@@ -162,10 +162,6 @@ static void pipe_closed PARAMS ((int)) ATTRIBUTE_NORETURN;
/* This might or might not be used in ASM_IDENTIFY_LANGUAGE. */ /* This might or might not be used in ASM_IDENTIFY_LANGUAGE. */
static void output_lang_identify PARAMS ((FILE *)) ATTRIBUTE_UNUSED; static void output_lang_identify PARAMS ((FILE *)) ATTRIBUTE_UNUSED;
#endif #endif
static void open_dump_file PARAMS ((const char *, const char *));
static void close_dump_file PARAMS ((void (*) (FILE *, rtx), rtx));
static void dump_rtl PARAMS ((const char *, tree, void (*) (FILE *, rtx), rtx));
static void clean_dump_file PARAMS ((const char *));
static void compile_file PARAMS ((char *)); static void compile_file PARAMS ((char *));
static void display_help PARAMS ((void)); static void display_help PARAMS ((void));
static void mark_file_stack PARAMS ((void *)); static void mark_file_stack PARAMS ((void *));
...@@ -230,42 +226,99 @@ const char *dump_base_name; ...@@ -230,42 +226,99 @@ const char *dump_base_name;
extern int target_flags; extern int target_flags;
/* Flags saying which kinds of debugging dump have been requested. */ /* Describes a dump file. */
int rtl_dump = 0; struct dump_file_info
int rtl_dump_and_exit = 0; {
int jump_opt_dump = 0; /* The unique extension to apply, e.g. ".jump". */
int addressof_dump = 0; const char * const extension;
int cse_dump = 0;
int gcse_dump = 0; /* The -d<c> character that enables this dump file. */
int loop_dump = 0; char const debug_switch;
int cse2_dump = 0;
int branch_prob_dump = 0; /* True if there is a corresponding graph dump file. */
int flow_dump = 0; char const graph_dump_p;
int combine_dump = 0;
int regmove_dump = 0; /* True if the user selected this dump. */
int sched_dump = 0; char enabled;
int local_reg_dump = 0;
int global_reg_dump = 0; /* True if the files have been initialized (ie truncated). */
int flow2_dump = 0; char initialized;
int peephole2_dump = 0; };
int sched2_dump = 0;
int jump2_opt_dump = 0; /* Enumerate the extant dump files. */
#ifdef DELAY_SLOTS
int dbr_sched_dump = 0; enum dump_file_index
#endif {
int reorder_blocks_dump = 0; DFI_rtl,
int flag_print_asm_name = 0; DFI_jump,
#ifdef STACK_REGS DFI_cse,
int stack_reg_dump = 0; DFI_addressof,
#endif DFI_ssa,
#ifdef MACHINE_DEPENDENT_REORG DFI_ussa,
int mach_dep_reorg_dump = 0; DFI_gcse,
#endif DFI_loop,
int ssa_dump = 0; DFI_cse2,
static int flag_print_mem = 0; DFI_bp,
static int version_flag = 0; DFI_flow,
static char * filename = 0; DFI_combine,
DFI_regmove,
DFI_sched,
DFI_lreg,
DFI_greg,
DFI_flow2,
DFI_peephole2,
DFI_sched2,
DFI_bbro,
DFI_jump2,
DFI_mach,
DFI_dbr,
DFI_stack,
DFI_MAX
};
/* Describes all the dump files. Should be kept in order of the
pass and in sync with dump_file_index above. */
struct dump_file_info dump_file[DFI_MAX] =
{
{ "rtl", 'r', 0, 0, 0 },
{ "jump", 'j', 0, 0, 0 },
{ "cse", 's', 0, 0, 0 },
{ "addressof", 'F', 0, 0, 0 },
{ "ssa", 'e', 1, 0, 0 },
{ "ussa", 'e', 1, 0, 0 }, /* Yes, duplicate enable switch. */
{ "gcse", 'G', 1, 0, 0 },
{ "loop", 'L', 1, 0, 0 },
{ "cse2", 't', 1, 0, 0 },
{ "bp", 'b', 1, 0, 0 },
{ "flow", 'f', 1, 0, 0 },
{ "combine", 'c', 1, 0, 0 },
{ "regmove", 'N', 1, 0, 0 },
{ "sched", 'S', 1, 0, 0 },
{ "lreg", 'l', 1, 0, 0 },
{ "greg", 'g', 1, 0, 0 },
{ "flow2", 'w', 1, 0, 0 },
{ "peephole2", 'z', 1, 0, 0 },
{ "sched2", 'R', 1, 0, 0 },
{ "bbro", 'B', 1, 0, 0 },
{ "jump2", 'J', 1, 0, 0 },
{ "mach", 'M', 1, 0, 0 },
{ "dbr", 'd', 0, 0, 0 },
{ "stack", 'k', 1, 0, 0 },
};
static int open_dump_file PARAMS ((enum dump_file_index, tree));
static void close_dump_file PARAMS ((enum dump_file_index,
void (*) (FILE *, rtx), rtx));
/* Other flags saying which kinds of debugging dump have been requested. */
int rtl_dump_and_exit;
int flag_print_asm_name;
static int flag_print_mem;
static int version_flag;
static char * filename;
enum graph_dump_types graph_dump_format; enum graph_dump_types graph_dump_format;
/* Name for output file of assembly code, specified with -o. */ /* Name for output file of assembly code, specified with -o. */
...@@ -1736,46 +1789,89 @@ output_lang_identify (asm_out_file) ...@@ -1736,46 +1789,89 @@ output_lang_identify (asm_out_file)
} }
#endif #endif
/* Routine to open a dump file. */ /* Routine to open a dump file. Return true if the dump file is enabled. */
static void
open_dump_file (suffix, function_name) static int
const char *suffix; open_dump_file (index, decl)
const char *function_name; enum dump_file_index index;
tree decl;
{ {
char *dumpname; char *dump_name;
const char *open_arg;
char seq[16];
if (! dump_file[index].enabled)
return 0;
TIMEVAR TIMEVAR
(dump_time, (dump_time,
{ {
dumpname = concat (dump_base_name, suffix, NULL);
if (rtl_dump_file != NULL) if (rtl_dump_file != NULL)
fclose (rtl_dump_file); fclose (rtl_dump_file);
rtl_dump_file = fopen (dumpname, "a"); sprintf (seq, ".%02d.", index);
if (! dump_file[index].initialized)
{
/* If we've not initialized the files, do so now. */
if (graph_dump_format != no_graph
&& dump_file[index].graph_dump_p)
{
dump_name = concat (seq, dump_file[index].extension, NULL);
clean_graph_dump_file (dump_base_name, dump_name);
free (dump_name);
}
dump_file[index].initialized = 1;
open_arg = "w";
}
else
open_arg = "a";
dump_name = concat (dump_base_name, seq,
dump_file[index].extension, NULL);
rtl_dump_file = fopen (dump_name, open_arg);
if (rtl_dump_file == NULL) if (rtl_dump_file == NULL)
pfatal_with_name (dumpname); pfatal_with_name (dump_name);
free (dumpname); free (dump_name);
if (function_name) if (decl)
fprintf (rtl_dump_file, "\n;; Function %s\n\n", function_name); fprintf (rtl_dump_file, "\n;; Function %s\n\n",
decl_printable_name (decl, 2));
}); });
return; return 1;
} }
/* Routine to close a dump file. */ /* Routine to close a dump file. */
static void static void
close_dump_file (func, insns) close_dump_file (index, func, insns)
enum dump_file_index index;
void (*func) PARAMS ((FILE *, rtx)); void (*func) PARAMS ((FILE *, rtx));
rtx insns; rtx insns;
{ {
if (! rtl_dump_file)
return;
TIMEVAR TIMEVAR
(dump_time, (dump_time,
{ {
if (func) if (insns
&& graph_dump_format != no_graph
&& dump_file[index].graph_dump_p)
{
char seq[16];
char *suffix;
sprintf (seq, ".%02d.", index);
suffix = concat (seq, dump_file[index].extension, NULL);
print_rtl_graph_with_bb (dump_base_name, suffix, insns);
free (suffix);
}
if (func && insns)
func (rtl_dump_file, insns); func (rtl_dump_file, insns);
fflush (rtl_dump_file); fflush (rtl_dump_file);
...@@ -1783,40 +1879,6 @@ close_dump_file (func, insns) ...@@ -1783,40 +1879,6 @@ close_dump_file (func, insns)
rtl_dump_file = NULL; rtl_dump_file = NULL;
}); });
return;
}
/* Routine to dump rtl into a file. */
static void
dump_rtl (suffix, decl, func, insns)
const char *suffix;
tree decl;
void (*func) PARAMS ((FILE *, rtx));
rtx insns;
{
open_dump_file (suffix, decl_printable_name (decl, 2));
close_dump_file (func, insns);
}
/* Routine to empty a dump file. */
static void
clean_dump_file (suffix)
const char *suffix;
{
char * const dumpname = concat (dump_base_name, suffix, NULL);
rtl_dump_file = fopen (dumpname, "w");
if (rtl_dump_file == NULL)
pfatal_with_name (dumpname);
free (dumpname);
fclose (rtl_dump_file);
rtl_dump_file = NULL;
return;
} }
/* Do any final processing required for the declarations in VEC, of /* Do any final processing required for the declarations in VEC, of
...@@ -2148,153 +2210,6 @@ compile_file (name) ...@@ -2148,153 +2210,6 @@ compile_file (name)
pfatal_with_name (aux_info_file_name); pfatal_with_name (aux_info_file_name);
} }
/* Clear the dump files. */
if (rtl_dump)
clean_dump_file (".00.rtl");
if (jump_opt_dump)
{
clean_dump_file (".01.jump");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".01.jump");
}
if (cse_dump)
{
clean_dump_file (".02.cse");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".02.cse");
}
if (addressof_dump)
{
clean_dump_file (".03.addressof");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".03.addressof");
}
if (ssa_dump)
{
clean_dump_file (".033.ssa");
clean_dump_file (".037.ussa");
}
if (gcse_dump)
{
clean_dump_file (".04.gcse");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".04.gcse");
}
if (loop_dump)
{
clean_dump_file (".05.loop");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".05.loop");
}
if (cse2_dump)
{
clean_dump_file (".06.cse2");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".06.cse2");
}
if (branch_prob_dump)
{
clean_dump_file (".07.bp");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".07.bp");
}
if (flow_dump)
{
clean_dump_file (".08.flow");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".08.flow");
}
if (combine_dump)
{
clean_dump_file (".09.combine");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".09.combine");
}
if (regmove_dump)
{
clean_dump_file (".10.regmove");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".10.regmove");
}
#ifdef INSN_SCHEDULING
if (sched_dump)
{
clean_dump_file (".11.sched");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".11.sched");
}
#endif
if (local_reg_dump)
{
clean_dump_file (".12.lreg");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".12.lreg");
}
if (global_reg_dump)
{
clean_dump_file (".13.greg");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".13.greg");
}
if (flow2_dump)
{
clean_dump_file (".14.flow2");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".14.flow2");
}
#ifdef HAVE_peephole2
if (peephole2_dump)
{
clean_dump_file (".15.peephole2");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".15.peephole2");
}
#endif
#ifdef INSN_SCHEDULING
if (sched2_dump)
{
clean_dump_file (".16.sched2");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".16.sched2");
}
#endif
if (reorder_blocks_dump)
{
clean_dump_file (".bbro");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".bbro");
}
if (jump2_opt_dump)
{
clean_dump_file (".17.jump2");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".17.jump2");
}
#ifdef MACHINE_DEPENDENT_REORG
if (mach_dep_reorg_dump)
{
clean_dump_file (".18.mach");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".18.mach");
}
#endif
#ifdef DELAY_SLOTS
if (dbr_sched_dump)
{
clean_dump_file (".19.dbr");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".19.dbr");
}
#endif
#ifdef STACK_REGS
if (stack_reg_dump)
{
clean_dump_file (".20.stack");
if (graph_dump_format != no_graph)
clean_graph_dump_file (dump_base_name, ".20.stack");
}
#endif
/* Open assembler code output file. */ /* Open assembler code output file. */
if (flag_syntax_only) if (flag_syntax_only)
...@@ -2559,19 +2474,19 @@ compile_file (name) ...@@ -2559,19 +2474,19 @@ compile_file (name)
end_final (dump_base_name); end_final (dump_base_name);
if (branch_prob_dump) if (flag_test_coverage || flag_branch_probabilities)
open_dump_file (".07.bp", NULL); {
open_dump_file (DFI_bp, NULL);
TIMEVAR (dump_time, end_branch_prob (rtl_dump_file)); TIMEVAR (dump_time, end_branch_prob (rtl_dump_file));
if (branch_prob_dump) close_dump_file (DFI_bp, NULL, NULL_RTX);
close_dump_file (NULL, NULL_RTX); }
#ifdef ASM_FILE_END #ifdef ASM_FILE_END
ASM_FILE_END (asm_out_file); ASM_FILE_END (asm_out_file);
#endif #endif
/* Language-specific end of compilation actions. */ /* Language-specific end of compilation actions. */
finish_syntax: finish_syntax:
lang_finish (); lang_finish ();
...@@ -2585,11 +2500,10 @@ compile_file (name) ...@@ -2585,11 +2500,10 @@ compile_file (name)
unlink (aux_info_file_name); unlink (aux_info_file_name);
} }
if (combine_dump) if (optimize > 0 && open_dump_file (DFI_combine, NULL))
{ {
open_dump_file (".09.combine", NULL);
TIMEVAR (dump_time, dump_combine_total_stats (rtl_dump_file)); TIMEVAR (dump_time, dump_combine_total_stats (rtl_dump_file));
close_dump_file (NULL, NULL_RTX); close_dump_file (DFI_combine, NULL, NULL_RTX);
} }
/* Close non-debugging input and output files. Take special care to note /* Close non-debugging input and output files. Take special care to note
...@@ -2605,60 +2519,19 @@ compile_file (name) ...@@ -2605,60 +2519,19 @@ compile_file (name)
/* Do whatever is necessary to finish printing the graphs. */ /* Do whatever is necessary to finish printing the graphs. */
if (graph_dump_format != no_graph) if (graph_dump_format != no_graph)
{ {
if (jump_opt_dump) int i;
finish_graph_dump_file (dump_base_name, ".01.jump");
if (cse_dump) for (i = 0; i < DFI_MAX; ++i)
finish_graph_dump_file (dump_base_name, ".02.cse"); if (dump_file[i].initialized && dump_file[i].graph_dump_p)
if (addressof_dump) {
finish_graph_dump_file (dump_base_name, ".03.addressof"); char seq[16];
if (gcse_dump) char *suffix;
finish_graph_dump_file (dump_base_name, ".04.gcse");
if (loop_dump) sprintf (seq, ".%02d.", i);
finish_graph_dump_file (dump_base_name, ".05.loop"); suffix = concat (seq, dump_file[i].extension, NULL);
if (cse2_dump) finish_graph_dump_file (dump_base_name, suffix);
finish_graph_dump_file (dump_base_name, ".06.cse2"); free (suffix);
if (branch_prob_dump) }
finish_graph_dump_file (dump_base_name, ".07.bp");
if (flow_dump)
finish_graph_dump_file (dump_base_name, ".08.flow");
if (combine_dump)
finish_graph_dump_file (dump_base_name, ".09.combine");
if (regmove_dump)
finish_graph_dump_file (dump_base_name, ".10.regmove");
#ifdef INSN_SCHEDULING
if (sched_dump)
finish_graph_dump_file (dump_base_name, ".11.sched");
#endif
if (local_reg_dump)
finish_graph_dump_file (dump_base_name, ".12.lreg");
if (global_reg_dump)
finish_graph_dump_file (dump_base_name, ".13.greg");
if (flow2_dump)
finish_graph_dump_file (dump_base_name, ".14.flow2");
#ifdef HAVE_peephole2
if (flow2_dump)
finish_graph_dump_file (dump_base_name, ".15.peephole2");
#endif
#ifdef INSN_SCHEDULING
if (sched2_dump)
finish_graph_dump_file (dump_base_name, ".16.sched2");
#endif
if (reorder_blocks_dump)
finish_graph_dump_file (dump_base_name, ".bbro");
if (jump2_opt_dump)
finish_graph_dump_file (dump_base_name, ".17.jump2");
#ifdef MACHINE_DEPENDENT_REORG
if (mach_dep_reorg_dump)
finish_graph_dump_file (dump_base_name, ".18.mach");
#endif
#ifdef DELAY_SLOTS
if (dbr_sched_dump)
finish_graph_dump_file (dump_base_name, ".19.dbr");
#endif
#ifdef STACK_REGS
if (stack_reg_dump)
finish_graph_dump_file (dump_base_name, ".20.stack");
#endif
} }
/* Free up memory for the benefit of leak detectors. */ /* Free up memory for the benefit of leak detectors. */
...@@ -2936,14 +2809,11 @@ rest_of_compilation (decl) ...@@ -2936,14 +2809,11 @@ rest_of_compilation (decl)
/* Dump the rtl code if we are dumping rtl. */ /* Dump the rtl code if we are dumping rtl. */
if (rtl_dump) if (open_dump_file (DFI_rtl, decl))
{ {
open_dump_file (".00.rtl", decl_printable_name (decl, 2));
if (DECL_SAVED_INSNS (decl)) if (DECL_SAVED_INSNS (decl))
fprintf (rtl_dump_file, ";; (integrable)\n\n"); fprintf (rtl_dump_file, ";; (integrable)\n\n");
close_dump_file (DFI_rtl, print_rtl, insns);
close_dump_file (print_rtl, insns);
} }
/* If function is inline, and we don't yet know whether to /* If function is inline, and we don't yet know whether to
...@@ -3069,8 +2939,7 @@ rest_of_compilation (decl) ...@@ -3069,8 +2939,7 @@ rest_of_compilation (decl)
/* Find all the EH handlers. */ /* Find all the EH handlers. */
find_exception_handler_labels (); find_exception_handler_labels ();
if (jump_opt_dump) open_dump_file (DFI_jump, decl);
open_dump_file (".01.jump", decl_printable_name (decl, 2));
/* Always do one jump optimization pass to ensure that JUMP_LABEL fields /* Always do one jump optimization pass to ensure that JUMP_LABEL fields
are initialized and to compute whether control can drop off the end are initialized and to compute whether control can drop off the end
...@@ -3086,9 +2955,7 @@ rest_of_compilation (decl) ...@@ -3086,9 +2955,7 @@ rest_of_compilation (decl)
memory. */ memory. */
renumber_insns (rtl_dump_file); renumber_insns (rtl_dump_file);
/* Dump rtl code after jump, if we are doing that. */ close_dump_file (DFI_jump, print_rtl, insns);
if (jump_opt_dump)
close_dump_file (print_rtl, insns);
/* Now is when we stop if -fsyntax-only and -Wreturn-type. */ /* Now is when we stop if -fsyntax-only and -Wreturn-type. */
if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl)) if (rtl_dump_and_exit || flag_syntax_only || DECL_DEFER_OUTPUT (decl))
...@@ -3108,8 +2975,7 @@ rest_of_compilation (decl) ...@@ -3108,8 +2975,7 @@ rest_of_compilation (decl)
if (optimize > 0) if (optimize > 0)
{ {
if (cse_dump) open_dump_file (DFI_cse, decl);
open_dump_file (".02.cse", decl_printable_name (decl, 2));
TIMEVAR (cse_time, reg_scan (insns, max_reg_num (), 1)); TIMEVAR (cse_time, reg_scan (insns, max_reg_num (), 1));
...@@ -3139,43 +3005,30 @@ rest_of_compilation (decl) ...@@ -3139,43 +3005,30 @@ rest_of_compilation (decl)
removed a bunch more instructions. */ removed a bunch more instructions. */
renumber_insns (rtl_dump_file); renumber_insns (rtl_dump_file);
/* Dump rtl code after cse, if we are doing that. */ close_dump_file (DFI_cse, print_rtl, insns);
if (cse_dump)
{
close_dump_file (print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".02.cse", insns);
}
} }
open_dump_file (DFI_addressof, decl);
purge_addressof (insns); purge_addressof (insns);
reg_scan (insns, max_reg_num (), 1); reg_scan (insns, max_reg_num (), 1);
if (addressof_dump) close_dump_file (DFI_addressof, print_rtl, insns);
{
dump_rtl (".03.addressof", decl, print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".03.addressof", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
if (flag_ssa) if (flag_ssa)
{ {
if (ssa_dump) open_dump_file (DFI_ssa, decl);
open_dump_file (".033.ssa", decl_printable_name (decl, 2));
convert_to_ssa (); convert_to_ssa ();
if (ssa_dump) close_dump_file (DFI_ssa, print_rtl_with_bb, insns);
close_dump_file (print_rtl_with_bb, insns);
if (ssa_dump) open_dump_file (DFI_ussa, decl);
open_dump_file (".037.ussa", decl_printable_name (decl, 2));
convert_from_ssa (); convert_from_ssa ();
/* New registers have been created. Rescan their usage. */ /* New registers have been created. Rescan their usage. */
reg_scan (insns, max_reg_num (), 1); reg_scan (insns, max_reg_num (), 1);
if (ssa_dump) close_dump_file (DFI_ussa, print_rtl_with_bb, insns);
close_dump_file (print_rtl_with_bb, insns);
/* Life analysis used in SSA adds log_links but these shouldn't /* Life analysis used in SSA adds log_links but these shouldn't
be there until the flow stage, so clear them away. */ be there until the flow stage, so clear them away. */
...@@ -3189,8 +3042,7 @@ rest_of_compilation (decl) ...@@ -3189,8 +3042,7 @@ rest_of_compilation (decl)
if (optimize > 0 && flag_gcse) if (optimize > 0 && flag_gcse)
{ {
if (gcse_dump) open_dump_file (DFI_gcse, decl);
open_dump_file (".04.gcse", decl_printable_name (decl, 2));
TIMEVAR (gcse_time, tem = gcse_main (insns, rtl_dump_file)); TIMEVAR (gcse_time, tem = gcse_main (insns, rtl_dump_file));
...@@ -3203,12 +3055,7 @@ rest_of_compilation (decl) ...@@ -3203,12 +3055,7 @@ rest_of_compilation (decl)
!JUMP_AFTER_REGSCAN)); !JUMP_AFTER_REGSCAN));
} }
if (gcse_dump) close_dump_file (DFI_gcse, print_rtl, insns);
{
close_dump_file (print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".04.gcse", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3217,8 +3064,7 @@ rest_of_compilation (decl) ...@@ -3217,8 +3064,7 @@ rest_of_compilation (decl)
if (optimize > 0) if (optimize > 0)
{ {
if (loop_dump) open_dump_file (DFI_loop, decl);
open_dump_file (".05.loop", decl_printable_name (decl, 2));
TIMEVAR TIMEVAR
(loop_time, (loop_time,
...@@ -3243,14 +3089,7 @@ rest_of_compilation (decl) ...@@ -3243,14 +3089,7 @@ rest_of_compilation (decl)
loop_optimize (insns, rtl_dump_file, flag_unroll_loops, 1); loop_optimize (insns, rtl_dump_file, flag_unroll_loops, 1);
}); });
/* Dump rtl code after loop opt, if we are doing that. */ close_dump_file (DFI_loop, print_rtl, insns);
if (loop_dump)
{
close_dump_file (print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".05.loop", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3263,8 +3102,7 @@ rest_of_compilation (decl) ...@@ -3263,8 +3102,7 @@ rest_of_compilation (decl)
if (optimize > 0) if (optimize > 0)
{ {
if (cse2_dump) open_dump_file (DFI_cse2, decl);
open_dump_file (".06.cse2", decl_printable_name (decl, 2));
if (flag_rerun_cse_after_loop) if (flag_rerun_cse_after_loop)
{ {
...@@ -3295,13 +3133,7 @@ rest_of_compilation (decl) ...@@ -3295,13 +3133,7 @@ rest_of_compilation (decl)
TIMEVAR (jump_time, thread_jumps (insns, max_reg_num (), 0)); TIMEVAR (jump_time, thread_jumps (insns, max_reg_num (), 0));
} }
/* Dump rtl code after cse, if we are doing that. */ close_dump_file (DFI_cse2, print_rtl, insns);
if (cse2_dump)
{
close_dump_file (print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".06.cse2", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3309,8 +3141,7 @@ rest_of_compilation (decl) ...@@ -3309,8 +3141,7 @@ rest_of_compilation (decl)
if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities) if (profile_arc_flag || flag_test_coverage || flag_branch_probabilities)
{ {
if (branch_prob_dump) open_dump_file (DFI_bp, decl);
open_dump_file (".07.bp", decl_printable_name (decl, 2));
TIMEVAR TIMEVAR
(branch_prob_time, (branch_prob_time,
...@@ -3318,12 +3149,7 @@ rest_of_compilation (decl) ...@@ -3318,12 +3149,7 @@ rest_of_compilation (decl)
branch_prob (insns, rtl_dump_file); branch_prob (insns, rtl_dump_file);
}); });
if (branch_prob_dump) close_dump_file (DFI_bp, print_rtl, insns);
{
close_dump_file (print_rtl, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".07.bp", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3334,8 +3160,7 @@ rest_of_compilation (decl) ...@@ -3334,8 +3160,7 @@ rest_of_compilation (decl)
/* Print function header into flow dump now /* Print function header into flow dump now
because doing the flow analysis makes some of the dump. */ because doing the flow analysis makes some of the dump. */
if (flow_dump) open_dump_file (DFI_flow, decl);
open_dump_file (".08.flow", decl_printable_name (decl, 2));
/* Do control and data flow analysis; wrote some of the results to /* Do control and data flow analysis; wrote some of the results to
the dump file. */ the dump file. */
...@@ -3358,14 +3183,7 @@ rest_of_compilation (decl) ...@@ -3358,14 +3183,7 @@ rest_of_compilation (decl)
setjmp_args_warning (); setjmp_args_warning ();
} }
/* Dump rtl after flow analysis. */ close_dump_file (DFI_flow, print_rtl_with_bb, insns);
if (flow_dump)
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".08.flow", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3380,6 +3198,8 @@ rest_of_compilation (decl) ...@@ -3380,6 +3198,8 @@ rest_of_compilation (decl)
{ {
int rebuild_jump_labels_after_combine = 0; int rebuild_jump_labels_after_combine = 0;
open_dump_file (DFI_combine, decl);
TIMEVAR (combine_time, TIMEVAR (combine_time,
{ {
rebuild_jump_labels_after_combine rebuild_jump_labels_after_combine
...@@ -3394,14 +3214,7 @@ rest_of_compilation (decl) ...@@ -3394,14 +3214,7 @@ rest_of_compilation (decl)
TIMEVAR (jump_time, rebuild_jump_labels (insns)); TIMEVAR (jump_time, rebuild_jump_labels (insns));
} }
/* Dump rtl code after insn combination. */ close_dump_file (DFI_combine, print_rtl_with_bb, insns);
if (combine_dump)
{
dump_rtl (".09.combine", decl, print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".09.combine", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3411,18 +3224,12 @@ rest_of_compilation (decl) ...@@ -3411,18 +3224,12 @@ rest_of_compilation (decl)
necessary for two-address machines. */ necessary for two-address machines. */
if (optimize > 0 && (flag_regmove || flag_expensive_optimizations)) if (optimize > 0 && (flag_regmove || flag_expensive_optimizations))
{ {
if (regmove_dump) open_dump_file (DFI_regmove, decl);
open_dump_file (".10.regmove", decl_printable_name (decl, 2));
TIMEVAR (regmove_time, regmove_optimize (insns, max_reg_num (), TIMEVAR (regmove_time, regmove_optimize (insns, max_reg_num (),
rtl_dump_file)); rtl_dump_file));
if (regmove_dump) close_dump_file (DFI_regmove, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".10.regmove", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3439,22 +3246,14 @@ rest_of_compilation (decl) ...@@ -3439,22 +3246,14 @@ rest_of_compilation (decl)
because doing the sched analysis makes some of the dump. */ because doing the sched analysis makes some of the dump. */
if (optimize > 0 && flag_schedule_insns) if (optimize > 0 && flag_schedule_insns)
{ {
if (sched_dump) open_dump_file (DFI_sched, decl);
open_dump_file (".11.sched", decl_printable_name (decl, 2));
/* Do control and data sched analysis, /* Do control and data sched analysis,
and write some of the results to dump file. */ and write some of the results to dump file. */
TIMEVAR (sched_time, schedule_insns (rtl_dump_file)); TIMEVAR (sched_time, schedule_insns (rtl_dump_file));
/* Dump rtl after instruction scheduling. */ close_dump_file (DFI_sched, print_rtl_with_bb, insns);
if (sched_dump)
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".11.sched", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3466,8 +3265,7 @@ rest_of_compilation (decl) ...@@ -3466,8 +3265,7 @@ rest_of_compilation (decl)
epilogue thus changing register elimination offsets. */ epilogue thus changing register elimination offsets. */
current_function_is_leaf = leaf_function_p (); current_function_is_leaf = leaf_function_p ();
if (local_reg_dump) open_dump_file (DFI_lreg, decl);
open_dump_file (".12.lreg", decl_printable_name (decl, 2));
/* Allocate pseudo-regs that are used only within 1 basic block. /* Allocate pseudo-regs that are used only within 1 basic block.
...@@ -3484,23 +3282,18 @@ rest_of_compilation (decl) ...@@ -3484,23 +3282,18 @@ rest_of_compilation (decl)
rebuild_label_notes_after_reload = local_alloc (); rebuild_label_notes_after_reload = local_alloc ();
}); });
/* Dump rtl code after allocating regs within basic blocks. */ if (dump_file[DFI_lreg].enabled)
if (local_reg_dump)
{ {
TIMEVAR (dump_time, dump_flow_info (rtl_dump_file)); TIMEVAR (dump_time, dump_flow_info (rtl_dump_file));
TIMEVAR (dump_time, dump_local_alloc (rtl_dump_file)); TIMEVAR (dump_time, dump_local_alloc (rtl_dump_file));
close_dump_file (print_rtl_with_bb, insns); close_dump_file (DFI_lreg, print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".12.lreg", insns);
} }
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
if (global_reg_dump) open_dump_file (DFI_greg, decl);
open_dump_file (".13.greg", decl_printable_name (decl, 2));
/* If optimizing, allocate remaining pseudo-regs. Do the reload /* If optimizing, allocate remaining pseudo-regs. Do the reload
pass fixing up any insns that are invalid. */ pass fixing up any insns that are invalid. */
...@@ -3541,17 +3334,14 @@ rest_of_compilation (decl) ...@@ -3541,17 +3334,14 @@ rest_of_compilation (decl)
if (rebuild_label_notes_after_reload) if (rebuild_label_notes_after_reload)
TIMEVAR (jump_time, rebuild_jump_labels (insns)); TIMEVAR (jump_time, rebuild_jump_labels (insns));
if (global_reg_dump) if (dump_file[DFI_greg].enabled)
{ {
TIMEVAR (dump_time, dump_global_regs (rtl_dump_file)); TIMEVAR (dump_time, dump_global_regs (rtl_dump_file));
close_dump_file (print_rtl_with_bb, insns); close_dump_file (DFI_greg, print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".13.greg", insns);
} }
/* Re-create the death notes which were deleted during reload. */ /* Re-create the death notes which were deleted during reload. */
if (flow2_dump) open_dump_file (DFI_flow2, decl);
open_dump_file (".14.flow2", decl_printable_name (decl, 2));
TIMEVAR (flow2_time, TIMEVAR (flow2_time,
{ {
...@@ -3587,49 +3377,30 @@ rest_of_compilation (decl) ...@@ -3587,49 +3377,30 @@ rest_of_compilation (decl)
flow2_completed = 1; flow2_completed = 1;
if (flow2_dump) close_dump_file (DFI_flow2, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".14.flow2", insns);
}
#ifdef HAVE_peephole2 #ifdef HAVE_peephole2
if (optimize > 0 && flag_peephole2) if (optimize > 0 && flag_peephole2)
{ {
if (peephole2_dump) open_dump_file (DFI_peephole2, decl);
open_dump_file (".15.peephole2", decl_printable_name (decl, 2));
TIMEVAR (peephole2_time, peephole2_optimize (rtl_dump_file)); TIMEVAR (peephole2_time, peephole2_optimize (rtl_dump_file));
if (peephole2_dump) close_dump_file (DFI_peephole2, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".15.peephole2", insns);
}
} }
#endif #endif
#ifdef INSN_SCHEDULING #ifdef INSN_SCHEDULING
if (optimize > 0 && flag_schedule_insns_after_reload) if (optimize > 0 && flag_schedule_insns_after_reload)
{ {
if (sched2_dump) open_dump_file (DFI_sched2, decl);
open_dump_file (".16.sched2", decl_printable_name (decl, 2));
/* Do control and data sched analysis again, /* Do control and data sched analysis again,
and write some more of the results to dump file. */ and write some more of the results to dump file. */
TIMEVAR (sched2_time, schedule_insns (rtl_dump_file)); TIMEVAR (sched2_time, schedule_insns (rtl_dump_file));
/* Dump rtl after post-reorder instruction scheduling. */ close_dump_file (DFI_sched2, print_rtl_with_bb, insns);
if (sched2_dump)
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".16.sched2", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3643,17 +3414,11 @@ rest_of_compilation (decl) ...@@ -3643,17 +3414,11 @@ rest_of_compilation (decl)
if (optimize > 0 && flag_reorder_blocks) if (optimize > 0 && flag_reorder_blocks)
{ {
if (reorder_blocks_dump) open_dump_file (DFI_bbro, decl);
open_dump_file (".bbro", decl_printable_name (decl, 2));
TIMEVAR (reorder_blocks_time, reorder_basic_blocks ()); TIMEVAR (reorder_blocks_time, reorder_basic_blocks ());
if (reorder_blocks_dump) close_dump_file (DFI_bbro, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".bbro", insns);
}
} }
/* One more attempt to remove jumps to .+1 left by dead-store elimination. /* One more attempt to remove jumps to .+1 left by dead-store elimination.
...@@ -3661,33 +3426,22 @@ rest_of_compilation (decl) ...@@ -3661,33 +3426,22 @@ rest_of_compilation (decl)
if (optimize > 0) if (optimize > 0)
{ {
open_dump_file (DFI_jump2, decl);
TIMEVAR (jump_time, jump_optimize (insns, JUMP_CROSS_JUMP, TIMEVAR (jump_time, jump_optimize (insns, JUMP_CROSS_JUMP,
JUMP_NOOP_MOVES, JUMP_NOOP_MOVES,
!JUMP_AFTER_REGSCAN)); !JUMP_AFTER_REGSCAN));
/* Dump rtl code after jump, if we are doing that. */ close_dump_file (DFI_jump2, print_rtl_with_bb, insns);
if (jump2_opt_dump)
{
dump_rtl (".17.jump2", decl, print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".17.jump2", insns);
}
} }
/* If a machine dependent reorganization is needed, call it. */ /* If a machine dependent reorganization is needed, call it. */
#ifdef MACHINE_DEPENDENT_REORG #ifdef MACHINE_DEPENDENT_REORG
if (mach_dep_reorg_dump) open_dump_file (DFI_mach, decl);
open_dump_file (".18.mach", decl_printable_name (decl, 2));
MACHINE_DEPENDENT_REORG (insns); MACHINE_DEPENDENT_REORG (insns);
if (mach_dep_reorg_dump) close_dump_file (DFI_mach, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".18.mach", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -3699,8 +3453,7 @@ rest_of_compilation (decl) ...@@ -3699,8 +3453,7 @@ rest_of_compilation (decl)
#ifdef DELAY_SLOTS #ifdef DELAY_SLOTS
if (optimize > 0 && flag_delayed_branch) if (optimize > 0 && flag_delayed_branch)
{ {
if (dbr_sched_dump) open_dump_file (DFI_dbr, decl);
open_dump_file (".19.dbr", decl_printable_name (decl, 2));
TIMEVAR TIMEVAR
(dbr_sched_time, (dbr_sched_time,
...@@ -3708,16 +3461,11 @@ rest_of_compilation (decl) ...@@ -3708,16 +3461,11 @@ rest_of_compilation (decl)
dbr_schedule (insns, rtl_dump_file); dbr_schedule (insns, rtl_dump_file);
}); });
if (dbr_sched_dump) close_dump_file (DFI_dbr, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".19.dbr", insns);
}
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
}
#endif #endif
/* Shorten branches. /* Shorten branches.
...@@ -3730,17 +3478,11 @@ rest_of_compilation (decl) ...@@ -3730,17 +3478,11 @@ rest_of_compilation (decl)
}); });
#ifdef STACK_REGS #ifdef STACK_REGS
if (stack_reg_dump) open_dump_file (DFI_stack, decl);
open_dump_file (".20.stack", decl_printable_name (decl, 2));
TIMEVAR (stack_reg_time, reg_to_stack (insns, rtl_dump_file)); TIMEVAR (stack_reg_time, reg_to_stack (insns, rtl_dump_file));
if (stack_reg_dump) close_dump_file (DFI_stack, print_rtl_with_bb, insns);
{
close_dump_file (print_rtl_with_bb, insns);
if (graph_dump_format != no_graph)
print_rtl_graph_with_bb (dump_base_name, ".20.stack", insns);
}
if (ggc_p) if (ggc_p)
ggc_collect (); ggc_collect ();
...@@ -4057,138 +3799,48 @@ static void ...@@ -4057,138 +3799,48 @@ static void
decode_d_option (arg) decode_d_option (arg)
const char * arg; const char * arg;
{ {
while (* arg) int i, c, matched;
switch (* arg ++)
while (*arg)
switch (c = *arg++)
{ {
case 'a': case 'a':
branch_prob_dump = 1; for (i = 0; i < DFI_MAX; ++i)
combine_dump = 1; dump_file[i].enabled = 1;
#ifdef DELAY_SLOTS
dbr_sched_dump = 1;
#endif
reorder_blocks_dump = 1;
flow_dump = 1;
flow2_dump = 1;
global_reg_dump = 1;
jump_opt_dump = 1;
addressof_dump = 1;
jump2_opt_dump = 1;
local_reg_dump = 1;
loop_dump = 1;
regmove_dump = 1;
rtl_dump = 1;
cse_dump = 1;
cse2_dump = 1;
gcse_dump = 1;
sched_dump = 1;
sched2_dump = 1;
#ifdef STACK_REGS
stack_reg_dump = 1;
#endif
#ifdef MACHINE_DEPENDENT_REORG
mach_dep_reorg_dump = 1;
#endif
peephole2_dump = 1;
ssa_dump = 1;
break; break;
case 'A': case 'A':
flag_debug_asm = 1; flag_debug_asm = 1;
break; break;
case 'b':
branch_prob_dump = 1;
break;
case 'B':
reorder_blocks_dump = 1;
break;
case 'c':
combine_dump = 1;
break;
#ifdef DELAY_SLOTS
case 'd':
dbr_sched_dump = 1;
break;
#endif
case 'e':
ssa_dump = 1;
break;
case 'f':
flow_dump = 1;
break;
case 'F':
addressof_dump = 1;
break;
case 'g':
global_reg_dump = 1;
break;
case 'G':
gcse_dump = 1;
break;
case 'j':
jump_opt_dump = 1;
break;
case 'J':
jump2_opt_dump = 1;
break;
#ifdef STACK_REGS
case 'k':
stack_reg_dump = 1;
break;
#endif
case 'l':
local_reg_dump = 1;
break;
case 'L':
loop_dump = 1;
break;
case 'm': case 'm':
flag_print_mem = 1; flag_print_mem = 1;
break; break;
#ifdef MACHINE_DEPENDENT_REORG
case 'M':
mach_dep_reorg_dump = 1;
break;
#endif
case 'p': case 'p':
flag_print_asm_name = 1; flag_print_asm_name = 1;
break; break;
case 'r':
rtl_dump = 1;
break;
case 'R':
sched2_dump = 1;
break;
case 's':
cse_dump = 1;
break;
case 'S':
sched_dump = 1;
break;
case 't':
cse2_dump = 1;
break;
case 'N':
regmove_dump = 1;
break;
case 'v': case 'v':
graph_dump_format = vcg; graph_dump_format = vcg;
break; break;
case 'w':
flow2_dump = 1;
break;
case 'x': case 'x':
rtl_dump_and_exit = 1; rtl_dump_and_exit = 1;
break; break;
case 'y': case 'y':
set_yydebug (1); set_yydebug (1);
break; break;
case 'z':
peephole2_dump = 1;
break;
case 'D': /* These are handled by the preprocessor. */ case 'D': /* These are handled by the preprocessor. */
case 'I': case 'I':
break; break;
default: default:
warning ("unrecognized gcc debugging option: %c", arg[-1]); matched = 0;
for (i = 0; i < DFI_MAX; ++i)
if (c == dump_file[i].debug_switch)
{
dump_file[i].enabled = 1;
matched = 1;
}
if (! matched)
warning ("unrecognized gcc debugging option: %c", c);
break; break;
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment