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);
*/
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.
*/
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;