[llvm] r184685 - LoopVectorize: Use the dependence test utility class

Arnold Schwaighofer aschwaighofer at apple.com
Mon Jun 24 05:16:51 PDT 2013


On Jun 24, 2013, at 3:46 AM, Renato Golin <renato.golin at linaro.org> wrote:

> On 24 June 2013 04:55, Arnold Schwaighofer <aschwaighofer at apple.com> wrote:
> We now no longer need alias analysis - the cases that alias analysis would
> handle are now handled as accesses with a large dependence distance.
> 
> Hi Arnold,
> 
> This is great! Is the structure alias also using this? Is this the old AA handler?

Yes. Instead of asking BasicAA whether "structA.A[i]” and "structA.B[i]” alias we now ask whether there is a dependence between:

(structA) + sizeof(int)*i
(structA+<offset from A to B>) + sizeof(int)*i

In this case there might be one at distance <offset from A to B>. Therefore, you can vectorize as long as your <scalar access size * VF> is within <offset from A to B>.


> 
> We would be able to vectorize about 200 more loops (in many cases the cost model
> instructs us no to) in the test suite now. Results on x86-64 are a wash.
> 
> ARM LNT was unimpressed:
> 
> http://llvm.org/perf/db_default/v4/nts/12695
> 
> but again, LNT is hardly a trustworthy benchmark... ;)
> 
I am not expecting many improvements. We don’t reorder accesses. Most impact you'll get by vectorizing parallel accesses.

> I'll try to run something internally and see if I spot any trouble, and will open a bug if I do.

Thanks





More information about the llvm-commits mailing list