This is the mail archive of the 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 Fri, Jul 25, 2014 at 1:27 PM, Richard Biener
<> wrote:
> On Thu, Jul 17, 2014 at 11:07 AM, Bin Cheng <> 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?
Sorry I don't have test case without patching GCC, I will revisit the
problem and try to understand whether it's necessary or in which part
it should be fixed.


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