-/**
- * If we have PhiEs with unknown operands in a block
- * we have to make sure that some value is actually put onto the stack.
- *
- * @param state the x87 state
- * @param block the block that should be checked
- * @param pred_block check inputs from this predecessor block
- * @param pos index of pred_block
- */
-static void fix_unknown_phis(x87_state *state, ir_node *block,
- ir_node *pred_block, int pos)
-{
- ir_node *phi, *op;
-
- sched_foreach_Phi(block, phi) {
- ir_node *zero;
- const arch_register_t *reg;
- ia32_x87_attr_t *attr;
-
- op = get_Phi_pred(phi, pos);
- if (!is_ia32_Unknown_VFP(op))
- continue;
-
- reg = arch_get_irn_register(phi);
-
- /* create a zero at end of pred block */
- zero = new_bd_ia32_fldz(NULL, pred_block, ia32_reg_classes[CLASS_ia32_st].mode);
- x87_push(state, arch_register_get_index(reg), zero);
-
- attr = get_ia32_x87_attr(zero);
- attr->x87[2] = &ia32_st_regs[0];
-
- assert(is_ia32_fldz(zero));
- sched_add_before(sched_last(pred_block), zero);
-
- set_Phi_pred(phi, pos, zero);
- }
-} /* fix_unknown_phis */
-