[polly] 07e7cb9 - [Polly] Remove -polly-opt-fusion option.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 23 13:45:53 PDT 2021


Author: Michael Kruse
Date: 2021-09-23T15:43:08-05:00
New Revision: 07e7cb9433daa80e7a8b418cb334c663abe68202

URL: https://github.com/llvm/llvm-project/commit/07e7cb9433daa80e7a8b418cb334c663abe68202
DIFF: https://github.com/llvm/llvm-project/commit/07e7cb9433daa80e7a8b418cb334c663abe68202.diff

LOG: [Polly] Remove -polly-opt-fusion option.

The name of the option is misleading and has been renamed by isl to
"serialize-sccs". Instead of also renaming the option, remove it.
The option is still accessible using

    -polly-isl-arg=--no-schedule-serialize-sccs

Added: 
    

Modified: 
    polly/lib/Analysis/ScopInfo.cpp
    polly/lib/CodeGen/PPCGCodeGeneration.cpp
    polly/lib/Transform/ScheduleOptimizer.cpp
    polly/test/ScheduleOptimizer/computeout.ll
    polly/test/ScheduleOptimizer/tile_after_fusion.ll

Removed: 
    


################################################################################
diff  --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp
index 659961215b951..d0ade9fd43873 100644
--- a/polly/lib/Analysis/ScopInfo.cpp
+++ b/polly/lib/Analysis/ScopInfo.cpp
@@ -1710,6 +1710,10 @@ Scop::Scop(Region &R, ScalarEvolution &ScalarEvolution, LoopInfo &LI,
     : IslCtx(isl_ctx_alloc(), isl_ctx_free), SE(&ScalarEvolution), DT(&DT),
       R(R), name(None), HasSingleExitEdge(R.getExitingBlock()), DC(DC),
       ORE(ORE), Affinator(this, LI), ID(ID) {
+
+  // Options defaults that are 
diff erent from ISL's.
+  isl_options_set_schedule_serialize_sccs(IslCtx.get(), true);
+
   SmallVector<char *, 8> IslArgv;
   IslArgv.reserve(1 + IslArgs.size());
 

diff  --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
index 1c4e24998f38c..f7fc2151f8525 100644
--- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp
+++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp
@@ -3249,6 +3249,7 @@ class PPCGCodeGeneration : public ScopPass {
     PPCGGen->kernel_id = 0;
 
     // Set scheduling strategy to same strategy PPCG is using.
+    isl_options_set_schedule_serialize_sccs(PPCGGen->ctx, false);
     isl_options_set_schedule_outer_coincidence(PPCGGen->ctx, true);
     isl_options_set_schedule_maximize_band_depth(PPCGGen->ctx, true);
     isl_options_set_schedule_whole_component(PPCGGen->ctx, false);

diff  --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index 93bf26f4db51c..4c47b8fce76a9 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -787,20 +787,7 @@ static bool runIslScheduleOptimizer(
     LLVM_DEBUG(dbgs() << "Proximity := " << Proximity << ";\n");
     LLVM_DEBUG(dbgs() << "Validity := " << Validity << ";\n");
 
-    unsigned IslSerializeSCCs;
-
-    if (FusionStrategy == "max") {
-      IslSerializeSCCs = 0;
-    } else if (FusionStrategy == "min") {
-      IslSerializeSCCs = 1;
-    } else {
-      errs() << "warning: Unknown fusion strategy. Falling back to maximal "
-                "fusion.\n";
-      IslSerializeSCCs = 0;
-    }
-
     int IslMaximizeBands;
-
     if (MaximizeBandDepth == "yes") {
       IslMaximizeBands = 1;
     } else if (MaximizeBandDepth == "no") {
@@ -813,7 +800,6 @@ static bool runIslScheduleOptimizer(
     }
 
     int IslOuterCoincidence;
-
     if (OuterCoincidence == "yes") {
       IslOuterCoincidence = 1;
     } else if (OuterCoincidence == "no") {
@@ -827,7 +813,6 @@ static bool runIslScheduleOptimizer(
     isl_ctx *Ctx = S.getIslCtx().get();
 
     isl_options_set_schedule_outer_coincidence(Ctx, IslOuterCoincidence);
-    isl_options_set_schedule_serialize_sccs(Ctx, IslSerializeSCCs);
     isl_options_set_schedule_maximize_band_depth(Ctx, IslMaximizeBands);
     isl_options_set_schedule_max_constant_term(Ctx, MaxConstantTerm);
     isl_options_set_schedule_max_coefficient(Ctx, MaxCoefficient);

diff  --git a/polly/test/ScheduleOptimizer/computeout.ll b/polly/test/ScheduleOptimizer/computeout.ll
index 73f3ead9ad2c8..5f07d47978029 100644
--- a/polly/test/ScheduleOptimizer/computeout.ll
+++ b/polly/test/ScheduleOptimizer/computeout.ll
@@ -1,7 +1,7 @@
-; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-opt-fusion=max -polly-ast -analyze < %s | FileCheck %s 
-; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-opt-fusion=max -disable-output < %s | FileCheck %s
-; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-opt-fusion=max -polly-ast -analyze -polly-dependences-computeout=1 < %s | FileCheck %s -check-prefix=TIMEOUT
-; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-opt-fusion=max -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
+; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-isl-arg=--no-schedule-serialize-sccs -polly-ast -analyze < %s | FileCheck %s
+; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -disable-output < %s | FileCheck %s
+; RUN: opt -S %loadPolly -basic-aa -polly-opt-isl -polly-isl-arg=--schedule-serialize-sccs -polly-ast -analyze -polly-dependences-computeout=1 < %s | FileCheck %s -check-prefix=TIMEOUT
+; RUN: opt -S %loadPolly "-passes=scop(polly-opt-isl,print<polly-ast>)" -polly-isl-arg=--no-schedule-serialize-sccs -polly-dependences-computeout=1 -disable-output < %s | FileCheck %s -check-prefix=TIMEOUT
 target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
 
 ;     for(i = 0; i < 100; i++ )

diff  --git a/polly/test/ScheduleOptimizer/tile_after_fusion.ll b/polly/test/ScheduleOptimizer/tile_after_fusion.ll
index 35f20ce5723d5..0ec7f453971b8 100644
--- a/polly/test/ScheduleOptimizer/tile_after_fusion.ll
+++ b/polly/test/ScheduleOptimizer/tile_after_fusion.ll
@@ -1,4 +1,4 @@
-; RUN: opt %loadPolly -polly-opt-isl -polly-ast -polly-opt-fusion=max -analyze < %s | FileCheck %s
+; RUN: opt %loadPolly -polly-opt-isl -polly-ast -polly-isl-arg=--no-schedule-serialize-sccs -analyze < %s | FileCheck %s
 ;
 ;
 ;    void tf(int C[256][256][256], int A0[256][256][256], int A1[256][256][256]) {


        


More information about the llvm-commits mailing list