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: ifcvt conditional execution and rtx_cost


On Wed, 2004-07-07 at 14:08, Roger Sayle wrote:
> On Tue, 6 Jul 2004, David Edelsohn wrote:
> > 	With all of your recent rtx_cost changes and your patch for
> > ifcvt.c, I would like to get your opinion on the appended ifcvt.c patch.
> 
> Interesting!  The problem is that half of the tests updated by your
> patch really need to be testing the instruction count and comparing
> that against MAX_CONDITIONAL_EXECUTE and the other half need to be
> summing the the rtx_costs and comparing that against BRANCH_COST.
> Neither the current code that always tests instruction counts, nor
> your patch that only compares rtx_costs is ideal, as these two different
> types of tests really require checking different metrics.  But I agree
> some of the aspects of your patch are needed in ifcvt.c, and can be
> used to address Uros' PR rtl-optimization/15187.  There's also another
> bug in this code...

What we really need, especially for the if-else conversion, is to
measure the cost of conditionally NOT executing an insn (assuming the
cost of conditionally executing an insn is the same as unconditionally
doing so).

On older ARM chips the non-execute cost was always 1 (so the number of
insns worked well as the metric).  On some more recent chips it can be
more complex than that, sometimes the cost can be as high as executing
the insn.

R.


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