Commit 71ac39d7 authored by Moritz Kroll's avatar Moritz Kroll
Browse files

irio: Also dump the frame types of irgs

[r25520]
parent 681347ab
......@@ -2559,6 +2559,12 @@ typedef void class_walk_func(ir_type *clss, void *env);
* Does not touch frame types or types for value params ... */
void type_walk(type_walk_func *pre, type_walk_func *post, void *env);
/** Touches every type, entity, and frame types in unspecified order. If new
* types/entities are created during the traversal these will
* be visited, too.
* Does not touch types for value params ... (??) */
void type_walk_plus_frames(type_walk_func *pre, type_walk_func *post, void *env);
/** Walks over all type information reachable from an ir graph.
*
* Walks over all type information reachable from irg, i.e., starts a
......
......@@ -487,7 +487,7 @@ void ir_export(const char *filename)
fputs("typegraph {\n", env.file);
type_walk(NULL, export_type_or_ent, &env);
type_walk_plus_frames(NULL, export_type_or_ent, &env);
/* TODO: Visit frame types and "types for value params"? */
for(i = 0; i < n_irgs; i++)
......
......@@ -276,6 +276,19 @@ void type_walk(type_walk_func *pre, type_walk_func *post, void *env) {
do_type_walk(cont, pre, post, env);
}
void type_walk_plus_frames(type_walk_func *pre, type_walk_func *post, void *env) {
int i, n_irgs = get_irp_n_irgs();
type_or_ent cont;
type_walk(pre, post, env);
for (i = 0; i < n_irgs; ++i) {
ir_graph *irg = get_irp_irg(i);
cont.typ = get_irg_frame_type(irg);
do_type_walk(cont, pre, post, env);
}
}
void type_walk_irg(ir_graph *irg,
type_walk_func *pre,
type_walk_func *post,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment