-/* Copyright (C) 1998 - 2000 by Universitaet Karlsruhe
-* All rights reserved.
-*
-* Authors: Martin Trapp, Christian Schaefer
-*
-* irdump.h: dumping of an intermediate representation graph
-*/
+/*
+ * Project: libFIRM
+ * File name: ir/ir/irdump.c
+ * Purpose: Write vcg representation of firm to file.
+ * Author: Martin Trapp, Christian Schaefer
+ * Modified by: Goetz Lindenmaier, Hubert Schmidt
+ * Created:
+ * CVS-ID: $Id$
+ * Copyright: (c) 1998-2003 Universität Karlsruhe
+ * Licence: This file protected by GPL - GNU GENERAL PUBLIC LICENSE.
+ */
-/* $Id$ */
#ifdef HAVE_CONFIG_H
# include <config.h>
} else if (get_irn_opcode(n) == iro_SymConst) {
if (get_SymConst_kind(n) == linkage_ptr_info) {
/* don't use get_SymConst_ptr_info as it mangles the name. */
- fprintf (F, "SymC %s", id_to_str(get_SymConst_ptrinfo(n)));
+ fprintf (F, "SymC %s", get_id_str(get_SymConst_ptrinfo(n)));
} else {
assert(get_kind(get_SymConst_type(n)) == k_type);
assert(get_type_ident(get_SymConst_type(n)));
- fprintf (F, "SymC %s ", id_to_str(get_type_ident(get_SymConst_type(n))));
+ fprintf (F, "SymC %s ", get_id_str(get_type_ident(get_SymConst_type(n))));
if (get_SymConst_kind(n) == type_tag)
fprintf (F, "tag");
else
/* all others */
} else {
- fprintf (F, "%s", id_to_str(get_irn_opident(n)));
+ fprintf (F, "%s", get_id_str(get_irn_opident(n)));
}
}
case iro_Shr:
case iro_Abs:
case iro_Cmp:
- fprintf (F, "%s", id_to_str(get_mode_ident(get_irn_mode(n))));
+ fprintf (F, "%s", get_id_str(get_mode_ident(get_irn_mode(n))));
break;
default:
;
switch (get_irn_opcode(n)) {
case iro_Start:
if (false && interprocedural_view) {
- fprintf (F, "%s", id_to_str(get_entity_ident(get_irg_ent(current_ir_graph))));
+ fprintf (F, "%s", get_id_str(get_entity_ident(get_irg_ent(current_ir_graph))));
}
break;
case iro_Proj:
fprintf(F, "state: layout_fixed,\n");
}
if (get_type_mode(tp))
- fprintf(F, "mode: %s,\n", id_to_str(get_mode_ident(get_type_mode(tp))));
+ fprintf(F, "mode: %s,\n", get_id_str(get_mode_ident(get_type_mode(tp))));
fprintf(F, "size: %dB,\n", get_type_size(tp));
}
static void print_type_node(type *tp) {
fprintf (F, "node: {title: ");
PRINT_TYPEID(tp);
- fprintf (F, " label: \"%s %s\"", id_to_str(get_type_tpop_nameid(tp)), id_to_str(get_type_ident(tp)));
+ fprintf (F, " label: \"%s %s\"", get_id_str(get_type_tpop_nameid(tp)), get_id_str(get_type_ident(tp)));
fprintf (F, " info1: \"");
print_type_info(tp);
fprintf (F, "\"");
PRINT_ENTID(ent); fprintf(F, "\"");
fprintf (F, DEFAULT_TYPE_ATTRIBUTE);
fprintf (F, "label: ");
- fprintf (F, "\"ent %s\" " ENTITY_NODE_ATTR , id_to_str(get_entity_ident(ent)));
+ fprintf (F, "\"ent %s\" " ENTITY_NODE_ATTR , get_id_str(get_entity_ident(ent)));
fprintf (F, "\n info1: \"\nid: "); PRINT_ENTID(ent);
fprintf (F, "\nallocation: ");
switch (get_entity_allocation(ent)) {
case existent: fprintf (F, "existent"); break;
}
fprintf(F, "\nname: %s\nld_name: %s",
- id_to_str(get_entity_ident(ent)),
- id_to_str(get_entity_ld_ident(ent)));
+ get_id_str(get_entity_ident(ent)),
+ get_id_str(get_entity_ld_ident(ent)));
fprintf(F, "\noffset: %d", get_entity_offset(ent));
if (is_method_type(get_entity_type(ent))) {
if (get_entity_irg(ent)) /* can be null */
ent = get_irg_ent(irg);
id = ent->ld_name ? ent->ld_name : ent->name;
/* Don't use get_entity_ld_ident (ent) as it computes the mangled name! */
- len = id_to_strlen (id);
- cp = id_to_str (id);
+ len = get_id_strlen (id);
+ cp = get_id_str (id);
if (dump_file_suffix)
fname = malloc (len + 5 + strlen(suffix) + strlen(dump_file_suffix));
else
int i;
fprintf(F, "graph: { title: %p label: %s status:clustered color:white \n",
- (void*) irg, id_to_str(get_entity_ident(get_irg_ent(irg))));
+ (void*) irg, get_id_str(get_entity_ident(get_irg_ent(irg))));
for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
ir_node * node = arr[i];
ident * irg_ident = get_entity_ident(get_irg_ent(entry->key));
fprintf(F, "graph: { title: %s label: %s status:clustered color:white \n",
- id_to_str(irg_ident), id_to_str(irg_ident));
+ get_id_str(irg_ident), get_id_str(irg_ident));
for (i = ARR_LEN(arr) - 1; i >= 0; --i) {
ir_node * node = arr[i];