[polly] r294444 - [NFC] Make ScheduleTreeOptimizer::optimizeBand return a schedule node optimized
Roman Gareev via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 8 05:29:07 PST 2017
Author: romangareev
Date: Wed Feb 8 07:29:06 2017
New Revision: 294444
URL: http://llvm.org/viewvc/llvm-project?rev=294444&view=rev
Log:
[NFC] Make ScheduleTreeOptimizer::optimizeBand return a schedule node optimized
with optimizeMatMulPattern
This patch makes ScheduleTreeOptimizer::optimizeBand return a schedule node
optimized with optimizeMatMulPattern. Otherwise, it could not use the isolate
option, because standardBandOpts could try to tile a band node with anchored
subtree and get the error, since the use of the isolate option causes any tree
containing the node to be considered anchored. Furthermore, it is not intended
to apply standard optimizations, when the matrix multiplication has been
detected.
Modified:
polly/trunk/lib/Transform/ScheduleOptimizer.cpp
polly/trunk/test/ScheduleOptimizer/mat_mul_pattern_data_layout_2.ll
polly/trunk/test/ScheduleOptimizer/pattern-matching-based-opts_3.ll
Modified: polly/trunk/lib/Transform/ScheduleOptimizer.cpp
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/lib/Transform/ScheduleOptimizer.cpp?rev=294444&r1=294443&r2=294444&view=diff
==============================================================================
--- polly/trunk/lib/Transform/ScheduleOptimizer.cpp (original)
+++ polly/trunk/lib/Transform/ScheduleOptimizer.cpp Wed Feb 8 07:29:06 2017
@@ -1179,7 +1179,7 @@ ScheduleTreeOptimizer::optimizeBand(__is
MatMulInfoTy MMI;
if (PMBasedOpts && User && isMatrMultPattern(Node, OAI->D, MMI)) {
DEBUG(dbgs() << "The matrix multiplication pattern was detected\n");
- Node = optimizeMatMulPattern(Node, OAI->TTI, MMI);
+ return optimizeMatMulPattern(Node, OAI->TTI, MMI);
}
return standardBandOpts(Node, User);
Modified: polly/trunk/test/ScheduleOptimizer/mat_mul_pattern_data_layout_2.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScheduleOptimizer/mat_mul_pattern_data_layout_2.ll?rev=294444&r1=294443&r2=294444&view=diff
==============================================================================
--- polly/trunk/test/ScheduleOptimizer/mat_mul_pattern_data_layout_2.ll (original)
+++ polly/trunk/test/ScheduleOptimizer/mat_mul_pattern_data_layout_2.ll Wed Feb 8 07:29:06 2017
@@ -42,8 +42,6 @@
; CHECK-NEXT: for (int c4 = 0; c4 <= 23; c4 += 1)
; CHECK-NEXT: for (int c5 = 0; c5 <= min(255, -256 * c1 + 1022); c5 += 1) {
; CHECK-NEXT: // Register tiling - Points
-; CHECK-NEXT: // 1st level tiling - Tiles
-; CHECK-NEXT: // 1st level tiling - Points
; CHECK-NEXT: {
; CHECK-NEXT: Stmt_Copy_0(96 * c2 + 4 * c4, 8 * c3, 256 * c1 + c5);
; CHECK-NEXT: Stmt_Copy_0(96 * c2 + 4 * c4, 8 * c3 + 1, 256 * c1 + c5);
Modified: polly/trunk/test/ScheduleOptimizer/pattern-matching-based-opts_3.ll
URL: http://llvm.org/viewvc/llvm-project/polly/trunk/test/ScheduleOptimizer/pattern-matching-based-opts_3.ll?rev=294444&r1=294443&r2=294444&view=diff
==============================================================================
--- polly/trunk/test/ScheduleOptimizer/pattern-matching-based-opts_3.ll (original)
+++ polly/trunk/test/ScheduleOptimizer/pattern-matching-based-opts_3.ll Wed Feb 8 07:29:06 2017
@@ -38,8 +38,6 @@
; CHECK-NEXT: for (int c1 = 0; c1 <= 263; c1 += 1)
; CHECK-NEXT: for (int c2 = 0; c2 <= 1023; c2 += 1) {
; CHECK-NEXT: // Register tiling - Points
-; CHECK-NEXT: // 1st level tiling - Tiles
-; CHECK-NEXT: // 1st level tiling - Points
; CHECK-NEXT: {
; CHECK-NEXT: Stmt_Copy_0(4 * c1, 8 * c0, c2);
; CHECK-NEXT: Stmt_Copy_0(4 * c1, 8 * c0 + 1, c2);
@@ -101,8 +99,6 @@
; EXTRACTION-OF-MACRO-KERNEL-NEXT: for (int c4 = 0; c4 <= 23; c4 += 1)
; EXTRACTION-OF-MACRO-KERNEL-NEXT: for (int c5 = 0; c5 <= 255; c5 += 1) {
; EXTRACTION-OF-MACRO-KERNEL-NEXT: // Register tiling - Points
-; EXTRACTION-OF-MACRO-KERNEL-NEXT: // 1st level tiling - Tiles
-; EXTRACTION-OF-MACRO-KERNEL-NEXT: // 1st level tiling - Points
; EXTRACTION-OF-MACRO-KERNEL-NEXT: {
; EXTRACTION-OF-MACRO-KERNEL-NEXT: Stmt_Copy_0(96 * c2 + 4 * c4, 8 * c3, 256 * c1 + c5);
; EXTRACTION-OF-MACRO-KERNEL-NEXT: Stmt_Copy_0(96 * c2 + 4 * c4, 8 * c3 + 1, 256 * c1 + c5);
More information about the llvm-commits
mailing list