From: Boris Boesler Date: Fri, 22 Oct 2004 13:13:49 +0000 (+0000) Subject: new test: is_pseudo_ir_graph() X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=f3c095127529bf953d3d9861aeb77e45a2178964;p=libfirm new test: is_pseudo_ir_graph() [r4186] --- diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index b2ff20722..e64bacbb5 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -665,3 +665,20 @@ void (inc_irg_block_visited)(ir_graph *irg) { __inc_irg_block_visited(irg); } + +/* is irg a pseudo graph for analysis? */ +int is_pseudo_ir_graph(ir_graph *irg) +{ + int res = false; + entity *ent; + + assert(irg && "nothing here"); + assert(is_ir_graph(irg) && "no ir_graph given"); + + ent = get_irg_entity(irg); + if(visibility_external_allocated == get_entity_visibility(ent) + && peculiarity_existent == get_entity_peculiarity(ent)) { + res = true; + } + return(res); +} diff --git a/ir/ir/irgraph.h b/ir/ir/irgraph.h index bd32f8615..edceb0034 100644 --- a/ir/ir/irgraph.h +++ b/ir/ir/irgraph.h @@ -355,4 +355,7 @@ void inc_irg_block_visited (ir_graph *irg); unsigned long get_irg_block_visited (ir_graph *irg); void set_irg_block_visited (ir_graph *irg, unsigned long i); +/* is irg a pseudo graph for analysis? */ +int is_pseudo_ir_graph(ir_graph *irg); + # endif /* _IRGRAPH_H_ */