- fixed warning
[libfirm] / scripts / ir_spec.py
index 01b36e6..ac7e0bd 100755 (executable)
@@ -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(
@@ -655,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(