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: [PATCH 1/3]Improve induction variable elimination


On Thu, Jul 17, 2014 at 11:07 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> This is a series of three patches improving induction variable elimination.
> Currently GCC only eliminates iv for very specific case when the loopâs
> latch could run zero times, i.e., when may_be_zero field of loop niter
> information evaluates to true.  In fact, itâs so specific that
> iv_elimination_compare_lt rarely succeeds during either GCC bootstrap or
> spec2000/spec2006 compilation.  Though intrusive data shows these patches
> donât help iv elimination that much for GCC bootstrap, they do capture
> 5%~15% more eliminations for compiling spec2000/2006.  Detailed numbers are
> like:
>                   2k/int       2k/fp       2k6/int       2k6/fp
> improve ~9.6%      ~4.8%      ~5.5%        ~14.4%
>
> All patches pass bootstrap and regression test on x86_64/x86.  I will
> bootstrap and test them on aarch64/arm platforms too.
>
> The first patch turns to tree operand_equal_p to check the number of
> iterations in iv_elimination_lt.  Though I think this change isnât necessary
> for current code, itâs needed if we further relax iv elimination for cases
> in which sign/unsigned conversion is involved.

As said elsewhere this bug should be fixed in tree-affine.c.  Do you have
a testcase?

Thanks,
Richard.

> Thanks,
> bin
>
> 2014-07-17  Bin Cheng  <bin.cheng@arm.com>
>
>         * tree-ssa-loop-ivopts.c (iv_elimination_compare_lt): Check number
>         of iteration using tree comparison.


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