From: Christian Würdig Date: Wed, 3 May 2006 13:30:05 +0000 (+0000) Subject: do not emit contraint copy for set X-Git-Url: http://nsz.repo.hu/git/?a=commitdiff_plain;h=0782ca1c008b63eac8086cb9ad994860ae5314e9;p=libfirm do not emit contraint copy for set --- diff --git a/ir/be/ia32/bearch_ia32.c b/ir/be/ia32/bearch_ia32.c index 54d8bc862..ee2ca8809 100644 --- a/ir/be/ia32/bearch_ia32.c +++ b/ir/be/ia32/bearch_ia32.c @@ -510,6 +510,14 @@ static void ia32_prepare_graph(void *self) { DEBUG_ONLY(cg->mod = old_mod;) } +static INLINE int need_constraint_copy(ir_node *irn) { + return \ + ! is_ia32_Lea(irn) && \ + ! is_ia32_Conv_I2I(irn) && \ + ! is_ia32_Conv_I2I8Bit(irn) && \ + ! is_ia32_CMov(irn) && \ + ! is_ia32_Set(irn); +} /** * Insert copies for all ia32 nodes where the should_be_same requirement @@ -535,9 +543,7 @@ static void ia32_finish_node(ir_node *irn, void *env) { block = get_nodes_block(irn); /* check all OUT requirements, if there is a should_be_same */ - if ((op_tp == ia32_Normal || op_tp == ia32_AddrModeS) && - ! is_ia32_Lea(irn) && ! is_ia32_Conv_I2I(irn) && ! is_ia32_Conv_I2I8Bit(irn) && - ! is_ia32_CMov(irn)) + if ((op_tp == ia32_Normal || op_tp == ia32_AddrModeS) && need_constraint_copy(irn)) { for (i = 0; i < n_res; i++) { if (arch_register_req_is(&(reqs[i]->req), should_be_same)) {