Skip to content

Commit 67ff7b6

Browse files
committed
Remove ScopPass infrastructure
1 parent aecb692 commit 67ff7b6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+42
-1193
lines changed

polly/docs/ReleaseNotes.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,4 @@ In Polly |version| the following important changes have been incorporated.
1717

1818
* Polly's support for the legacy pass manager has been removed.
1919

20+
* The infrastructure around ScopPasses has been removed.

polly/include/polly/CodeGen/CodeGeneration.h

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,16 @@
1010
#define POLLY_CODEGENERATION_H
1111

1212
#include "polly/CodeGen/IRBuilder.h"
13-
#include "polly/ScopPass.h"
14-
#include "llvm/IR/PassManager.h"
13+
14+
namespace llvm {
15+
class RegionInfo;
16+
}
1517

1618
namespace polly {
1719
class IslAstInfo;
1820

21+
using llvm::BasicBlock;
22+
1923
enum VectorizerChoice {
2024
VECTORIZER_NONE,
2125
VECTORIZER_STRIPMINE,
@@ -28,11 +32,6 @@ extern VectorizerChoice PollyVectorizerChoice;
2832
/// UnreachableInst.
2933
void markBlockUnreachable(BasicBlock &Block, PollyIRBuilder &Builder);
3034

31-
struct CodeGenerationPass final : PassInfoMixin<CodeGenerationPass> {
32-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
33-
ScopStandardAnalysisResults &AR, SPMUpdater &U);
34-
};
35-
3635
extern bool PerfMonitoring;
3736

3837
bool runCodeGeneration(Scop &S, llvm::RegionInfo &RI, IslAstInfo &AI);

polly/include/polly/CodeGen/IslAst.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,11 @@
2222
#define POLLY_ISLAST_H
2323

2424
#include "polly/DependenceInfo.h"
25-
#include "polly/ScopPass.h"
2625
#include "llvm/ADT/SmallPtrSet.h"
27-
#include "llvm/IR/PassManager.h"
2826
#include "isl/ctx.h"
2927

3028
namespace polly {
29+
using llvm::raw_ostream;
3130
using llvm::SmallPtrSet;
3231

3332
class Dependences;
@@ -164,24 +163,6 @@ class IslAstInfo {
164163
///}
165164
};
166165

167-
struct IslAstAnalysis : AnalysisInfoMixin<IslAstAnalysis> {
168-
static AnalysisKey Key;
169-
170-
using Result = IslAstInfo;
171-
172-
IslAstInfo run(Scop &S, ScopAnalysisManager &SAM,
173-
ScopStandardAnalysisResults &SAR);
174-
};
175-
176-
struct IslAstPrinterPass final : PassInfoMixin<IslAstPrinterPass> {
177-
IslAstPrinterPass(raw_ostream &OS) : OS(OS) {}
178-
179-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
180-
ScopStandardAnalysisResults &, SPMUpdater &U);
181-
182-
raw_ostream &OS;
183-
};
184-
185166
std::unique_ptr<IslAstInfo> runIslAstGen(Scop &S,
186167
DependenceAnalysis::Result &DA);
187168
} // namespace polly

polly/include/polly/CodePreparation.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,19 +13,14 @@
1313
#ifndef POLLY_CODEPREPARATION_H
1414
#define POLLY_CODEPREPARATION_H
1515

16-
#include "llvm/IR/PassManager.h"
17-
1816
namespace llvm {
1917
class DominatorTree;
18+
class Function;
2019
class LoopInfo;
2120
class RegionInfo;
2221
} // namespace llvm
2322

