X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgwalk.c;h=3cebf32ef06a644f1907f7cc04daae9c69218944;hb=69d11aa49aa17358468bbb2f5506ef5f009514e9;hp=732ae4e6e2b756ad1f1519770cc61d4d49556e4a;hpb=3e1337f622b15ca6edf9d40e588444bee3418ccd;p=libfirm diff --git a/ir/ir/irgwalk.c b/ir/ir/irgwalk.c index 732ae4e6e..3cebf32ef 100644 --- a/ir/ir/irgwalk.c +++ b/ir/ir/irgwalk.c @@ -43,13 +43,15 @@ #include "pset_new.h" #include "array.h" +#ifdef INTERPROCEDURAL_VIEW /** * Walk over an interprocedural graph (callgraph). * Visits only graphs in irg_set. */ static void irg_walk_cg(ir_node * node, ir_visited_t visited, pset_new_t *irg_set, irg_walk_func *pre, - irg_walk_func *post, void * env) { + irg_walk_func *post, void * env) +{ int i; ir_graph * rem = current_ir_graph; ir_node * pred; @@ -117,7 +119,7 @@ static void irg_walk_cg(ir_node * node, ir_visited_t visited, current_ir_graph = rem; } - +#endif /** * Insert all ir_graphs in irg_set, that are (transitive) reachable. @@ -468,6 +470,7 @@ switch_irg(ir_node *n, int index) { return old_current; } +#ifdef INTERPROCEDURAL_VIEW static void cg_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env) { @@ -493,7 +496,6 @@ cg_walk_2(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void * env) } } -#ifdef INTERPROCEDURAL_VIEW /* Walks all irgs in interprocedural view. Visits each node only once. */ void cg_walk(irg_walk_func *pre, irg_walk_func *post, void *env) { int i; @@ -724,7 +726,8 @@ void walk_const_code(irg_walk_func *pre, irg_walk_func *post, void *env) { my_env.env = env; /* Walk all types that can contain constant entities. */ - walk_types_entities(get_glob_type(), &walk_entity, &my_env); + for (i = 0; i < IR_SEGMENT_COUNT; i++) + walk_types_entities(get_segment_type((ir_segment_t) i), &walk_entity, &my_env); n_types = get_irp_n_types(); for (i = 0; i < n_types; i++) walk_types_entities(get_irp_type(i), &walk_entity, &my_env);