diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-26 16:47:58 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-26 16:47:58 +0000 |
commit | f4b3647a2d4a6c1e7638d0ef8e16af439df68524 (patch) | |
tree | 5059e53a87ca0ad87ef8f5e4d61bdce408a23bc3 /gcc/print-rtl.c | |
parent | 7c5db9528380f04ca9bb1f9fca257c38da2df12b (diff) | |
download | gcc-f4b3647a2d4a6c1e7638d0ef8e16af439df68524.tar.gz |
gcc/
* doc/invoke.texi: Remove -dv documentation. Fix up graph dump related
documentation. Document the '-graph' dump option. Complete the '-slim'
dump option documentation.
* common.opt (Variable graph_dump_format): Remove.
* flag-types.h (enum graph_dump_types): Remove.
* flags.h (dump_for_graph): Remove.
* opts.c (decode_d_option): Remove -dv handling.
* sched-int.h (print_insn, print_pattern, print_value): Move prototypes
from here ...
* rtl.h: ...to here. Add note that these functions ought to be in
another file.
* sched-vis.c (print_insn): Add detailed dump for insn notes.
* print-rtl.c (dump_for_graph): Remove.
(print_rtx): Remove dump_for_graph related code.
* graph.c: Almost complete re-write to dump DOT (GraphViz) dumps
instead of VCG dumps.
* graph.h (print_rtl_graph_with_bb): Update prototype.
* passes.c (finish_optimization_passes): Fix profile dump finishing.
Unconditionally loop over graph dumps to finalize.
(execute_function_dump): Split code to dump graphs to separate block.
(execute_one_pass): Don't set TDF_GRAPH here, let the dump option
decoders do their job.
* ddg.c (vcg_print_ddg): Make it a DEBUG_FUNCTION.
* toplev.c: Don't include graph.h.
* tree-optimize.c: Don't include graph.h.
testsuite/
* testsuite/gcc.dg/20050811-1.c: Change -dv option to -graph option
to -fdump-rtl-all.
* testsuite/gcc.dg/pr37858.c: Remove -dv option.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193821 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/print-rtl.c')
-rw-r--r-- | gcc/print-rtl.c | 121 |
1 files changed, 47 insertions, 74 deletions
diff --git a/gcc/print-rtl.c b/gcc/print-rtl.c index c2a04a8bef5..75f93504c73 100644 --- a/gcc/print-rtl.c +++ b/gcc/print-rtl.c @@ -77,9 +77,6 @@ int flag_dump_unnumbered_links = 0; /* Nonzero means use simplified format without flags, modes, etc. */ int flag_simple = 0; -/* Nonzero if we are dumping graphical description. */ -int dump_for_graph; - #ifndef GENERATOR_FILE void print_mem_expr (FILE *outfile, const_tree expr) @@ -124,74 +121,62 @@ print_rtx (const_rtx in_rtx) is_insn = INSN_P (in_rtx); - /* When printing in VCG format we write INSNs, NOTE, LABEL, and BARRIER - in separate nodes and therefore have to handle them special here. */ - if (dump_for_graph - && (is_insn || NOTE_P (in_rtx) - || LABEL_P (in_rtx) || BARRIER_P (in_rtx))) - { - i = 3; - indent = 0; - } + /* Print name of expression code. */ + if (flag_simple && CONST_INT_P (in_rtx)) + fputc ('(', outfile); else - { - /* Print name of expression code. */ - if (flag_simple && CONST_INT_P (in_rtx)) - fputc ('(', outfile); - else - fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx))); + fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx))); - if (! flag_simple) - { - if (RTX_FLAG (in_rtx, in_struct)) - fputs ("/s", outfile); + if (! flag_simple) + { + if (RTX_FLAG (in_rtx, in_struct)) + fputs ("/s", outfile); - if (RTX_FLAG (in_rtx, volatil)) - fputs ("/v", outfile); + if (RTX_FLAG (in_rtx, volatil)) + fputs ("/v", outfile); - if (RTX_FLAG (in_rtx, unchanging)) - fputs ("/u", outfile); + if (RTX_FLAG (in_rtx, unchanging)) + fputs ("/u", outfile); - if (RTX_FLAG (in_rtx, frame_related)) - fputs ("/f", outfile); + if (RTX_FLAG (in_rtx, frame_related)) + fputs ("/f", outfile); - if (RTX_FLAG (in_rtx, jump)) - fputs ("/j", outfile); + if (RTX_FLAG (in_rtx, jump)) + fputs ("/j", outfile); - if (RTX_FLAG (in_rtx, call)) - fputs ("/c", outfile); + if (RTX_FLAG (in_rtx, call)) + fputs ("/c", outfile); - if (RTX_FLAG (in_rtx, return_val)) - fputs ("/i", outfile); + if (RTX_FLAG (in_rtx, return_val)) + fputs ("/i", outfile); - /* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */ - if ((GET_CODE (in_rtx) == EXPR_LIST - || GET_CODE (in_rtx) == INSN_LIST) - && (int)GET_MODE (in_rtx) < REG_NOTE_MAX) - fprintf (outfile, ":%s", - GET_REG_NOTE_NAME (GET_MODE (in_rtx))); + /* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */ + if ((GET_CODE (in_rtx) == EXPR_LIST + || GET_CODE (in_rtx) == INSN_LIST) + && (int)GET_MODE (in_rtx) < REG_NOTE_MAX) + fprintf (outfile, ":%s", + GET_REG_NOTE_NAME (GET_MODE (in_rtx))); - /* For other rtl, print the mode if it's not VOID. */ - else if (GET_MODE (in_rtx) != VOIDmode) - fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx))); + /* For other rtl, print the mode if it's not VOID. */ + else if (GET_MODE (in_rtx) != VOIDmode) + fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx))); #ifndef GENERATOR_FILE - if (GET_CODE (in_rtx) == VAR_LOCATION) - { - if (TREE_CODE (PAT_VAR_LOCATION_DECL (in_rtx)) == STRING_CST) - fputs (" <debug string placeholder>", outfile); - else - print_mem_expr (outfile, PAT_VAR_LOCATION_DECL (in_rtx)); - fputc (' ', outfile); - print_rtx (PAT_VAR_LOCATION_LOC (in_rtx)); - if (PAT_VAR_LOCATION_STATUS (in_rtx) - == VAR_INIT_STATUS_UNINITIALIZED) - fprintf (outfile, " [uninit]"); - sawclose = 1; - i = GET_RTX_LENGTH (VAR_LOCATION); - } -#endif + if (GET_CODE (in_rtx) == VAR_LOCATION) + { + if (TREE_CODE (PAT_VAR_LOCATION_DECL (in_rtx)) == STRING_CST) + fputs (" <debug string placeholder>", outfile); + else + print_mem_expr (outfile, PAT_VAR_LOCATION_DECL (in_rtx)); + fputc (' ', outfile); + print_rtx (PAT_VAR_LOCATION_LOC (in_rtx)); + if (PAT_VAR_LOCATION_STATUS (in_rtx) + == VAR_INIT_STATUS_UNINITIALIZED) + fprintf (outfile, " [uninit]"); + sawclose = 1; + i = GET_RTX_LENGTH (VAR_LOCATION); } +#endif } #ifndef GENERATOR_FILE @@ -217,14 +202,9 @@ print_rtx (const_rtx in_rtx) string: if (str == 0) - fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile); + fputs (" \"\"", outfile); else - { - if (dump_for_graph) - fprintf (outfile, " (\\\"%s\\\")", str); - else - fprintf (outfile, " (\"%s\")", str); - } + fprintf (outfile, " (\"%s\")", str); sawclose = 1; break; @@ -652,15 +632,8 @@ print_rtx (const_rtx in_rtx) break; } - if (dump_for_graph - && (is_insn || NOTE_P (in_rtx) - || LABEL_P (in_rtx) || BARRIER_P (in_rtx))) - sawclose = 0; - else - { - fputc (')', outfile); - sawclose = 1; - } + fputc (')', outfile); + sawclose = 1; } /* Print an rtx on the current line of FILE. Initially indent IND |