void irg_walk(ir_node *node, irg_walk_func *pre, irg_walk_func *post, void *env) { ir_graph *irg = get_irn_irg(node); ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED); inc_irg_visited(irg); irg_walk_core(node, pre, post, env); ir_free_resources(irg, IR_RESOURCE_IRN_VISITED); }
void analyze_irg_args_weight(ir_graph *irg) { ir_entity *entity = get_irg_entity(irg); if (entity == NULL) return; assert(is_method_entity(entity)); if (entity->attr.mtd_attr.param_weight != NULL) return; ir_reserve_resources(irg, IR_RESOURCE_IRN_VISITED); inc_irg_visited(irg); analyze_method_params_weight(entity); ir_free_resources(irg, IR_RESOURCE_IRN_VISITED); }
void Worklist::walk_topological(ir_graph* irg, std::function<void (ir_node*, void*)> walker, void* env) { inc_irg_visited(irg); walk_topo_helper(get_irg_end(irg), walker, env); }