aboutsummaryrefslogtreecommitdiff
path: root/polly/include
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-06-04 21:58:54 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-06-04 21:58:54 +0000
commit06c801e153347d24ec7ce93f6ffbbc58b64a89ba (patch)
tree6c4fa525eb39849244ec02156a059fe344fa6db8 /polly/include
parent2d37cb82f0e66e48f8970104e155a644038c45d5 (diff)
downloadllvm-project-06c801e153347d24ec7ce93f6ffbbc58b64a89ba.tar.gz
[ScopBuilder] Move canonicalizeDynamicsBasePtrs from ScopInfo. NFC.
Refactor Scop and ScopBuilder class. Move canonicalizeDynamicsBasePtrs and corresponding static functions from ScopInfo.cpp to ScopBuilder.cpp Patch by Dominik Adamski <adamski.dominik@gmail.com> Differential Revision: https://reviews.llvm.org/D62781 llvm-svn: 362554
Diffstat (limited to 'polly/include')
-rw-r--r--polly/include/polly/ScopBuilder.h28
-rw-r--r--polly/include/polly/ScopInfo.h28
2 files changed, 28 insertions, 28 deletions
diff --git a/polly/include/polly/ScopBuilder.h b/polly/include/polly/ScopBuilder.h
index f24a46a7e905..0c1e15a12a64 100644
--- a/polly/include/polly/ScopBuilder.h
+++ b/polly/include/polly/ScopBuilder.h
@@ -391,6 +391,34 @@ class ScopBuilder {
/// Build the access relation of all memory accesses of @p Stmt.
void buildAccessRelations(ScopStmt &Stmt);
+ /// Canonicalize arrays with base pointers from the same equivalence class.
+ ///
+ /// Some context: in our normal model we assume that each base pointer is
+ /// related to a single specific memory region, where memory regions
+ /// associated with different base pointers are disjoint. Consequently we do
+ /// not need to compute additional data dependences that model possible
+ /// overlaps of these memory regions. To verify our assumption we compute
+ /// alias checks that verify that modeled arrays indeed do not overlap. In
+ /// case an overlap is detected the runtime check fails and we fall back to
+ /// the original code.
+ ///
+ /// In case of arrays where the base pointers are know to be identical,
+ /// because they are dynamically loaded by accesses that are in the same
+ /// invariant load equivalence class, such run-time alias check would always
+ /// be false.
+ ///
+ /// This function makes sure that we do not generate consistently failing
+ /// run-time checks for code that contains distinct arrays with known
+ /// equivalent base pointers. It identifies for each invariant load
+ /// equivalence class a single canonical array and canonicalizes all memory
+ /// accesses that reference arrays that have base pointers that are known to
+ /// be equal to the base pointer of such a canonical array to this canonical
+ /// array.
+ ///
+ /// We currently do not canonicalize arrays for which certain memory accesses
+ /// have been hoisted as loop invariant.
+ void canonicalizeDynamicBasePtrs();
+
public:
explicit ScopBuilder(Region *R, AssumptionCache &AC, AliasAnalysis &AA,
const DataLayout &DL, DominatorTree &DT, LoopInfo &LI,
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index 05d4d9cfcd71..583b99ef2be9 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -2059,34 +2059,6 @@ private:
/// Required inv. loads: LB[0], LB[1], (V, if it may alias with A or LB)
void hoistInvariantLoads();
- /// Canonicalize arrays with base pointers from the same equivalence class.
- ///
- /// Some context: in our normal model we assume that each base pointer is
- /// related to a single specific memory region, where memory regions
- /// associated with different base pointers are disjoint. Consequently we do
- /// not need to compute additional data dependences that model possible
- /// overlaps of these memory regions. To verify our assumption we compute
- /// alias checks that verify that modeled arrays indeed do not overlap. In
- /// case an overlap is detected the runtime check fails and we fall back to
- /// the original code.
- ///
- /// In case of arrays where the base pointers are know to be identical,
- /// because they are dynamically loaded by accesses that are in the same
- /// invariant load equivalence class, such run-time alias check would always
- /// be false.
- ///
- /// This function makes sure that we do not generate consistently failing
- /// run-time checks for code that contains distinct arrays with known
- /// equivalent base pointers. It identifies for each invariant load
- /// equivalence class a single canonical array and canonicalizes all memory
- /// accesses that reference arrays that have base pointers that are known to
- /// be equal to the base pointer of such a canonical array to this canonical
- /// array.
- ///
- /// We currently do not canonicalize arrays for which certain memory accesses
- /// have been hoisted as loop invariant.
- void canonicalizeDynamicBasePtrs();
-
/// Check if @p MA can always be hoisted without execution context.
bool canAlwaysBeHoisted(MemoryAccess *MA, bool StmtInvalidCtxIsEmpty,
bool MAInvalidCtxIsEmpty,