X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fir%2Firgmod.c;h=c4612222453e8c70f929ff9f9e0e098a15202845;hb=e570f00fb465d212dde403160e97ab45d36d1d7e;hp=dbbc6962dc80a63e8f445c47ed5e4e23f112b50f;hpb=c2b4a9f3d77fda7989e9cbd6293b9f9f58f4221c;p=libfirm diff --git a/ir/ir/irgmod.c b/ir/ir/irgmod.c index dbbc6962d..c46122224 100644 --- a/ir/ir/irgmod.c +++ b/ir/ir/irgmod.c @@ -15,7 +15,7 @@ #endif # include "irvrfy.h" -# include "irflag.h" +# include "irflag_t.h" # include "irgwalk.h" # include "irnode_t.h" # include "irgraph_t.h" @@ -48,7 +48,11 @@ turn_into_tuple (ir_node *node, int arity) INLINE void exchange (ir_node *old, ir_node *nw) { - ir_node *block = old->in[0]; + ir_node *block; + + assert(get_irn_op(old)->opar != oparity_dynamic); + + block = old->in[0]; old->op = op_Id; old->in = NEW_ARR_D (ir_node *, current_ir_graph->obst, 2); @@ -56,9 +60,9 @@ exchange (ir_node *old, ir_node *nw) old->in[1] = nw; } -/**********************************************************************/ -/* Functionality for collect_phis */ -/**********************************************************************/ +/*--------------------------------------------------------------------*/ +/* Functionality for collect_phis */ +/*--------------------------------------------------------------------*/ static void clear_link (ir_node *n, void *env) { @@ -94,13 +98,14 @@ void collect_phiprojs(ir_graph *irg) { } -/**********************************************************************/ -/* Funcionality for part_block */ -/**********************************************************************/ - -/* Moves node and all predecessors of node from from_bl to to_bl. - Does not move predecessors of Phi nodes (or block nodes). */ +/*--------------------------------------------------------------------*/ +/* Functionality for part_block */ +/*--------------------------------------------------------------------*/ +/** + * Moves node and all predecessors of node from from_bl to to_bl. + * Does not move predecessors of Phi nodes (or block nodes). + */ static void move (ir_node *node, ir_node *from_bl, ir_node *to_bl) { int i; ir_node *proj, *pred; @@ -134,7 +139,7 @@ void part_block(ir_node *node) { ir_node *phi; /* Turn off optimizations so that blocks are not merged again. */ - int rem_opt = get_optimize(); + int rem_opt = get_opt_optimize(); set_optimize(0); /* Transform the control flow */