diff options
author | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-20 12:25:55 +0000 |
---|---|---|
committer | Steven Bosscher <steven@gcc.gnu.org> | 2012-07-20 12:25:55 +0000 |
commit | c4669594047cb4a711e77a0ea53c139d9ed16f31 (patch) | |
tree | 303d907b5ee72aaa7b209fd1bcaf4f0ab16f41b1 /gcc/tree-cfg.c | |
parent | a09696774774031a39b305c94a71f3fc84140c45 (diff) | |
download | gcc-c4669594047cb4a711e77a0ea53c139d9ed16f31.zip gcc-c4669594047cb4a711e77a0ea53c139d9ed16f31.tar.gz gcc-c4669594047cb4a711e77a0ea53c139d9ed16f31.tar.bz2 |
basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
gcc/
* basic-block.h (BB_FLAGS_TO_PRESERVE): New define.
(brief_dump_cfg): Update prototype to take flags argument.
(check_bb_profile): Remove prototype.
* tracer.c (tracer): Update brief_dump_cfg calls.
* cfghooks.c (dump_bb): Do not pass TDF_COMMENT to dump_bb_info.
Call dump_bb_info before and after the cfghook dump_bb. Terminate
the dump with a newline.
(dump_flow_info): Do not call check_bb_profile.
* cfg.c (clear_bb_flags): Update using BB_FLAGS_TO_PRESERVE.
(check_bb_profile): Make static. Take indent and flags arguments.
(dump_bb_info): Always dump loop depth. With TDF_DETAILS, call
check_bb_profile. Print one edge per line.
(brief_dump_cfg): Take a flags argument, and filter out
TDF_COMMENT and TDF_DETAILS.
* pretty-print.c (pp_base_newline): Set pp_needs_newline to false.
* gimple-pretty-print.c (dump_gimple_bb_header): Do not use dump_bb_info
here, it is already called from dump_bb. Idem for check_bb_profile.
(dump_gimple_bb_footer): Likewise.
(gimple_dump_bb_buff): Call pp_flush after dump_gimple_stmt to
avoid broken dumps for statement histograms.
(gimple_dump_bb): Handle ENTRY_BLOCK and EXIT_BLOCK. Do
not call pp_flush here, the buffer should be empty.
* sched-rgn.c (debug_region): Pass TDF_BLOCKS to dump_bb.
* sched-vis.c (debug_bb_slim): Likewise.
* tree-cfg.c (remove_bb): Pass dump_flags to dump_bb.
(gimple_debug_bb): Pass TDF_BLOCKS to dump_bb.
(gimple_dump_cfg): Do brief_dump_cfg with TDF_COMMENT.
(dump_function_to_file): Do not call check_bb_profile on
ENTRY_BLOCK and EXIT_BLOCK, check_bb_profile doesn't handle them.
Use dump_bb instead of gimple_dump_bb.
(print_loops_bb): Use dump_bb instead of gimple_dump_bb.
* passes.c (execute_function_dump): Always call print_rtl_with_bb
for RTL dumps.
* cfgrtl.c (print_rtl_with_bb): Handle printing without an up-to-date
CFG. With TDF_BLOCKS and TDF_DETAILS, do DF dumps at the top and bottom
of each basic block.
testsuite/
* gcc.dg/tree-prof/update-loopch.c: Look for counts on the dumps of
the basic block and check loop depth.
* gcc.dg/tree-ssa/pr18133-1.c: Dump details, not blocks. Update
matching patterns and comments.
* gcc.dg/tree-ssa/20031021-1.c: Fix check patterns.
* gcc.dg/tree-ssa/vector-2.c: Likewise.
From-SVN: r189717
Diffstat (limited to 'gcc/tree-cfg.c')
-rw-r--r-- | gcc/tree-cfg.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index e4cf076..c9187b9 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -1844,7 +1844,7 @@ remove_bb (basic_block bb) fprintf (dump_file, "Removing basic block %d\n", bb->index); if (dump_flags & TDF_DETAILS) { - dump_bb (dump_file, bb, 0, 0); + dump_bb (dump_file, bb, 0, dump_flags); fprintf (dump_file, "\n"); } } @@ -2063,7 +2063,7 @@ find_case_label_for_value (gimple switch_stmt, tree val) void gimple_debug_bb (basic_block bb) { - dump_bb (stderr, bb, 0, TDF_VOPS|TDF_MEMSYMS); + dump_bb (stderr, bb, 0, TDF_VOPS|TDF_MEMSYMS|TDF_BLOCKS); } @@ -2103,7 +2103,7 @@ gimple_dump_cfg (FILE *file, int flags) fprintf (file, ";; \n%d basic blocks, %d edges, last basic block %d.\n\n", n_basic_blocks, n_edges, last_basic_block); - brief_dump_cfg (file); + brief_dump_cfg (file, flags | TDF_COMMENT); fprintf (file, "\n"); } @@ -6687,7 +6687,6 @@ dump_function_to_file (tree fn, FILE *file, int flags) if (cfun && cfun->decl == fn && cfun->cfg && basic_block_info) { /* If the CFG has been built, emit a CFG-based dump. */ - check_bb_profile (ENTRY_BLOCK_PTR, file); if (!ignore_topmost_bind) fprintf (file, "{\n"); @@ -6695,10 +6694,9 @@ dump_function_to_file (tree fn, FILE *file, int flags) fprintf (file, "\n"); FOR_EACH_BB (bb) - gimple_dump_bb (file, bb, 2, flags); + dump_bb (file, bb, 2, flags | TDF_COMMENT); fprintf (file, "}\n"); - check_bb_profile (EXIT_BLOCK_PTR, file); } else if (DECL_SAVED_TREE (fn) == NULL) { @@ -6821,7 +6819,7 @@ print_loops_bb (FILE *file, basic_block bb, int indent, int verbosity) if (verbosity >= 3) { fprintf (file, "%s {\n", s_indent); - gimple_dump_bb (file, bb, indent + 4, TDF_VOPS|TDF_MEMSYMS); + dump_bb (file, bb, indent + 4, TDF_VOPS|TDF_MEMSYMS); fprintf (file, "%s }\n", s_indent); } } |