Merge pull request #17567 from e-kayrakli/local-arrays-ala
Enable automatic local access optimization for local arrays
This PR enables local arrays/domain to be subjected to automatic local access
optimization. The cases where the compiler uses
localAccess does not impact
performance of the access itself, however, it signals automatic aggregation the
locality of the access.
Add similar flags and
Add a check in
thisfor non-distributed arrays
(This way we can avoid adding
dsiLocalAccessto local array implementations,
credit goes to @bradcray for the idea)
Fix a bug with intervening forall expressions
This PR increased the coverage of the optimization and revealed a bug where an
intervening forall expression was not recognized as such. Down the road this
caused assertion errors.
Update an unrelated test's good file
Automatic local access clones foralls and if the original loop has an compiler
error, this cloning leads to duplicate error messages to be printed out. For
now, this PR accepts this change in a test. This is recorded in
Tighten the static checks for slices
We don't want this optimization to fire for slices that has a different distribution
than the original array.
Bug with the forall expressions also made me realize that the optimization
does not cover forall expressions, at all. It could be easy to address, but I
don't know for sure, yet.
Compiler error message adjustments
[Reviewed by @mppf]