This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bin Cheng <bin dot cheng at arm dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 9 Jul 2015 11:49:45 +0200
- Subject: Re: [PATCH GCC]Udate best_cost for start cand if it has lower overall cost in iv set narrowing
- Authentication-results: sourceware.org; auth=none
- References: <000001d0ba2a$e66b5150$b341f3f0$ at arm dot com>
On Thu, Jul 9, 2015 at 11:37 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> When I going through the code, I spot this minor issue. When
> start_cand/orig_cand/third_cand have overall cost in order like "start_cand
> < third_cand < orig_cand", GCC chooses the third_cand instead of start_cand
> because we haven't set best_cost for start_cand. This is an obvious fix to
> it.
>
> So is it OK?
Ok. I wonder if you have a testcase which this improves?
Richard.
>
> 2015-07-08 Bin Cheng <bin.cheng@arm.com>
>
> * tree-ssa-loop-ivopts.c (iv_ca_narrow): Update best_cost
> if start candidate has lower cost.