2423
namespace polly {
25-
struct CodePreparationPass final : llvm::PassInfoMixin<CodePreparationPass> {
26-
llvm::PreservedAnalyses run(llvm::Function &F,
27-
llvm::FunctionAnalysisManager &FAM);
28-
};
2924

3025
bool runCodePreparation(llvm::Function &F, llvm::DominatorTree *DT,
3126
llvm::LoopInfo *LI, llvm::RegionInfo *RI);

polly/include/polly/DeLICM.h

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,33 +17,14 @@
1717
#ifndef POLLY_DELICM_H
1818
#define POLLY_DELICM_H
1919

20-
#include "polly/ScopPass.h"
2120
#include "isl/isl-noexceptions.h"
2221

2322
namespace llvm {
24-
class PassRegistry;
25-
class Pass;
2623
class raw_ostream;
2724
} // namespace llvm
2825

2926
namespace polly {
30-
31-
struct DeLICMPass final : llvm::PassInfoMixin<DeLICMPass> {
32-
DeLICMPass() {}
33-
34-
llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
35-
ScopStandardAnalysisResults &SAR, SPMUpdater &U);
36-
};
37-
38-
struct DeLICMPrinterPass final : llvm::PassInfoMixin<DeLICMPrinterPass> {
39-
DeLICMPrinterPass(raw_ostream &OS) : OS(OS) {}
40-
41-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &,
42-
ScopStandardAnalysisResults &SAR, SPMUpdater &);
43-
44-
private:
45-
llvm::raw_ostream &OS;
46-
};
27+
class Scop;
4728

4829
/// Determine whether two lifetimes are conflicting.
4930
///

polly/include/polly/DeadCodeElimination.h

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,9 @@
1414
#define POLLY_DEADCODEELIMINATION_H
1515

1616
#include "polly/DependenceInfo.h"
17-
#include "polly/ScopPass.h"
1817

1918
namespace polly {
2019

21-
struct DeadCodeElimPass final : llvm::PassInfoMixin<DeadCodeElimPass> {
22-
DeadCodeElimPass() {}
23-
24-
llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
25-
ScopStandardAnalysisResults &SAR, SPMUpdater &U);
26-
};
27-
2820
bool runDeadCodeElim(Scop &S, DependenceAnalysis::Result &DA);
2921
} // namespace polly
3022

polly/include/polly/DependenceInfo.h

Lines changed: 11 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,20 @@
2222
#ifndef POLLY_DEPENDENCE_INFO_H
2323
#define POLLY_DEPENDENCE_INFO_H
2424

25-
#include "polly/ScopPass.h"
25+
#include "llvm/ADT/DenseMap.h"
2626
#include "isl/ctx.h"
2727
#include "isl/isl-noexceptions.h"
2828

