[PATCH] Disable unrolling in the loop vectorizer when disabled in the pass manager

Hal Finkel hfinkel at anl.gov
Wed Aug 28 11:36:58 PDT 2013


----- Original Message -----
> Hi Hal,
> 
> Thanks for working on this. I like your change. LGTM.

r189499, thanks!

 -Hal

> 
> Nadav
> 
> 
> On Aug 28, 2013, at 10:02 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> > Nadav, et al.,
> > 
> > When unrolling is disabled in the pass manager, the loop vectorizer
> > should also
> > not unroll loops. This will allow the -fno-unroll-loops option in
> > Clang to
> > behave as expected (even for vectorizable loops). The loop
> > vectorizer's
> > -force-vector-unroll option will (continue to) override the
> > pass-manager
> > setting (including -force-vector-unroll=0 to force use of the
> > internal
> > auto-selection logic).
> > 
> > In order to test this, I added a flag to opt
> > (-disable-loop-unrolling) to force
> > disable unrolling through opt (the analog of -fno-unroll-loops in
> > Clang). Also,
> > this fixes a small bug in opt where the loop vectorizer was enabled
> > only after
> > the pass manager populated the queue of passes (the global_alias.ll
> > test needed
> > a slight update to the RUN line as a result of this fix).
> > 
> > Please review.
> > 
> > Thanks again,
> > Hal
> > 
> > --
> > Hal Finkel
> > Assistant Computational Scientist
> > Leadership Computing Facility
> > Argonne National Laboratory
> > <no_unroll_vec4.patch>
> 
> 

-- 
Hal Finkel
Assistant Computational Scientist
Leadership Computing Facility
Argonne National Laboratory



More information about the llvm-commits mailing list