diff options
author | Philip Reames <listmail@philipreames.com> | 2021-09-08 12:01:19 -0700 |
---|---|---|
committer | Philip Reames <listmail@philipreames.com> | 2021-09-08 12:28:35 -0700 |
commit | 585c594d749a2a88150b63804587af85abdabeaa (patch) | |
tree | 2ab06db4fe8818cd546edad8adaf8b7e985133e5 /llvm/lib/Analysis/DependenceAnalysis.cpp | |
parent | 3e54de4df232f1cfc9570ea7958abee8d04f7b0b (diff) | |
download | llvm-585c594d749a2a88150b63804587af85abdabeaa.zip llvm-585c594d749a2a88150b63804587af85abdabeaa.tar.gz llvm-585c594d749a2a88150b63804587af85abdabeaa.tar.bz2 |
Move delinearization logic out of SCEV [NFC]
None of this logic has anything to do with SCEV's internals, it just uses the existing public APIs. As a result, we can move the code from ScalarEvolution.cpp/hpp to Delinearization.cpp/hpp with only minor changes.
This was discussed in advance on today's loop opt call. It turned out to be easy as hoped.
Diffstat (limited to 'llvm/lib/Analysis/DependenceAnalysis.cpp')
-rw-r--r-- | llvm/lib/Analysis/DependenceAnalysis.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/llvm/lib/Analysis/DependenceAnalysis.cpp b/llvm/lib/Analysis/DependenceAnalysis.cpp index 9c09894..fa9c672 100644 --- a/llvm/lib/Analysis/DependenceAnalysis.cpp +++ b/llvm/lib/Analysis/DependenceAnalysis.cpp @@ -53,6 +53,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/Statistic.h" #include "llvm/Analysis/AliasAnalysis.h" +#include "llvm/Analysis/Delinearization.h" #include "llvm/Analysis/LoopInfo.h" #include "llvm/Analysis/ScalarEvolution.h" #include "llvm/Analysis/ScalarEvolutionExpressions.h" @@ -3439,16 +3440,16 @@ bool DependenceInfo::tryDelinearizeParametricSize( // First step: collect parametric terms in both array references. SmallVector<const SCEV *, 4> Terms; - SE->collectParametricTerms(SrcAR, Terms); - SE->collectParametricTerms(DstAR, Terms); + collectParametricTerms(*SE, SrcAR, Terms); + collectParametricTerms(*SE, DstAR, Terms); // Second step: find subscript sizes. SmallVector<const SCEV *, 4> Sizes; - SE->findArrayDimensions(Terms, Sizes, ElementSize); + findArrayDimensions(*SE, Terms, Sizes, ElementSize); // Third step: compute the access functions for each subscript. - SE->computeAccessFunctions(SrcAR, SrcSubscripts, Sizes); - SE->computeAccessFunctions(DstAR, DstSubscripts, Sizes); + computeAccessFunctions(*SE, SrcAR, SrcSubscripts, Sizes); + computeAccessFunctions(*SE, DstAR, DstSubscripts, Sizes); // Fail when there is only a subscript: that's a linearized access function. if (SrcSubscripts.size() < 2 || DstSubscripts.size() < 2 || |