X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=ir%2Fopt%2Fldstopt.c;h=6fd5f49f9841ae12c03336b60498ba2ffd4e971a;hb=f4ac1ed2019c0b00eb62af43890099dbf3edb748;hp=c9f84c866fea5045f5b1c3ff4fe3ab0873109a3f;hpb=39d8838df009224ae0b10046947854977d6db4b4;p=libfirm diff --git a/ir/opt/ldstopt.c b/ir/opt/ldstopt.c index c9f84c866..6fd5f49f9 100644 --- a/ir/opt/ldstopt.c +++ b/ir/opt/ldstopt.c @@ -215,7 +215,7 @@ static void collect_nodes(ir_node *node, void *env) if (is_Proj(proj)) { pred = get_Proj_pred(proj); - is_exc = get_Proj_proj(proj) == pn_Generic_X_except; + is_exc = is_x_except_Proj(proj); } /* ignore Bad predecessors, they will be removed later */ @@ -1480,7 +1480,10 @@ static unsigned optimize_store(ir_node *store) static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv) { int i, n; - ir_node *store, *old_store, *ptr, *block, *phi_block, *phiM, *phiD, *exc, *projM; + ir_node *store, *ptr, *block, *phi_block, *phiM, *phiD, *exc, *projM; +#ifdef DO_CACHEOPT + ir_node *old_store; +#endif ir_mode *mode; ir_node **inM, **inD, **projMs; int *idx; @@ -1503,7 +1506,9 @@ static unsigned optimize_phi(ir_node *phi, walk_env_t *wenv) return 0; store = skip_Proj(projM); +#ifdef DO_CACHEOPT old_store = store; +#endif if (!is_Store(store)) return 0; @@ -1814,7 +1819,6 @@ static unsigned hash_cache_entry(const avail_entry_t *entry) static void move_loads_out_of_loops(scc *pscc, loop_env *env) { ir_node *phi, *load, *next, *other, *next_other; - ir_entity *ent; int j; phi_entry *phi_list = NULL; set *avail; @@ -1870,7 +1874,6 @@ static void move_loads_out_of_loops(scc *pscc, loop_env *env) /* for now, we can only move Load(Global) */ if (! is_Global(ptr)) continue; - ent = get_Global_entity(ptr); load_mode = get_Load_mode(load); for (other = pscc->head; other != NULL; other = next_other) { node_entry *ne = get_irn_ne(other, env); @@ -2283,8 +2286,8 @@ int optimize_load_store(ir_graph *irg) /* Handle graph state */ if (env.changes) { - set_irg_outs_inconsistent(irg); set_irg_entity_usage_state(irg, ir_entity_usage_not_computed); + edges_deactivate(irg); } if (env.changes & CF_CHANGED) {