29+
namespace llvm {
30+
class raw_ostream;
31+
}
32+
2933
namespace polly {
34+
class MemoryAccess;
35+
class Scop;
36+
class ScopStmt;
37+
38+
using llvm::DenseMap;
3039

3140
/// The accumulated dependence information for a SCoP.
3241
///
@@ -194,8 +203,7 @@ class Dependences final {
194203

195204
extern Dependences::AnalysisLevel OptAnalysisLevel;
196205

197-
struct DependenceAnalysis final : public AnalysisInfoMixin<DependenceAnalysis> {
198-
static AnalysisKey Key;
206+
struct DependenceAnalysis final {
199207
struct Result {
200208
Scop &S;
201209
std::unique_ptr<Dependences> D[Dependences::NumAnalysisLevels];
@@ -220,18 +228,6 @@ struct DependenceAnalysis final : public AnalysisInfoMixin<DependenceAnalysis> {
220228
/// dependencies.
221229
void abandonDependences();
222230
};
223-
Result run(Scop &S, ScopAnalysisManager &SAM,
224-
ScopStandardAnalysisResults &SAR);
225-
};
226-
227-
struct DependenceInfoPrinterPass final
228-
: PassInfoMixin<DependenceInfoPrinterPass> {
229-
DependenceInfoPrinterPass(raw_ostream &OS) : OS(OS) {}
230-
231-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &,
232-
ScopStandardAnalysisResults &, SPMUpdater &);
233-
234-
raw_ostream &OS;
235231
};
236232

237233
DependenceAnalysis::Result runDependenceAnalysis(Scop &S);

polly/include/polly/ForwardOpTree.h

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,31 +13,8 @@
1313
#ifndef POLLY_FORWARDOPTREE_H
1414
#define POLLY_FORWARDOPTREE_H
1515

16-
#include "polly/ScopPass.h"
17-
18-
namespace llvm {
19-
class PassRegistry;
20-
} // namespace llvm
21-
2216
namespace polly {
23-
24-
struct ForwardOpTreePass final : llvm::PassInfoMixin<ForwardOpTreePass> {
25-
ForwardOpTreePass() {}
26-
27-
llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM,
28-
ScopStandardAnalysisResults &SAR, SPMUpdater &U);
29-
};
30-
31-
struct ForwardOpTreePrinterPass final
32-
: llvm::PassInfoMixin<ForwardOpTreePrinterPass> {
33-
ForwardOpTreePrinterPass(raw_ostream &OS) : OS(OS) {}
34-
35-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &,
36-
ScopStandardAnalysisResults &SAR, SPMUpdater &);
37-
38-
private:
39-
llvm::raw_ostream &OS;
40-
};
17+
class Scop;
4118

4219
/// Pass that redirects scalar reads to array elements that are known to contain
4320
/// the same value.

polly/include/polly/JSONExporter.h

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,26 +10,15 @@
1010
#define POLLY_JSONEXPORTER_H
1111

1212
#include "polly/DependenceInfo.h"
13-
#include "polly/ScopPass.h"
14-
#include "llvm/IR/PassManager.h"
1513

1614
namespace polly {
1715

18-
/// This pass exports a scop to a jscop file. The filename is generated from the
19-
/// concatenation of the function and scop name.
20-
struct JSONExportPass final : llvm::PassInfoMixin<JSONExportPass> {
21-
llvm::PreservedAnalyses run(Scop &, ScopAnalysisManager &,
22-
ScopStandardAnalysisResults &, SPMUpdater &);
23-
};
24-
2516
/// This pass imports a scop from a jscop file. The filename is deduced from the
2617
/// concatenation of the function and scop name.
27-
struct JSONImportPass final : llvm::PassInfoMixin<JSONExportPass> {
28-
llvm::PreservedAnalyses run(Scop &, ScopAnalysisManager &,
29-
ScopStandardAnalysisResults &, SPMUpdater &);
30-
};
31-
3218
void runImportJSON(Scop &S, DependenceAnalysis::Result &DA);
19+
20+
/// This pass exports a scop to a jscop file. The filename is generated from the
21+
/// concatenation of the function and scop name.
3322
void runExportJSON(Scop &S);
3423
} // namespace polly
3524

polly/include/polly/MaximalStaticExpansion.h

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,9 @@
1515
#define POLLY_MAXIMALSTATICEXPANSION_H
1616

1717
#include "polly/DependenceInfo.h"
18-
#include "polly/ScopPass.h"
19-
#include "llvm/IR/PassManager.h"
2018

2119
namespace polly {
2220

23-
class MaximalStaticExpansionPass
24-
: public llvm::PassInfoMixin<MaximalStaticExpansionPass> {
25-
public:
26-
llvm::PreservedAnalyses run(Scop &, ScopAnalysisManager &,
27-
ScopStandardAnalysisResults &, SPMUpdater &);
28-
};
29-
30-
struct MaximalStaticExpansionPrinterPass
31-
: llvm::PassInfoMixin<MaximalStaticExpansionPrinterPass> {
32-
MaximalStaticExpansionPrinterPass(raw_ostream &OS) : OS(OS) {}
33-
34-
PreservedAnalyses run(Scop &S, ScopAnalysisManager &,
35-
ScopStandardAnalysisResults &SAR, SPMUpdater &);
36-
37-
private:
38-
llvm::raw_ostream &OS;
39-
};
40-
4121
void runMaximalStaticExpansion(Scop &S, DependenceAnalysis::Result &DI);
4222
} // namespace polly
4323

0 commit comments

Comments
 (0)