diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-04 18:38:26 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-12-04 18:38:26 +0000 |
commit | e079344ab845d2ee93c9901248918af33465a841 (patch) | |
tree | 35aefaa1ad2d2d303da62a7eaf4a4ed7553419cf /gcc/cfghooks.c | |
parent | 859bc1da9b0c33c0a9c7ab8132bebb450b6eab61 (diff) | |
download | gcc-e079344ab845d2ee93c9901248918af33465a841.tar.gz |
* rtl.h (print_insn_with_notes): Remove prototype.
(rtl_dump_bb_for_graph): New prototype.
* sched-vis.c (print_insn_with_notes): Make static again. Fix
printing of notes.
(rtl_dump_bb_for_graph): New function.
* cfghooks.h (struct cfg_hooks) <dump_bb_for_graph>: New hook.
(dump_bb_for_graph): New prototype.
* cfghooks.c (dump_bb_for_graph): New function.
* tree-cfg.c (gimple_cfg_hooks): Register gimple_dump_bb_for_graph
as dump_bb_for_graph hook implementation for GIMPLE.
* cfgrtl.c (rtl_cfg_hooks): Likewise for rtl_dump_bb_for_graph.
(cfg_layout_rtl_cfg_hooks): Likewise.
* graph.c (draw_cfg_node): Don't include sbitmap.h, rtl.h, tree.h,
gimple.h, and gimple-pretty-print.h.
(draw_cfg_node, draw_cfg_node_succ_edges): Use the uniqe function
definition number instead of the function declaration UID.
(print_graph_cfg): Take a struct function instead of a tree.
Use the dump_bb_for_graph hook to dump the basic block content.
* graph.h (print_graph_cfg): Update prototype.
* passes.c (execute_function_dump): Update print_graph_cfg call.
* Makefile.in (graph.o): Fixup dependencies.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@194157 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cfghooks.c')
-rw-r--r-- | gcc/cfghooks.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c index dfeff083123..f0957316062 100644 --- a/gcc/cfghooks.c +++ b/gcc/cfghooks.c @@ -280,6 +280,22 @@ dump_bb (FILE *outf, basic_block bb, int indent, int flags) fputc ('\n', outf); } +/* Dumps basic block BB to pretty-printer PP, for use as a label of + a DOT graph record-node. The implementation of this hook is + expected to write the label to the stream that is attached to PP. + Field separators between instructions are pipe characters printed + verbatim. Instructions should be written with some characters + escaped, using pp_write_text_as_dot_label_to_stream(). */ + +void +dump_bb_for_graph (pretty_printer *pp, basic_block bb) +{ + if (!cfg_hooks->dump_bb_for_graph) + internal_error ("%s does not support dump_bb_for_graph", + cfg_hooks->name); + cfg_hooks->dump_bb_for_graph (pp, bb); +} + /* Dump the complete CFG to FILE. FLAGS are the TDF_* flags in dumpfile.h. */ void dump_flow_info (FILE *file, int flags) |