FILE *dot = fopen ("calls.dot", "w");
fprintf (dot, "digraph \"calls\" {\n");
- fprintf (dot, "\tgraph [rankdir=\"LR\", ordering=\"out\"];\n");
- fprintf (dot, "\tnode [shape = \"record\", style = \"filled\"];\n");
- fprintf (dot, "\tedge [color = \"black\"];\n");
- fprintf (dot, "\n");
- fprintf (dot, "\tsize = \"11, 7\";\n");
- fprintf (dot, "\trotate = \"90\";\n");
- fprintf (dot, "\tratio = \"fill\";\n");
+ fprintf (dot, "\tgraph [rankdir=\"LR\", ordering=\"out\", size=\"11, 7\", rotate=\"90\", ratio=\"fill\"];\n");
+ fprintf (dot, "\tnode [shape=\"record\", style=\"filled\"];\n");
+ fprintf (dot, "\tedge [color=\"black\"];\n");
fprintf (dot, "\n");
for (i = 0; i < get_irp_n_irgs (); i++) {
FILE *dot = fopen ("ecg.dot", "w");
fprintf (dot, "digraph \"ecg\" {\n");
- fprintf (dot, "\tnode [shape = \"record\", style = \"filled\"];\n");
- fprintf (dot, "\tedge [color = \"black\"];\n");
+ fprintf (dot, "\tgraph [rankdir=\"LR\", ordering=\"out\", size=\"11, 7\", rotate=\"90\", ratio=\"fill\"];\n");
+ fprintf (dot, "\tnode [shape=\"record\", style=\"filled\"];\n");
+ fprintf (dot, "\tedge [color=\"black\"];\n");
fprintf (dot, "\n");
- fprintf (dot, "\tsize = \"11, 7\";\n");
- fprintf (dot, "\trotate = \"90\";\n");
- fprintf (dot, "\tratio = \"fill\";\n");
- fprintf (dot, "\trankdir = \"LR\";\n");
fprintf (dot, "\n");
/* ir_graph *main_graph = get_irp_main_irg (); */
/*
$Log$
+ Revision 1.11 2004/12/15 09:18:18 liekweg
+ pto_name.c
+
Revision 1.10 2004/12/06 12:55:06 liekweg
actually iterate
case (iro_Call): /* FALLTHROUGH */
case (iro_Load): /* FALLTHROUGH */
case (iro_Const): /* FALLTHROUGH */
- case (iro_SymConst): return (get_node_pto (node));
+ case (iro_SymConst):{
+ pto_t *pto = get_node_pto (node);
+ assert (pto);
+ return (pto);
+ }
default:
/* stopgap measure */
fprintf (stderr, "%s: not handled: node[%li].op = %s\n",
return;
}
+ /* TODO: ONLY LOAD IFF LOAD.ENT.MODE == MODE_P */
+
entity *ent = get_ptr_ent (ptr);
- pto_t *ptr_pto = get_pto (ptr, pto_env);
- assert (ptr_pto);
+ if (mode_P == get_type_mode (get_entity_type (ent))) {
- DBGPRINT (1, (stdout, "%s (%s[%li]): ptr = %p\n", __FUNCTION__,
- OPNAME (ptr), OPNUM (ptr), (void*) ptr_pto));
+ pto_t *ptr_pto = get_pto (ptr, pto_env);
- pto_env->change |= mod_load (load, ent, ptr_pto);
+ HERE ("ptr");
+
+ assert (ptr_pto);
+
+ DBGPRINT (1, (stdout, "%s (%s[%li]): ptr = %p\n", __FUNCTION__,
+ OPNAME (ptr), OPNUM (ptr), (void*) ptr_pto));
+
+ pto_env->change |= mod_load (load, ent, ptr_pto);
+ }
}
static void pto_store (ir_node *store, pto_env_t *pto_env)
entity *ent = get_irg_entity (graph);
const char *ent_name = (char*) get_entity_name (ent);
const char *own_name = (char*) get_type_name (get_entity_owner (ent));
- /* HERE3 ("start", own_name, ent_name); */
+ HERE3 ("start", own_name, ent_name);
irg_walk_mem (graph, pto_node_pre, pto_node_post, pto_env);
- /* HERE3 ("end ", own_name, ent_name); */
+ HERE3 ("end ", own_name, ent_name);
}
/* Continue PTO for one of the graphs called at a Call */
\f
/*
$Log$
+ Revision 1.8 2004/12/15 09:18:18 liekweg
+ pto_name.c
+
Revision 1.7 2004/12/06 12:55:06 liekweg
actually iterate
entity *ent = get_SymConst_entity (symconst);
desc_t *desc = NULL;
- /* ok, so if the symconst has a pointer-to-mumble, it's some address
+ /*
+ const char *ent_name = (char*) get_entity_name (ent);
+ const char *own_name = (char*) get_type_name (get_entity_owner (ent));
+ HERE3 ("start", own_name, ent_name);
+ */
+ /* Ok, so if the symconst has a pointer-to-mumble, it's some address
calculation, but if it's the mumble itself, it's just the same,
except it's presumably a constant of mumble. In any case, we need to
branch on this. "How's that for object fucking oriented? --jwz" */
qset_insert (pto->values, desc);
+ /* HERE3 ("end", own_name, ent_name); */
+
return (pto);
}
const char *ent_name = (char*) get_entity_name (ent);
const char *own_name = (char*) get_type_name (get_entity_owner (ent));
- DBGPRINT (1, (stdout, "%s: init \"%s.%s\" for %i ctxs\n", __FUNCTION__,
+ DBGPRINT (0, (stdout, "%s: init \"%s.%s\" for %i ctxs\n", __FUNCTION__,
own_name, ent_name, n_ctxs));
/* HERE ("start"); */
\f
/*
$Log$
+ Revision 1.9 2004/12/15 09:18:18 liekweg
+ pto_name.c
+
Revision 1.8 2004/12/02 16:17:51 beck
fixed config.h include
}
}
} else if (array == desc->kind) {
- arr_desc_t *arr_desc = (arr_desc_t*) desc;
-
fprintf (stream, "|<arr>[]");
} else {
assert (0 && "invalid descriptor");
int col_idx = desc->col_idx;
float hue = (float) col_idx / (float) last_col_idx;
float sat = 1.000; /* 0.300 .. 1.000 */
- float val = 1.000; /* 0.300 .. 1.000 */
+ float val = 0.800; /* 0.300 .. 1.000 */
# define MAX_COLORS 12
if (last_col_idx > MAX_COLORS) {
col_idx = col_idx % MAX_COLORS;
hue = (float) col_idx / (float) MAX_COLORS;
- }
-# undef MAX_COLORS
- // re-adjust sat and val
- {
- const float sat_min = 0.200; /* 0.200 .. 0.400 */
- const float val_min = 0.300; /* 0.300 .. 0.400 */
+ // re-adjust sat and val
+ {
+ const float sat_min = 0.200; /* 0.200 .. 0.400 */
+ const float val_min = 0.300; /* 0.300 .. 0.400 */
- sat = sat_min + ((1.0 - sat_min) * sat);
- val = val_min + ((1.0 - val_min) * val);
+ sat = sat_min + ((1.0 - sat_min) * sat);
+ val = val_min + ((1.0 - val_min) * val);
+ }
}
+# undef MAX_COLORS
fprintf (stream, ", color=\"%01.3f, %01.3f, %01.3f\"", hue, sat, val);
}
fprintf (stream, ", fontcolor=\"%s\"", fontcolor);
+# else /* if defined PTO_COLOR */
+ fprintf (stream, ", color=\"lightgrey\"");
# endif /* defined PTO_COLOR */
/* end attributes */
}
assert (0 && "entry not found");
- } else if (desc->kind = array) {
+ } else if (desc->kind == array) {
arr_desc_t *arr_desc = (arr_desc_t*) desc;
return (arr_desc->value);
tp = get_pointer_points_to_type (tp);
assert (is_class_type (tp));
+ DBGPRINT (2, (stdout, "%s: new name for entity \"%s\"\n", __FUNCTION__,
+ get_entity_name (ent)));
+ DBGEXE (fflush (stdout));
+
assert (((allocation_static == get_entity_allocation (ent)) ||
(allocation_automatic == get_entity_allocation (ent))) &&
"not a static/automatic field");
\f
/*
$Log$
+ Revision 1.7 2004/12/15 09:18:18 liekweg
+ pto_name.c
+
Revision 1.6 2004/12/06 12:52:09 liekweg
colorize name dump