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] Cleanup code generation in lambda-code


On 6/10/07, Sebastian Pop <sebpop@gmail.com> wrote:
On 6/7/07, Dorit Nuzman <DORIT@il.ibm.com> wrote:
> there was actually a patch a while back to support vectorization when there
> are IVs that are used after the loop (
> http://gcc.gnu.org/ml/gcc-patches/2006-02/msg00700.html), but it was deemed
> redundant given that scev-ccp was supposed to clean these away, so the
> patch was dropped (as you can see in that thread).
>

I went through this thread.  It seems like we don't want to generate
such constructs after scev_cprop if there is no support in the
vectorizer to deal with these dead variables.  The linear pass is
executed after pass_scev_cprop, so we have to generate a clean code,
or just schedule more scalar cleanup passes just after linear.

          NEXT_PASS (pass_scev_cprop);
          NEXT_PASS (pass_empty_loop);
          NEXT_PASS (pass_record_bounds);
          NEXT_PASS (pass_check_data_deps);
          NEXT_PASS (pass_linear_transform);
          NEXT_PASS (pass_iv_canon);
          NEXT_PASS (pass_if_conversion);
          NEXT_PASS (pass_vectorize);

In loop linear we know exactly what dead code we generate, so I think
it is a good idea to run a very simplified dead code elimination pass
for avoiding to run DCE on the whole function.  Another idea would be
to have a DCE limited to a subset of the cfg, in this case limited to
the transformed loop nest, but I'm not sure if this is feasible.

Daniel, does "looked fine" means okay to include the patch in trunk?

Yes, until someone has a better solution that works, please put the patch in the trunk :)


Sebastian




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