+
+ /* No need to introduce the copy, because it only lives in this block, but
+ * we have to update the liveness of all operands */
+ if (is_Block(node) ||
+ get_nodes_block(node) != get_nodes_block(flags_needed)) {
+ int i;
+
+ for (i = get_irn_arity(copy) - 1; i >= 0; --i) {
+ be_liveness_update(lv, get_irn_n(copy, i));
+ }
+ }
+}
+
+static int is_modify_flags(ir_node *node) {
+ int i, arity;
+
+ if (arch_irn_is(node, modify_flags))
+ return 1;
+ if(!be_is_Keep(node))
+ return 0;
+
+ arity = get_irn_arity(node);
+ for(i = 0; i < arity; ++i) {
+ ir_node *in = get_irn_n(node, i);
+ in = skip_Proj(in);
+ if (arch_irn_is(in, modify_flags))
+ return 1;
+ }
+
+ return 0;