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