[PATCH] Bug 21233 - Catch more cases in SLP vectorizer

Andrew Trick atrick at apple.com
Wed Oct 22 09:02:13 PDT 2014


> On Oct 22, 2014, at 8:07 AM, Hal Finkel <hfinkel at anl.gov> wrote:
> 
> ----- Original Message -----
>> From: "Chad Rosier" <mcrosier at codeaurora.org>
>> To: "Sanjin Sijaric" <ssijaric at codeaurora.org>
>> Cc: llvm-commits at cs.uiuc.edu
>> Sent: Wednesday, October 22, 2014 9:57:36 AM
>> Subject: Re: [PATCH] Bug 21233 - Catch more cases in SLP vectorizer
>> 
>> Hi Sanjin,
>> 
>>> The attached patch addresses bug #21233.  I didn't see a way to
>>> vectorize
>>> the attached test case without using SCEV-AA along with a small
>>> change in
>>> SLP vectorizer to retrieve the base pointer using SCEV analysis.
>> 
>> +      if (UseSCEVAAForSLP)
>> +        MPM.add(createScalarEvolutionAliasAnalysisPass());
>> +      MPM.add(createSLPVectorizerPass());   // Vectorize parallel
>> scalar
>> chains.
>> 
>> This looks to be add a call to the SLP vectorizer pass.  Is this
>> change
>> indented?  I imagine you just want to add the SCEV-AA pass before the
>> existing SLP vectorizer pass a few lines above this change.
>> 
>>> Can someone please have a look?  Is it safe to use SCEV-AA, or
>>> should I
>>> pursue a different approach?
>> 
>> I'm not the right person to comment on the use of SCEV-AA in the SLP
>> vectorizer.  Perhaps, Arnold, Hal, or someone else could provide
>> their
>> opinion.
> 
> We'd obviously not been using SCEV-AA because the current pass manager does not allow it to be preserved. As a result, I'm not sure how well tested it is (it is also pretty simple, so I'm not super concerned, only somewhat concerned). My thought has been that, once we have the new pass manager, we can do a cost-benefit analysis on using SCEV-AA more generally (especially since doing so might allow us to strip down BasicAA somewhat). I'm not opposed to gaining some more experience with SCEV-AA by using it in a targeted place like this.
> 
> Andy, do you have an opinion on this? Arnold?

I completely agree with Hal - not much to add. BasicAA now covers much of what SCEV-AA was supposed to handle. SCEV is very tricky to preserve across passes and our system for doing so is not robust. But it would be nice to make improvements in that area and tease out bugs.
-Andy

> 
> -Hal
> 
>> 
>> Chad
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>> 
> 
> -- 
> Hal Finkel
> Assistant Computational Scientist
> Leadership Computing Facility
> Argonne National Laboratory





More information about the llvm-commits mailing list