X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Fpseudo_irg.c;h=a824fb21077bf2cde1db08f6d18e43526b3562e1;hb=6d0764bb31c3b05471dba739a08427a736e551a7;hp=8968d2fd560641f25b42a12f53a8b95f41ff7cd6;hpb=9f71f57db4ce9689e146ab36c21a84dec5c05857;p=libfirm diff --git a/ir/ir/pseudo_irg.c b/ir/ir/pseudo_irg.c index 8968d2fd5..a824fb210 100644 --- a/ir/ir/pseudo_irg.c +++ b/ir/ir/pseudo_irg.c @@ -35,18 +35,21 @@ /* Returns the number of pseudo graphs in the program. */ -int get_irp_n_pseudo_irgs(void) { +int get_irp_n_pseudo_irgs(void) +{ assert (irp && irp->pseudo_graphs); return ARR_LEN(irp->pseudo_graphs); } /* Returns the pos'th pseudo graph in the program. */ -ir_graph *get_irp_pseudo_irg(int pos) { +ir_graph *get_irp_pseudo_irg(int pos) +{ assert(0 <= pos && pos <= get_irp_n_pseudo_irgs()); return irp->pseudo_graphs[pos]; } -void add_irp_pseudo_irg(ir_graph *irg) { +void add_irp_pseudo_irg(ir_graph *irg) +{ assert (irp && irp->pseudo_graphs); ARR_APP1(ir_graph *, irp->pseudo_graphs, irg); } @@ -57,15 +60,16 @@ void add_irp_pseudo_irg(ir_graph *irg) { * The pseudo representation can only be used for analyses. It may not be * optimized. Pseudo graphs are kept in a separate graph list in irprog. */ -ir_graph * -new_pseudo_ir_graph(ir_entity *ent, int n_loc) { +ir_graph *new_pseudo_ir_graph(ir_entity *ent, int n_loc) +{ ir_graph *res = new_r_ir_graph(ent, n_loc); add_irp_pseudo_irg(res); /* remember this graph global. */ return res; } /* Returns non-zero ir ir_graph is pseudo graph. */ -int is_pseudo_ir_graph(ir_graph *irg) { +int is_pseudo_ir_graph(ir_graph *irg) +{ int i, n_pseudo_irgs; assert(irg && "nothing here"); @@ -81,10 +85,12 @@ int is_pseudo_ir_graph(ir_graph *irg) { static int visit_pseudo_irgs = 0; -void set_visit_pseudo_irgs(int x) { +void set_visit_pseudo_irgs(int x) +{ visit_pseudo_irgs = x; } -int get_visit_pseudo_irgs(void) { +int get_visit_pseudo_irgs(void) +{ return visit_pseudo_irgs; }