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] Strength reduction part 3 of 4: candidates with unknown strides


On Wed, 8 Aug 2012, H.J. Lu wrote:

> On Wed, Aug 1, 2012 at 10:36 AM, William J. Schmidt
> <wschmidt@linux.vnet.ibm.com> wrote:
> > Greetings,
> >
> > Thanks for the review of part 2!  Here's another chunk of the SLSR code
> > (I feel I owe you a few beers at this point).  This performs analysis
> > and replacement on groups of related candidates having an SSA name
> > (rather than a constant) for a stride.
> >
> > This leaves only the conditional increment (CAND_PHI) case, which will
> > be handled in the last patch of the series.
> >
> > Bootstrapped and tested on powerpc64-unknown-linux-gnu with no new
> > regressions.  Ok for trunk?
> >
> > Thanks,
> > Bill
> >
> >
> > gcc:
> >
> > 2012-08-01  Bill Schmidt  <wschmidt@linux.ibm.com>
> >
> >         * gimple-ssa-strength-reduction.c (struct incr_info_d): New struct.
> >         (incr_vec): New static var.
> >         (incr_vec_len): Likewise.
> >         (address_arithmetic_p): Likewise.
> >         (stmt_cost): Remove dead assignment.
> >         (dump_incr_vec): New function.
> >         (cand_abs_increment): Likewise.
> >         (lazy_create_slsr_reg): Likewise.
> >         (incr_vec_index): Likewise.
> >         (count_candidates): Likewise.
> >         (record_increment): Likewise.
> >         (record_increments): Likewise.
> >         (unreplaced_cand_in_tree): Likewise.
> >         (optimize_cands_for_speed_p): Likewise.
> >         (lowest_cost_path): Likewise.
> >         (total_savings): Likewise.
> >         (analyze_increments): Likewise.
> >         (ncd_for_two_cands): Likewise.
> >         (nearest_common_dominator_for_cands): Likewise.
> >         (profitable_increment_p): Likewise.
> >         (insert_initializers): Likewise.
> >         (introduce_cast_before_cand): Likewise.
> >         (replace_rhs_if_not_dup): Likewise.
> >         (replace_one_candidate): Likewise.
> >         (replace_profitable_candidates): Likewise.
> >         (analyze_candidates_and_replace): Handle candidates with SSA-name
> >         strides.
> >
> > gcc/testsuite:
> >
> > 2012-08-01  Bill Schmidt  <wschmidt@linux.ibm.com>
> >
> >         * gcc.dg/tree-ssa/slsr-5.c: New.
> >         * gcc.dg/tree-ssa/slsr-6.c: New.
> >         * gcc.dg/tree-ssa/slsr-7.c: New.
> >         * gcc.dg/tree-ssa/slsr-8.c: New.
> >         * gcc.dg/tree-ssa/slsr-9.c: New.
> >         * gcc.dg/tree-ssa/slsr-10.c: New.
> >         * gcc.dg/tree-ssa/slsr-11.c: New.
> >         * gcc.dg/tree-ssa/slsr-12.c: New.
> >         * gcc.dg/tree-ssa/slsr-13.c: New.
> >         * gcc.dg/tree-ssa/slsr-14.c: New.
> >         * gcc.dg/tree-ssa/slsr-15.c: New.
> >         * gcc.dg/tree-ssa/slsr-16.c: New.
> >         * gcc.dg/tree-ssa/slsr-17.c: New.
> >         * gcc.dg/tree-ssa/slsr-18.c: New.
> >         * gcc.dg/tree-ssa/slsr-19.c: New.
> >         * gcc.dg/tree-ssa/slsr-20.c: New.
> >         * gcc.dg/tree-ssa/slsr-21.c: New.
> >         * gcc.dg/tree-ssa/slsr-22.c: New.
> >         * gcc.dg/tree-ssa/slsr-23.c: New.
> >         * gcc.dg/tree-ssa/slsr-24.c: New.
> >         * gcc.dg/tree-ssa/slsr-25.c: New.
> >         * gcc.dg/tree-ssa/slsr-26.c: New.
> >         * gcc.dg/tree-ssa/slsr-30.c: New.
> >         * gcc.dg/tree-ssa/slsr-31.c: New.
> >
> >
> ======================================
> > --- gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c     (revision 0)
> > +++ gcc/testsuite/gcc.dg/tree-ssa/slsr-30.c     (revision 0)
> > @@ -0,0 +1,25 @@
> > +/* Verify straight-line strength reduction fails for simple integer addition
> > +   with casts thrown in when -fwrapv is used.  */
> > +
> > +/* { dg-do compile } */
> > +/* { dg-options "-O3 -fdump-tree-dom2 -fwrapv" } */
> > +/* { dg-skip-if "" { ilp32 } { "-m32" } { "" } } */
> > +
> 
> This doesn't work on x32 nor Linux/ia32 since -m32
> may not be needed for ILP32.  This patch works for
> me.  OK to install?

Ok.

Thanks,
Richard.


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