From 74c0b452c2665b803968a21b556ae2be4a270737 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 10 Sep 2010 13:26:21 +0000 Subject: [PATCH] remove normalize_proj_nodes, Projs aren't in the wrong place anyway (or the verifier complains) [r27989] --- include/libfirm/irgraph.h | 3 --- ir/be/bemain.c | 3 --- ir/ir/irgraph.c | 25 ------------------------- ir/opt/gvn_pre.c | 4 ---- 4 files changed, 35 deletions(-) diff --git a/include/libfirm/irgraph.h b/include/libfirm/irgraph.h index 91eafb363..4f9ee0f55 100644 --- a/include/libfirm/irgraph.h +++ b/include/libfirm/irgraph.h @@ -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); diff --git a/ir/be/bemain.c b/ir/be/bemain.c index 87675db81..3f5dba5c0 100644 --- a/ir/be/bemain.c +++ b/ir/be/bemain.c @@ -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); diff --git a/ir/ir/irgraph.c b/ir/ir/irgraph.c index c5d93a071..726effadd 100644 --- a/ir/ir/irgraph.c +++ b/ir/ir/irgraph.c @@ -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) { diff --git a/ir/opt/gvn_pre.c b/ir/opt/gvn_pre.c index 00b62a7df..b3e09c691 100644 --- a/ir/opt/gvn_pre.c +++ b/ir/opt/gvn_pre.c @@ -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); -- 2.20.1