remove normalize_proj_nodes, Projs aren't in the wrong place anyway (or the verifier...
authorMatthias Braun <matze@braunis.de>
Fri, 10 Sep 2010 13:26:21 +0000 (13:26 +0000)
committerMatthias Braun <matze@braunis.de>
Fri, 10 Sep 2010 13:26:21 +0000 (13:26 +0000)
[r27989]

include/libfirm/irgraph.h
ir/be/bemain.c
ir/ir/irgraph.c
ir/opt/gvn_pre.c

index 91eafb3..4f9ee0f 100644 (file)
@@ -539,9 +539,6 @@ FIRM_API void clear_irg_state(ir_graph *irg, ir_graph_state_t state);
 /** query wether a set of graph state flags are activated */
 FIRM_API int is_irg_state(const ir_graph *irg, ir_graph_state_t state);
 
-/** Normalization: Move Proj nodes into the same block as its predecessors */
-FIRM_API void normalize_proj_nodes(ir_graph *irg);
-
 /** Set a description for local value n. */
 FIRM_API void set_irg_loc_description(ir_graph *irg, int n, void *description);
 
index 87675db..3f5dba5 100644 (file)
@@ -447,9 +447,6 @@ static void initialize_birg(be_irg_t *birg, ir_graph *irg, be_main_env_t *env)
        /* set the current graph (this is important for several firm functions) */
        current_ir_graph = irg;
 
-       /* Normalize proj nodes. */
-       normalize_proj_nodes(irg);
-
        /* we do this before critical edge split. As this produces less returns,
           because sometimes (= 164.gzip) multiple returns are slower */
        normalize_n_returns(irg);
index c5d93a0..726effa 100644 (file)
@@ -906,31 +906,6 @@ void set_irg_fp_model(ir_graph *irg, unsigned model)
        irg->fp_model = model;
 }
 
-/**
- * walker Start->End: places Proj nodes into the same block
- * as it's predecessors
- *
- * @param n    the node
- * @param env  ignored
- */
-static void normalize_proj_walker(ir_node *n, void *env)
-{
-       (void) env;
-       if (is_Proj(n)) {
-               ir_node *pred  = get_Proj_pred(n);
-               ir_node *block = get_nodes_block(pred);
-
-               set_nodes_block(n, block);
-       }
-}
-
-/* move Proj nodes into the same block as its predecessors */
-void normalize_proj_nodes(ir_graph *irg)
-{
-       irg_walk_graph(irg, NULL, normalize_proj_walker, NULL);
-       set_irg_outs_inconsistent(irg);
-}
-
 /* set a description for local value n */
 void set_irg_loc_description(ir_graph *irg, int n, void *description)
 {
index 00b62a7..b3e09c6 100644 (file)
@@ -815,10 +815,6 @@ void do_gvn_pre(ir_graph *irg)
        a_env.end_block   = get_irg_end_block(irg);
        a_env.pairs       = NULL;
 
-       /* Move Proj's into the same block as their args,
-          else we would assign the result to wrong blocks */
-       normalize_proj_nodes(irg);
-
        /* critical edges MUST be removed */
        remove_critical_cf_edges(irg);