From 07e7cb9433daa80e7a8b418cb334c663abe68202 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Thu, 23 Sep 2021 15:37:56 -0500 Subject: [PATCH] [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 --- polly/lib/Analysis/ScopInfo.cpp | 4 ++++ polly/lib/CodeGen/PPCGCodeGeneration.cpp | 1 + polly/lib/Transform/ScheduleOptimizer.cpp | 15 --------------- polly/test/ScheduleOptimizer/computeout.ll | 8 ++++---- polly/test/ScheduleOptimizer/tile_after_fusion.ll | 2 +- 5 files changed, 10 insertions(+), 20 deletions(-) diff --git a/polly/lib/Analysis/ScopInfo.cpp b/polly/lib/Analysis/ScopInfo.cpp index 659961215b95..d0ade9fd4387 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 different from ISL's. + isl_options_set_schedule_serialize_sccs(IslCtx.get(), true); + SmallVector IslArgv; IslArgv.reserve(1 + IslArgs.size()); diff --git a/polly/lib/CodeGen/PPCGCodeGeneration.cpp b/polly/lib/CodeGen/PPCGCodeGeneration.cpp index 1c4e24998f38..f7fc2151f852 100644 --- a/polly/lib/CodeGen/PPCGCodeGeneration.cpp +++ b/polly/lib/CodeGen/PPCGCodeGeneration.cpp @@ -3249,6 +3249,7 @@ public: 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 93bf26f4db51..4c47b8fce76a 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 73f3ead9ad2c..5f07d4797802 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-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-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-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-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 35f20ce5723d..0ec7f453971b 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]) {