X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=scripts%2Fir_spec.py;h=ac7e0bd5028bb3f1893a959d63d4c2d7a7186454;hb=b2c637a6ab6afb13b8d7f8073116efc5fa507fd7;hp=77444d2b1a385a4bf584afd8efff8180195b6b86;hpb=b856bc7f5572524a763ca6534321551d86db1ba3;p=libfirm diff --git a/scripts/ir_spec.py b/scripts/ir_spec.py index 77444d2b1..ac7e0bd50 100755 --- a/scripts/ir_spec.py +++ b/scripts/ir_spec.py @@ -128,14 +128,13 @@ Block = dict( res->attr.block.is_dead = 0; res->attr.block.is_mb_head = 1; - res->attr.block.has_label = 0; res->attr.block.irg = irg; res->attr.block.backedge = new_backedge_arr(irg->obst, arity); res->attr.block.in_cg = NULL; res->attr.block.cg_backedge = NULL; res->attr.block.extblk = NULL; res->attr.block.mb_depth = 0; - res->attr.block.label = 0; + res->attr.block.entity = NULL; set_Block_matured(res, 1); set_Block_block_visited(res, 0); @@ -276,10 +275,13 @@ CallBegin = dict( pinned = "yes", # TODO: attribute with call... attr_struct = "callbegin_attr", + attrs = [ + dict( + type = "ir_node*", + name = "call" + ) + ], java_noconstr = True, - init = ''' - res->attr.callbegin.call = call; - ''', ), Carry = dict( @@ -422,6 +424,7 @@ Div = dict( attr_struct = "divmod_attr", pinned = "exception", op_index = 1, + arity_override = "oparity_binary", d_post = ''' #if PRECISE_EXC_CONTEXT firm_alloc_frag_arr(res, op_Div, &res->attr.except.frag_arr); @@ -443,6 +446,7 @@ DivMod = dict( attr_struct = "divmod_attr", pinned = "exception", op_index = 1, + arity_override = "oparity_binary", d_post = ''' #if PRECISE_EXC_CONTEXT firm_alloc_frag_arr(res, op_DivMod, &res->attr.except.frag_arr); @@ -604,6 +608,7 @@ Mod = dict( attr_struct = "divmod_attr", pinned = "exception", op_index = 1, + arity_override = "oparity_binary", d_post = ''' #if PRECISE_EXC_CONTEXT firm_alloc_frag_arr(res, op_Mod, &res->attr.except.frag_arr); @@ -652,6 +657,13 @@ Phi = dict( attr_struct = "phi_attr", custom_is = True, java_noconstr = True, + + init = ''' + /* Memory Phis in endless loops must be kept alive. + As we can't distinguish these easily we keep all of them alive. */ + if (is_Phi(res) && mode == mode_M) + add_End_keepalive(get_irg_end(irg), res); + ''' ), Pin = dict( @@ -690,6 +702,7 @@ Quot = dict( attr_struct = "divmod_attr", pinned = "exception", op_index = 1, + arity_override = "oparity_binary", d_post = ''' #if PRECISE_EXC_CONTEXT firm_alloc_frag_arr(res, op_Quot, &res->attr.except.frag_arr);