no need to pass environment stuff aroudn that can be retireved from irg
[libfirm] / ir / be / ia32 / ia32_transform.c
index b6c1828..f580cc9 100644 (file)
@@ -4671,7 +4671,7 @@ static ir_node *gen_Proj_CopyB(ir_node *node)
        long     proj      = get_Proj_proj(node);
 
        switch (proj) {
-       case pn_CopyB_M_regular:
+       case pn_CopyB_M:
                if (is_ia32_CopyB_i(new_pred)) {
                        return new_rd_Proj(dbgi, new_pred, mode_M, pn_ia32_CopyB_i_M);
                } else if (is_ia32_CopyB(new_pred)) {
@@ -5779,90 +5779,6 @@ static void ia32_pretransform_node(void)
        get_fpcw();
 }
 
-/**
- * Walker, checks if all ia32 nodes producing more than one result have their
- * Projs, otherwise creates new Projs and keeps them using a be_Keep node.
- */
-static void add_missing_keep_walker(ir_node *node, void *data)
-{
-       int              n_outs, i;
-       unsigned         found_projs = 0;
-       const ir_edge_t *edge;
-       ir_mode         *mode = get_irn_mode(node);
-       ir_node         *last_keep;
-       (void) data;
-       if (mode != mode_T)
-               return;
-       if (!is_ia32_irn(node))
-               return;
-
-       n_outs = arch_irn_get_n_outs(node);
-       if (n_outs <= 0)
-               return;
-       if (is_ia32_SwitchJmp(node))
-               return;
-
-       assert(n_outs < (int) sizeof(unsigned) * 8);
-       foreach_out_edge(node, edge) {
-               ir_node *proj = get_edge_src_irn(edge);
-               int      pn;
-
-               /* The node could be kept */
-               if (is_End(proj))
-                       continue;
-
-               if (get_irn_mode(proj) == mode_M)
-                       continue;
-
-               pn = get_Proj_proj(proj);
-               assert(pn < n_outs);
-               found_projs |= 1 << pn;
-       }
-
-
-       /* are keeps missing? */
-       last_keep = NULL;
-       for (i = 0; i < n_outs; ++i) {
-               ir_node                     *block;
-               ir_node                     *in[1];
-               const arch_register_req_t   *req;
-               const arch_register_class_t *cls;
-
-               if (found_projs & (1 << i)) {
-                       continue;
-               }
-
-               req = arch_get_out_register_req(node, i);
-               cls = req->cls;
-               if (cls == NULL) {
-                       continue;
-               }
-               if (cls == &ia32_reg_classes[CLASS_ia32_flags]) {
-                       continue;
-               }
-
-               block = get_nodes_block(node);
-               in[0] = new_r_Proj(node, arch_register_class_mode(cls), i);
-               if (last_keep != NULL) {
-                       be_Keep_add_node(last_keep, cls, in[0]);
-               } else {
-                       last_keep = be_new_Keep(block, 1, in);
-                       if (sched_is_scheduled(node)) {
-                               sched_add_after(node, last_keep);
-                       }
-               }
-       }
-}
-
-/**
- * Adds missing keeps to nodes. Adds missing Proj nodes for unused outputs
- * and keeps them.
- */
-void ia32_add_missing_keeps(ia32_code_gen_t *cg)
-{
-       irg_walk_graph(cg->irg, add_missing_keep_walker, NULL, NULL);
-}
-
 /**
  * Post-process all calls if we are in SSE mode.
  * The ABI requires that the results are in st0, copy them