[PATCH] D24189: [LAA] Extend isConsecutiveAccess to determine if two accesses are consecutive, reverse consecutive, or non-consecutive.
Chad Rosier via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 2 06:53:58 PDT 2016
mcrosier created this revision.
mcrosier added reviewers: mkuper, mssimpso.
mcrosier added a subscriber: llvm-commits.
Herald added subscribers: mzolotukhin, sanjoy.
The current implementation of isConsecutiveAccess(A,B) checks to see if access A is followed by access B. With little additional work we can determine if B is followed by A (i.e., reverse consecutive) or if A and B are not known to be consecutive.
This patch modifies isConsecutiveAccess to:
- List Item return 1 if A and B are consecutive and B follows A,
- List Item return -1 if A and B are consecutive and A follows B (i.e., reverse consecutive) or,
- List Item return 0 if we can't prove and A and B to be consecutive.
This is very similar to the behavior of the isConsecutivePtr function in the loop vectorizer and IMO having isConsecutiveAccess follow suit makes sense.
This patch also uses this new functionality to reduce the number of calls to isConsecutiveAccesses in the SLP vectorizer.
Across SPEC2000 and SPEC2006 the total number of calls to isConsecutiveAccess is reduced by 4.31% or 18875 calls. There should be no functional change other then the reduction is calls.
All of the SPEC200X and llvm test-suite tests passed correctness tests and show no codegen changes as expected. I plan on kicking off the compile-time regression tests over the weekend.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 9312 bytes
Desc: not available
More information about the llvm-commits