/* Output routines for graphical representation.
- Copyright (C) 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright (C) 1998, 1999, 2000, 2001, 2003, 2004
+ Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
This file is part of GCC.
#include "tm.h"
#include "rtl.h"
-#include "tree.h"
#include "flags.h"
#include "output.h"
#include "function.h"
-#include "langhooks.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "toplev.h"
case vcg:
fprintf (fp, "\
graph: { title: \"%s\"\nfolding: 1\nhidden: 2\nnode: { title: \"%s.0\" }\n",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- (*lang_hooks.decl_printable_name) (current_function_decl, 2));
+ current_function_name (), current_function_name ());
break;
case no_graph:
break;
fprintf (fp, "\
graph: {\ntitle: \"%s.BB%d\"\nfolding: 1\ncolor: lightblue\n\
label: \"basic block %d",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- bb, bb);
+ current_function_name (), bb, bb);
break;
case no_graph:
break;
case vcg:
fprintf (fp, "\
edge: { sourcename: \"%s.0\" targetname: \"%s.%d\" }\n",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- XINT (tmp_rtx, 0));
+ current_function_name (),
+ current_function_name (), XINT (tmp_rtx, 0));
break;
case no_graph:
break;
case vcg:
fprintf (fp, "node: {\n title: \"%s.%d\"\n color: %s\n \
label: \"%s %d\n",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- XINT (tmp_rtx, 0),
- GET_CODE (tmp_rtx) == NOTE ? "lightgrey"
- : GET_CODE (tmp_rtx) == INSN ? "green"
- : GET_CODE (tmp_rtx) == JUMP_INSN ? "darkgreen"
- : GET_CODE (tmp_rtx) == CALL_INSN ? "darkgreen"
- : GET_CODE (tmp_rtx) == CODE_LABEL ? "\
+ current_function_name (), XINT (tmp_rtx, 0),
+ NOTE_P (tmp_rtx) ? "lightgrey"
+ : NONJUMP_INSN_P (tmp_rtx) ? "green"
+ : JUMP_P (tmp_rtx) ? "darkgreen"
+ : CALL_P (tmp_rtx) ? "darkgreen"
+ : LABEL_P (tmp_rtx) ? "\
darkgrey\n shape: ellipse" : "white",
GET_RTX_NAME (GET_CODE (tmp_rtx)), XINT (tmp_rtx, 0));
break;
}
/* Print the RTL. */
- if (GET_CODE (tmp_rtx) == NOTE)
+ if (NOTE_P (tmp_rtx))
{
const char *name = "";
if (NOTE_LINE_NUMBER (tmp_rtx) < 0)
color = "color: green ";
fprintf (fp,
"edge: { sourcename: \"%s.%d\" targetname: \"%s.%d\" %s",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- from,
- (*lang_hooks.decl_printable_name) (current_function_decl, 2),
- to,
- color);
+ current_function_name (), from,
+ current_function_name (), to, color);
if (class)
fprintf (fp, "class: %d ", class);
fputs ("}\n", fp);
{
case vcg:
fprintf (fp, "node: { title: \"%s.999999\" label: \"END\" }\n}\n",
- (*lang_hooks.decl_printable_name) (current_function_decl, 2));
+ current_function_name ());
break;
case no_graph:
break;
if (start[INSN_UID (tmp_rtx)] < 0 && end[INSN_UID (tmp_rtx)] < 0)
{
- if (GET_CODE (tmp_rtx) == BARRIER)
+ if (BARRIER_P (tmp_rtx))
continue;
- if (GET_CODE (tmp_rtx) == NOTE
+ if (NOTE_P (tmp_rtx)
&& (1 || in_bb_p[INSN_UID (tmp_rtx)] == NOT_IN_BB))
continue;
}
{
/* Don't print edges to barriers. */
if (next_insn == 0
- || GET_CODE (next_insn) != BARRIER)
+ || !BARRIER_P (next_insn))
draw_edge (fp, XINT (tmp_rtx, 0),
next_insn ? INSN_UID (next_insn) : 999999, 0, 0);
else
do
next_insn = NEXT_INSN (next_insn);
while (next_insn
- && (GET_CODE (next_insn) == NOTE
- || GET_CODE (next_insn) == BARRIER));
+ && (NOTE_P (next_insn)
+ || BARRIER_P (next_insn)));
draw_edge (fp, XINT (tmp_rtx, 0),
next_insn ? INSN_UID (next_insn) : 999999, 0, 3);