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] Fix PRE of TARGET_MEM_REF


> On Tue, May 26, 2009 at 1:12 PM, Revital1 Eres <ERES@il.ibm.com> wrote:
> >
> > Hello,
> >
> > I wonder if there is any objection to also schedule predictive
commoning
> > after the vectorizer, like in the following patch.
> > Scheduling predcom ?and PRE passes after the vectorizer could help to
solve
> > PR39300, ?among others.
> > I am planning to do SPEC runs with this patch for testing.
>

great. this is the main thing that has held back scheduling predcom after
vectorization

> What we should do for predictive commoning is to run its analysis
> phase before (or inside?) the vectorizer and just handle it in the
> vectorizer cost model.  I expect that for small vector sizes
> (for example v2df) predictive commoning is often more effective
> than vectorization, especially if the loop is memory bound.
>

I don't think it's the vectorizer's job to evaluate the impact of
predictive commoning or any other optimization... hopefully if loop-count
is too small the cost model will figure out that we shouldn't vectorize
regardless of other optimization alternatives. Also, we could try to
vectorize efficiently, taking advantage of the data reuse while we
vectorize (we do it in other situations in the vectorizer).

dorit


> Richard.
>
> >
> > Thanks,
> > Revital
> >
> > Index: passes.c
> > ===================================================================
> > --- passes.c ? ?(revision 147866)
> > +++ passes.c ? ?(working copy)
> > @@ -648,7 +648,6 @@ init_optimization_passes (void)
> > ? ? ? ? ?NEXT_PASS (pass_copy_prop);
> > ? ? ? ? ?NEXT_PASS (pass_dce_loop);
> > ? ? ? ? ?NEXT_PASS (pass_lim);
> > - ? ? ? ? NEXT_PASS (pass_predcom);
> > ? ? ? ? ?NEXT_PASS (pass_tree_unswitch);
> > ? ? ? ? ?NEXT_PASS (pass_scev_cprop);
> > ? ? ? ? ?NEXT_PASS (pass_empty_loop);
> > @@ -665,6 +664,7 @@ init_optimization_passes (void)
> > ? ? ? ? ? ? ?NEXT_PASS (pass_lower_vector_ssa);
> > ? ? ? ? ? ? ?NEXT_PASS (pass_dce_loop);
> > ? ? ? ? ? ?}
> > + ? ? ? ? ?NEXT_PASS (pass_predcom);
> > ? ? ? ? ?NEXT_PASS (pass_complete_unroll);
> > ? ? ? ? ?NEXT_PASS (pass_slp_vectorize);
> > ? ? ? ? ?NEXT_PASS (pass_parallelize_loops);
> >
> >


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