summaryrefslogtreecommitdiffstats
path: root/polly/include
diff options
context:
space:
mode:
authorMichael Kruse <llvm@meinersbur.de>2019-05-31 19:26:57 +0000
committerMichael Kruse <llvm@meinersbur.de>2019-05-31 19:26:57 +0000
commitaa8a976174c7ac08676bbc7bb647f6bc0efd2e72 (patch)
tree98db57ad7af48fb03e7aab609970810859158a42 /polly/include
parentc669629e6c01aa55f17f91e64905aac397f1f540 (diff)
downloadbcm5719-llvm-aa8a976174c7ac08676bbc7bb647f6bc0efd2e72.tar.gz
bcm5719-llvm-aa8a976174c7ac08676bbc7bb647f6bc0efd2e72.zip
[ScheduleOptimizer] Hoist extension nodes after schedule optimization.
Extension nodes make schedule trees are less flexible: Many operations, such as rescheduling, do not work on such schedule trees with extension. As such, some functionality such as determining parallel loops in isl's AST are disabled. Currently, only the pattern-matching generalized matrix-matrix multiplication optimization adds extension nodes (to add copy-in statements). This patch removes all extension nodes as the last step of the schedule optimization by hoisting the extension node's added domain up to the root domain node. All following passes can assume that schedule trees work without restrictions, including the parallelism test. Mark the outermost loop of the optimized matrix-matrix multiplication as parallel such that -polly-parallel is able to parallelize that loop. Differential Revision: https://reviews.llvm.org/D58202 llvm-svn: 362257
Diffstat (limited to 'polly/include')
-rw-r--r--polly/include/polly/ScheduleTreeTransform.h26
-rw-r--r--polly/include/polly/ScopInfo.h5
2 files changed, 26 insertions, 5 deletions
diff --git a/polly/include/polly/ScheduleTreeTransform.h b/polly/include/polly/ScheduleTreeTransform.h
new file mode 100644
index 00000000000..9b2e7225680
--- /dev/null
+++ b/polly/include/polly/ScheduleTreeTransform.h
@@ -0,0 +1,26 @@
+//===- polly/ScheduleTreeTransform.h ----------------------------*- C++ -*-===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
+//
+//===----------------------------------------------------------------------===//
+//
+// Make changes to isl's schedule tree data structure.
+//
+//===----------------------------------------------------------------------===//
+
+#ifndef POLLY_SCHEDULETREETRANSFORM_H
+#define POLLY_SCHEDULETREETRANSFORM_H
+
+#include "isl/isl-noexceptions.h"
+
+namespace polly {
+/// Hoist all domains from extension into the root domain node, such that there
+/// are no more extension nodes (which isl does not support for some
+/// operations). This assumes that domains added by to extension nodes do not
+/// overlap.
+isl::schedule hoistExtensionNodes(isl::schedule Sched);
+} // namespace polly
+
+#endif // POLLY_SCHEDULETREETRANSFORM_H
diff --git a/polly/include/polly/ScopInfo.h b/polly/include/polly/ScopInfo.h
index bf03899a1bb..bae105b7f11 100644
--- a/polly/include/polly/ScopInfo.h
+++ b/polly/include/polly/ScopInfo.h
@@ -2975,11 +2975,6 @@ public:
/// that has name @p Name.
ScopArrayInfo *getArrayInfoByName(const std::string BaseName);
- /// Check whether @p Schedule contains extension nodes.
- ///
- /// @return true if @p Schedule contains extension nodes.
- static bool containsExtensionNode(isl::schedule Schedule);
-
/// Simplify the SCoP representation.
///
/// @param AfterHoisting Whether it is called after invariant load hoisting.
OpenPOWER on IntegriCloud