-static void concretize_Phi_type(ir_node *phi) {
- int i, n_preds = get_Phi_n_preds(phi);
- ir_node **pred = alloca(n_preds * sizeof(ir_node *));
- ir_node *nn;
- ir_type *totype, *fromtype;
-
- if (n_preds == 0) return;
+/**
+ * Move Casts of the same type through a Phi node, i.e.
+ * Phi(Cast(type, x_0), ..., Cast(type, x_n)) -> Cast(type, Phi(x_0, ..., x_n))
+ *
+ * @param phi the Phi node
+ *
+ * @return 1 if Cast's where moved
+ */
+static int concretize_Phi_type(ir_node *phi)
+{
+ int n_preds = get_Phi_n_preds(phi);
+ ir_node **pred = ALLOCAN(ir_node*, n_preds);
+ ir_node *nn, *blk;
+ ir_type *totype;
+ ir_type *fromtype;
+ int i;
+
+ if (n_preds == 0)
+ return 0;