diff options
author | Michael Kruse <llvm@meinersbur.de> | 2019-05-31 19:40:20 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2019-05-31 19:40:20 +0000 |
commit | c16ab9dd886920bf56bd51cbcf7218a7186e99dd (patch) | |
tree | 5e28eb06b34093e3e6860c655f4b5de87ed590f6 /polly/include | |
parent | aa8a976174c7ac08676bbc7bb647f6bc0efd2e72 (diff) | |
download | bcm5719-llvm-c16ab9dd886920bf56bd51cbcf7218a7186e99dd.tar.gz bcm5719-llvm-c16ab9dd886920bf56bd51cbcf7218a7186e99dd.zip |
[ScopBuilder] Move verifyInvariantLoads function from ScopInfo. NFC.
Refactor Scop and ScopBuilder class. Move verifyInvariantLoads from Scop
class to ScopBuilder class.
Patch by: Dominik Adamski <adamski.dominik@gmail.com>
Differential Revision: https://reviews.llvm.org/D62628
llvm-svn: 362258
Diffstat (limited to 'polly/include')
-rw-r--r-- | polly/include/polly/ScopBuilder.h | 15 | ||||
-rw-r--r-- | polly/include/polly/ScopInfo.h | 15 |
2 files changed, 15 insertions, 15 deletions
diff --git a/polly/include/polly/ScopBuilder.h b/polly/include/polly/ScopBuilder.h index cd17beacd63..f24a46a7e90 100644 --- a/polly/include/polly/ScopBuilder.h +++ b/polly/include/polly/ScopBuilder.h @@ -360,6 +360,21 @@ class ScopBuilder { /// potential reduction. void checkForReductions(ScopStmt &Stmt); + /// Verify that all required invariant loads have been hoisted. + /// + /// Invariant load hoisting is not guaranteed to hoist all loads that were + /// assumed to be scop invariant during scop detection. This function checks + /// for cases where the hoisting failed, but where it would have been + /// necessary for our scop modeling to be correct. In case of insufficient + /// hoisting the scop is marked as invalid. + /// + /// In the example below Bound[1] is required to be invariant: + /// + /// for (int i = 1; i < Bound[0]; i++) + /// for (int j = 1; j < Bound[1]; j++) + /// ... + void verifyInvariantLoads(); + /// Collect loads which might form a reduction chain with @p StoreMA. /// /// Check if the stored value for @p StoreMA is a binary operator with one or diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h index bae105b7f11..05d4d9cfcd7 100644 --- a/polly/include/polly/ScopInfo.h +++ b/polly/include/polly/ScopInfo.h @@ -2040,21 +2040,6 @@ private: /// nullptr if it cannot be hoisted at all. isl::set getNonHoistableCtx(MemoryAccess *Access, isl::union_map Writes); - /// Verify that all required invariant loads have been hoisted. - /// - /// Invariant load hoisting is not guaranteed to hoist all loads that were - /// assumed to be scop invariant during scop detection. This function checks - /// for cases where the hoisting failed, but where it would have been - /// necessary for our scop modeling to be correct. In case of insufficient - /// hoisting the scop is marked as invalid. - /// - /// In the example below Bound[1] is required to be invariant: - /// - /// for (int i = 1; i < Bound[0]; i++) - /// for (int j = 1; j < Bound[1]; j++) - /// ... - void verifyInvariantLoads(); - /// Hoist invariant memory loads and check for required ones. /// /// We first identify "common" invariant loads, thus loads that are invariant |