This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [RFC PATCH] Fix 15187


On Thu, 16 Sep 2004, Uros Bizjak wrote:
> 2004-09-16  Uros Bizjak  <uros@kss-loka.si>
>
>     * ifcvt.c (noce_try_cmove_arith): Exit early if total
>     insn_rtx_cost of both branches > BRANCH_COST

This is Ok for mainline.  Thanks.


> The patch was bootstrapped on i686 for c,c++, no regressions.

But in future, could you try to also build/test objc, java and g95?



> BTW: I think that cond_exec_process_if_block() function in ifcvt.c
> should be changed from using count_bb_insns() to use total_bb_rtx_cost()
> for the same reason that find_if_case_1() and find_if_case_2() were
> changed. Unfortunatelly, ix86 is !HAVE_conditional_execution, so I
> can't fix it.

This is intentional.  The cost of conditionally executing a sequence
of instructions is proportional to the number of instructions, not
their actual rtx_costs.  The cost of not executing a conditional
multiplication is approximately COSTS_N_INSNS(1), and not the cost
of the multiplication (hopefully :).

However, Richard Earnshaw has pointed out that recent ARM cores break
this assumption and have varying costs for conditionally not executing
instructions.  Hence, we may eventually need a "unexecuted_rtx_cost"
target hook, and a total_bb_unexecuted_rtx_cost function in ifcvt.c.

Roger
--


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]