[Dependence Analysis] Enable delinearization of fixed sized arrays
authorAndy Kaylor <andrew.kaylor@intel.com>
Mon, 10 May 2021 17:01:43 +0000 (10:01 -0700)
committerAndy Kaylor <andrew.kaylor@intel.com>
Mon, 10 May 2021 17:30:15 +0000 (10:30 -0700)
commit7086025d6567562d31fadbaccf08b4fd72ec2100
tree5e43314b813a2e3c0cc8ed70df9e9db41cc4fc50
parentf13893f66a228400bf9bdf14be425e3dc6da0034
[Dependence Analysis] Enable delinearization of fixed sized arrays

Patch by Artem Radzikhovskyy!

Allow delinearization of fixed sized arrays if we can prove that the GEP indices do not overflow the array dimensions. The checks applied are similar to the ones that are used for delinearization of parametric size arrays. Make sure that the GEP indices are non-negative and that they are smaller than the range of that dimension.

Changes Summary:

- Updated the LIT tests with more exact values, as we are able to delinearize and apply more exact tests
- profitability.ll - now able to delinearize in all cases, no need to use -da-disable-delinearization-checks flag and run the test twice
- loop-interchange-optimization-remarks.ll - in one of the cases we are able to delinearize without using -da-disable-delinearization-checks
- SimpleSIVNoValidityCheckFixedSize.ll - removed unnecessary "-da-disable-delinearization-checks" flag. Now can get the exact answer without it.
- SimpleSIVNoValidityCheckFixedSize.ll and PreliminaryNoValidityCheckFixedSize.ll - made negative tests more explicit, in order to demonstrate the need for "-da-disable-delinearization-checks" flag

Differential Revision: https://reviews.llvm.org/D101486
llvm/lib/Analysis/DependenceAnalysis.cpp
llvm/test/Analysis/DependenceAnalysis/Coupled.ll
llvm/test/Analysis/DependenceAnalysis/Invariant.ll
llvm/test/Analysis/DependenceAnalysis/PreliminaryNoValidityCheckFixedSize.ll
llvm/test/Analysis/DependenceAnalysis/Separability.ll
llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheck.ll
llvm/test/Analysis/DependenceAnalysis/SimpleSIVNoValidityCheckFixedSize.ll
llvm/test/Transforms/LoopInterchange/loop-interchange-optimization-remarks.ll
llvm/test/Transforms/LoopInterchange/profitability.ll