From: Matthias Braun Date: Sat, 2 Jun 2007 21:04:22 +0000 (+0000) Subject: attempt to fix Leas being placed before barrier X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=adf4f66369a5bc8eb051a3911a1076241f4a47df;p=libfirm attempt to fix Leas being placed before barrier [r14276] --- diff --git a/ir/be/ia32/ia32_optimize.c b/ir/be/ia32/ia32_optimize.c index a30c88abf..600fb26f6 100644 --- a/ir/be/ia32/ia32_optimize.c +++ b/ir/be/ia32/ia32_optimize.c @@ -77,9 +77,7 @@ void ia32_pre_transform_phase(ia32_code_gen_t *cg) { - the psi condition tree transformer needs existing constants to be ia32 constants - the psi condition tree transformer inserts new firm constants which need to be transformed */ - //ia32_transform_all_firm_consts(cg); irg_walk_graph(cg->irg, NULL, ia32_transform_psi_cond_tree, cg); - //ia32_transform_all_firm_consts(cg); } /******************************************************************************************************** @@ -980,6 +978,10 @@ static ir_node *fold_addr(ia32_code_gen_t *cg, ir_node *irn) { /* ok, we can create a new LEA */ if (dolea) { res = new_rd_ia32_Lea(dbg_info, irg, block, base, index); + /* we don't want stuff before the barrier... */ + if(be_is_NoReg(cg, base) && be_is_NoReg(cg, index)) { + add_irn_dep(res, get_irg_frame(irg)); + } /* add the old offset of a previous LEA */ add_ia32_am_offs_int(res, offs);