[PATCH] D25276: [LoopVectorizer] Interleaved-mem-accesses analysis and getPtrStride

Dorit Nuzman via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 25 14:58:55 PDT 2016


dorit added a comment.

>> > 1.Initial check with Assume=true, ShouldCheckWrap=false; 2.Revisit 
>  > > only groups with gaps as follows:
>  > >    - if first and last elements are accessed: skip further checking.
>  > >    - otherwise – check the first and last pointers of the group 
>  > > with Assume=false (for now), ShouldCheckWrap=true;
>  > > 
>  > I agree with point 1)
>  > For point 2) I meant something slightly different:
>  >  (a) - if first and last elements are accessed *and* we know they don't wrap, skip further checking (because it implies that all the pointers in the group don't wrap).
>  >  (b) - if the group is full, skip further checking
>  >  (c)- otherwise (as you said) check the first and last pointers of the 
>  > group with Assume=false (for now), ShouldCheckWrap=true;
>  >

...

> 1. Correct, in this case I mean Assume=false, ShouldCheckWrap=true. Although when switching to using Assume = true it is preferable to call getPtrStride on just the two accesses instead of on all the pointers.

We might as well check just these two accesses already, even while we are using Assume=false, no? (it's less critical because it won't affect runtime, but it will make the followup change of upgrading to Assume=true smaller).
This is what I did in the updated version I just uploaded.
I only included cases (b) and (c) from the above; In the end I am not sure what case (a) checks beyond that case (c) already covers...?

thanks,
Dorit


https://reviews.llvm.org/D25276





More information about the llvm-commits mailing list