Remove be_get_old_anchor(), it is not necessary.
authorChristoph Mallon <christoph.mallon@gmx.de>
Wed, 8 Oct 2008 16:14:25 +0000 (16:14 +0000)
committerChristoph Mallon <christoph.mallon@gmx.de>
Wed, 8 Oct 2008 16:14:25 +0000 (16:14 +0000)
[r22618]

ir/be/betranshlp.c
ir/be/betranshlp.h
ir/be/ia32/ia32_transform.c

index f18cdb9..13382e1 100644 (file)
@@ -234,11 +234,6 @@ ir_node *be_pre_transform_node(ir_node *place) {
        return be_transform_node(place);
 }
 
-ir_node *be_get_old_anchor(int anchor)
-{
-       return get_irn_n(env.old_anchor, anchor);
-}
-
 static void pre_transform_anchor(int anchor)
 {
        ir_node *old_anchor_node = get_irn_n(env.old_anchor, anchor);
index eb5663b..68552b0 100644 (file)
@@ -48,11 +48,6 @@ ir_node *be_pre_transform_node(ir_node *place);
  */
 ir_node *be_transform_node(ir_node *node);
 
-/**
- * returns an anchor from the graph before the transformation
- */
-ir_node *be_get_old_anchor(int anchor);
-
 /**
  * Duplicate all dependency edges of a node.
  */
index 5b9feb2..302902c 100644 (file)
@@ -4498,18 +4498,19 @@ static ir_node *gen_Proj(ir_node *node) {
                return gen_Proj_Bound(node);
        case iro_Start:
                proj = get_Proj_proj(node);
-               if (proj == pn_Start_X_initial_exec) {
-                       ir_node *block = get_nodes_block(pred);
-                       dbg_info *dbgi = get_irn_dbg_info(node);
-                       ir_node *jump;
-
-                       /* we exchange the ProjX with a jump */
-                       block = be_transform_node(block);
-                       jump  = new_rd_Jmp(dbgi, current_ir_graph, block);
-                       return jump;
-               }
-               if (node == be_get_old_anchor(anchor_tls)) {
-                       return gen_Proj_tls(node);
+               switch (proj) {
+                       case pn_Start_X_initial_exec: {
+                               ir_node  *block     = get_nodes_block(pred);
+                               ir_node  *new_block = be_transform_node(block);
+                               dbg_info *dbgi      = get_irn_dbg_info(node);
+                               /* we exchange the ProjX with a jump */
+                               ir_node  *jump      = new_rd_Jmp(dbgi, current_ir_graph, new_block);
+
+                               return jump;
+                       }
+
+                       case pn_Start_P_tls:
+                               return gen_Proj_tls(node);
                }
                break;