summaryrefslogtreecommitdiff
path: root/gcc/haifa-sched.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-30 09:46:02 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-11-30 09:46:02 +0000
commit3d9a4504e8d172ab8eb64859625aea9d0cc3d461 (patch)
tree4b15801bec76c3248ce31b82175d9ddd088a20d7 /gcc/haifa-sched.c
parent5a5c6968e652d7bbc90ef4ad5d7f5eb9ef3bace3 (diff)
downloadgcc-3d9a4504e8d172ab8eb64859625aea9d0cc3d461.tar.gz
* coretypes.h (struct pretty_print_info): Make a coretype.
(typedef pretty_printer): Likewise. * pretty-print.h (typedef pretty_printer): Not needed here anymore. * pretty-print.c (pp_write_text_as_dot_label_to_stream): New function. * rtl.h (str_pattern_slim): New prototype. (print_value, print_pattern, print_insn): Adjust prototypes to take a pretty-printer rather than a char buffer. * sched-vis.c (safe_concat): Remove. (print_exp): Print into a pretty-printer. (print_value): Likewise. (print_pattern): Likewise. (print_insn): Likewise. (print_insn_with_notes): New static function. (init_rtl_slim_pretty_print): New function. (dump_value_slim): Simplify. Print into and flush a pretty-printer. (dump_insn_slim): Likewise. (dump_rtl_slim): Likewise. (str_pattern_slim): New function. * haifa-sched.c (model_recompute): Use str_pattern_slim instead of static buffers. (model_record_pressures): Likewise. (schedule_insn): Likewise. * sel-sched-dump.c (dump_insn_rtx_1): Likewise. (sel_prepare_string_for_dot_label): Refer to graph.c CFG dumper code. * graph.c: Include pretty-print.h. (init_graph_slim_pretty_print): New function. (print_escaped_line): Removed here, and reincarnated as pp_write_text_as_dot_label_to_stream. (draw_cfg_node): Print into a pretty printer. (draw_cfg_node_succ_edges): Likewise. (print_rtl_graph_with_bb): Likewise. * Makefile.in (graph.o): Fix dependencies. (tree-optimize.o, toplev.o, sched-vis.o): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/haifa-sched.c')
-rw-r--r--gcc/haifa-sched.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index c835bf82622..ad7e08eb00a 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -2168,8 +2168,6 @@ model_recompute (rtx insn)
if (sched_verbose >= 5)
{
- char buf[2048];
-
if (!print_p)
{
fprintf (sched_dump, MODEL_BAR);
@@ -2179,9 +2177,9 @@ model_recompute (rtx insn)
print_p = true;
}
- print_pattern (buf, PATTERN (insn), 0);
fprintf (sched_dump, ";;\t\t| %3d %4d %-30s ",
- point, INSN_UID (insn), buf);
+ point, INSN_UID (insn),
+ str_pattern_slim (PATTERN (insn)));
for (pci = 0; pci < ira_pressure_classes_num; pci++)
{
cl = ira_pressure_classes[pci];
@@ -3343,18 +3341,16 @@ model_record_pressures (struct model_insn_info *insn)
point = model_index (insn->insn);
if (sched_verbose >= 2)
{
- char buf[2048];
-
if (point == 0)
{
fprintf (sched_dump, "\n;;\tModel schedule:\n;;\n");
fprintf (sched_dump, ";;\t| idx insn | mpri hght dpth prio |\n");
}
- print_pattern (buf, PATTERN (insn->insn), 0);
fprintf (sched_dump, ";;\t| %3d %4d | %4d %4d %4d %4d | %-30s ",
point, INSN_UID (insn->insn), insn->model_priority,
insn->depth + insn->alap, insn->depth,
- INSN_PRIORITY (insn->insn), buf);
+ INSN_PRIORITY (insn->insn),
+ str_pattern_slim (PATTERN (insn->insn)));
}
calculate_reg_deaths (insn->insn, death);
reg_pressure = INSN_REG_PRESSURE (insn->insn);
@@ -3715,12 +3711,9 @@ schedule_insn (rtx insn)
if (sched_verbose >= 1)
{
struct reg_pressure_data *pressure_info;
- char buf[2048];
-
- print_insn (buf, insn, 0);
- buf[40] = 0;
fprintf (sched_dump, ";;\t%3i--> %s%-40s:",
- clock_var, (*current_sched_info->print_insn) (insn, 1), buf);
+ clock_var, (*current_sched_info->print_insn) (insn, 1),
+ str_pattern_slim (PATTERN (insn)));
if (recog_memoized (insn) < 0)
fprintf (sched_dump, "nothing");