Skip to content

Commit a33d1b0

Browse files
committed
Post-merge fixes
1 parent 480a5b1 commit a33d1b0

File tree

1 file changed

+3
-65
lines changed

1 file changed

+3
-65
lines changed

polly/lib/Transform/CodePreparation.cpp

Lines changed: 3 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -45,32 +45,6 @@ static bool runCodePreprationImpl(Function &F, DominatorTree *DT, LoopInfo *LI,
4545
return true;
4646
}
4747

48-
namespace {
49-
50-
/// Prepare the IR for the scop detection.
51-
///
52-
class CodePreparation final : public FunctionPass {
53-
CodePreparation(const CodePreparation &) = delete;
54-
const CodePreparation &operator=(const CodePreparation &) = delete;
55-
56-
void clear();
57-
58-
public:
59-
static char ID;
60-
61-
explicit CodePreparation() : FunctionPass(ID) {}
62-
~CodePreparation();
63-
64-
/// @name FunctionPass interface.
65-
//@{
66-
void getAnalysisUsage(AnalysisUsage &AU) const override;
67-
void releaseMemory() override;
68-
bool runOnFunction(Function &F) override;
69-
void print(raw_ostream &OS, const Module *) const override;
70-
//@}
71-
};
72-
} // namespace
73-
7448
PreservedAnalyses CodePreparationPass::run(Function &F,
7549
FunctionAnalysisManager &FAM) {
7650
auto &DT = FAM.getResult<DominatorTreeAnalysis>(F);
@@ -85,43 +59,7 @@ PreservedAnalyses CodePreparationPass::run(Function &F,
8559
return PA;
8660
}
8761

88-
void CodePreparation::clear() {}
89-
90-
CodePreparation::~CodePreparation() { clear(); }
91-
92-
void CodePreparation::getAnalysisUsage(AnalysisUsage &AU) const {
93-
AU.addRequired<LoopInfoWrapperPass>();
94-
95-
AU.addPreserved<LoopInfoWrapperPass>();
96-
AU.addPreserved<RegionInfoPass>();
97-
AU.addPreserved<DominatorTreeWrapperPass>();
98-
AU.addPreserved<DominanceFrontierWrapperPass>();
62+
bool polly::runCodePreparation(Function &F, DominatorTree *DT, LoopInfo *LI,
63+
RegionInfo *RI) {
64+
return runCodePreprationImpl(F, DT, LI, RI);
9965
}
100-
101-
bool CodePreparation::runOnFunction(Function &F) {
102-
if (skipFunction(F))
103-
return false;
104-
105-
DominatorTree *DT = &getAnalysis<DominatorTreeWrapperPass>().getDomTree();
106-
LoopInfo *LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
107-
RegionInfo *RI = &getAnalysis<RegionInfoPass>().getRegionInfo();
108-
109-
runCodePreprationImpl(F, DT, LI, RI);
110-
111-
return true;
112-
}
113-
114-
void CodePreparation::releaseMemory() { clear(); }
115-
116-
void CodePreparation::print(raw_ostream &OS, const Module *) const {}
117-
118-
char CodePreparation::ID = 0;
119-
char &polly::CodePreparationID = CodePreparation::ID;
120-
121-
Pass *polly::createCodePreparationPass() { return new CodePreparation(); }
122-
123-
INITIALIZE_PASS_BEGIN(CodePreparation, "polly-prepare",
124-
"Polly - Prepare code for polly", false, false)
125-
INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
126-
INITIALIZE_PASS_END(CodePreparation, "polly-prepare",
127-
"Polly - Prepare code for polly", false, false)

0 commit comments

Comments
 (0)