summaryrefslogtreecommitdiffstats
path: root/polly/lib/Transform
diff options
context:
space:
mode:
authorJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-09-27 15:43:29 +0000
committerJohannes Doerfert <doerfert@cs.uni-saarland.de>2015-09-27 15:43:29 +0000
commit45be64464bb27ffa24dfead655895377ffb2c8c5 (patch)
treeab14ccca4902ace215f0d998b49cc7fab2be1987 /polly/lib/Transform
parent0f376308495161944c407b91ee93b2e6d1feac13 (diff)
downloadbcm5719-llvm-45be64464bb27ffa24dfead655895377ffb2c8c5.tar.gz
bcm5719-llvm-45be64464bb27ffa24dfead655895377ffb2c8c5.zip
[NFC] Consistenly use commented and annotated ScopPass functions
The changes affect methods that are part of the Pass interface and include: - Comments that describe the methods purpose. - A consistent use of the keywords override and virtual. Additionally, the printScop method is now optional and removed from SCoP passes that do not implement it. llvm-svn: 248685
Diffstat (limited to 'polly/lib/Transform')
-rw-r--r--polly/lib/Transform/DeadCodeElimination.cpp5
-rw-r--r--polly/lib/Transform/ScheduleOptimizer.cpp11
2 files changed, 10 insertions, 6 deletions
diff --git a/polly/lib/Transform/DeadCodeElimination.cpp b/polly/lib/Transform/DeadCodeElimination.cpp
index 1d5ccbe5e6c..f8374d693aa 100644
--- a/polly/lib/Transform/DeadCodeElimination.cpp
+++ b/polly/lib/Transform/DeadCodeElimination.cpp
@@ -59,9 +59,10 @@ public:
static char ID;
explicit DeadCodeElim() : ScopPass(ID) {}
+ /// @brief Remove dead iterations from the schedule of @p S.
bool runOnScop(Scop &S) override;
- void printScop(raw_ostream &OS, Scop &S) const override;
+ /// @brief Register all analyses and transformation required.
void getAnalysisUsage(AnalysisUsage &AU) const override;
private:
@@ -166,8 +167,6 @@ bool DeadCodeElim::runOnScop(Scop &S) {
return eliminateDeadCode(S, DCEPreciseSteps);
}
-void DeadCodeElim::printScop(raw_ostream &, Scop &) const {}
-
void DeadCodeElim::getAnalysisUsage(AnalysisUsage &AU) const {
ScopPass::getAnalysisUsage(AU);
AU.addRequired<DependenceInfo>();
diff --git a/polly/lib/Transform/ScheduleOptimizer.cpp b/polly/lib/Transform/ScheduleOptimizer.cpp
index e573a6d65b4..e81a2655eea 100644
--- a/polly/lib/Transform/ScheduleOptimizer.cpp
+++ b/polly/lib/Transform/ScheduleOptimizer.cpp
@@ -328,18 +328,23 @@ public:
~IslScheduleOptimizer() { isl_schedule_free(LastSchedule); }
+ /// @brief Optimize the schedule of the SCoP @p S.
bool runOnScop(Scop &S) override;
+
+ /// @brief Print the new schedule for the SCoP @p S.
void printScop(raw_ostream &OS, Scop &S) const override;
- void getAnalysisUsage(AnalysisUsage &AU) const override;
-private:
- isl_schedule *LastSchedule;
+ /// @brief Register all analyses and transformation required.
+ void getAnalysisUsage(AnalysisUsage &AU) const override;
/// @brief Release the internal memory.
void releaseMemory() override {
isl_schedule_free(LastSchedule);
LastSchedule = nullptr;
}
+
+private:
+ isl_schedule *LastSchedule;
};
}
OpenPOWER on IntegriCloud