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 GCC]Improve auto-increment addressing mode support in IVO by refactoring add candiate logic.


On Thu, Jul 9, 2015 at 11:40 AM, Bin Cheng <bin.cheng@arm.com> wrote:
> Hi,
> This patch refactors codes adding iv candidates in IVO.  It renames
> functions using straightforward names, it also factors function call to
> add_autoinc_candidates from add_candidate to add_iv_candidate_for_use.
> Before this patch, we tried to add autoinc candidates for every call to
> add_candidate.  This has two issues: A) wasting compilation time.  B) adding
> useless auto-inc candidates for iv's which have ZERO base.  These autoinc
> candidates are useless because targets generally only support auto-increment
> addressing mode with base register pointing to memory object, also because
> IVO has its prerequisite conditions on autoinc candidates, these cands are
> actually ignored later.
>
> I collected instrumental data, and < 85% candidates are added now when
> compiling spec2k on Cortex-a15/thumb.
>
> Also this patch could benefit performance for targets supporting autoinc
> addressing mode, because with fewer candidates, IVO algorithm might work
> better.
> I collected spec2k perf data on Cortex-a15.  It shows several cases in
> int/fp suites are improved.  Overall, both spec2k geo-mean of int/fp are
> both improved by ~0.5%.  And no regression.
>
> Though I haven't turned on autoinc support in IVO for aarch64, I would
> expect this patch will pave the way for that.
>
> So is it OK?

Looks good to me.

Thanks,
Richard.

> Thanks,
> bin
>
> 2015-07-08  Bin Cheng  <bin.cheng@arm.com>
>
>         * tree-ssa-loop-ivopts.c (add_candidate): Remove call to
>         add_autoinc_candidates.
>         (add_iv_candidate_for_biv): Rename to add_iv_candidate_for_biv.
>         (add_iv_candidate_for_biv): Rename from add_iv_candidate_for_biv.
>         (add_old_ivs_candidates): Rename to add_iv_candidate_for_bivs.
>         (add_iv_candidate_for_bivs): Rename from add_old_ivs_candidates.
>         Call new function.
>         (add_iv_value_candidates): Rename to add_iv_candidate_for_use.
>         (add_iv_candidate_for_use): Rename from add_iv_value_candidates.
>         Remove parameter struct iv*.  Call add_autoinc_candidates here.
>         (add_derived_ivs_candidates): Rename to add_iv_candidate_for_uses.
>         (add_iv_candidate_for_uses): Rename from add_derived_ivs_candidates.
>         Call new function.
>         (find_iv_candidates): Call new functions.
>


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