diff options
author | Michael Kruse <llvm-project@meinersbur.de> | 2021-09-22 17:27:16 -0500 |
---|---|---|
committer | Michael Kruse <llvm-project@meinersbur.de> | 2021-09-22 17:28:25 -0500 |
commit | 52c30adc7dfe6334b71adf256d81f70e7b976143 (patch) | |
tree | 8d42406c62c45c12758095e0e0487bb1f39696a2 /polly/include | |
parent | ac191bcc99e2fc4ab7993138f5e82a0b75b7e9db (diff) | |
download | llvm-52c30adc7dfe6334b71adf256d81f70e7b976143.tar.gz |
[Polly] Implement user-directed loop distribution/fission.
This is a simple version without the possibility to define distribute
points or followup-transformations. However, it is the first
transformation that has to check whether the transformation is correct.
It interprets the same metadata as the LoopDistribute pass.
Diffstat (limited to 'polly/include')
-rw-r--r-- | polly/include/polly/DependenceInfo.h | 4 | ||||
-rw-r--r-- | polly/include/polly/ManualOptimizer.h | 9 | ||||
-rw-r--r-- | polly/include/polly/ScheduleTreeTransform.h | 3 |
3 files changed, 15 insertions, 1 deletions
diff --git a/polly/include/polly/DependenceInfo.h b/polly/include/polly/DependenceInfo.h index a8b11191d619..3d70ea2b74e5 100644 --- a/polly/include/polly/DependenceInfo.h +++ b/polly/include/polly/DependenceInfo.h @@ -124,6 +124,10 @@ struct Dependences { /// dependences. bool isValidSchedule(Scop &S, const StatementToIslMapTy &NewSchedules) const; + /// Return true of the schedule @p NewSched is a schedule for @S that does not + /// violate any dependences. + bool isValidSchedule(Scop &S, isl::schedule NewSched) const; + /// Print the stored dependence information. void print(llvm::raw_ostream &OS) const; diff --git a/polly/include/polly/ManualOptimizer.h b/polly/include/polly/ManualOptimizer.h index 066eb4d84c51..988926334eb1 100644 --- a/polly/include/polly/ManualOptimizer.h +++ b/polly/include/polly/ManualOptimizer.h @@ -15,8 +15,13 @@ #include "isl/isl-noexceptions.h" +namespace llvm { +class OptimizationRemarkEmitter; +} + namespace polly { class Scop; +struct Dependences; /// Apply loop-transformation metadata. /// @@ -30,7 +35,9 @@ class Scop; /// @return The transformed schedule with all mark-nodes with loop /// transformations applied. Returns NULL in case of an error or @p /// Sched itself if no transformation has been applied. -isl::schedule applyManualTransformations(Scop *S, isl::schedule Sched); +isl::schedule applyManualTransformations(Scop *S, isl::schedule Sched, + const Dependences &D, + llvm::OptimizationRemarkEmitter *ORE); } // namespace polly #endif /* POLLY_MANUALOPTIMIZER_H */ diff --git a/polly/include/polly/ScheduleTreeTransform.h b/polly/include/polly/ScheduleTreeTransform.h index 5fd0d6ad4dd0..e8685313c83c 100644 --- a/polly/include/polly/ScheduleTreeTransform.h +++ b/polly/include/polly/ScheduleTreeTransform.h @@ -178,6 +178,9 @@ isl::schedule applyFullUnroll(isl::schedule_node BandToUnroll); /// Replace the AST band @p BandToUnroll by a partially unrolled equivalent. isl::schedule applyPartialUnroll(isl::schedule_node BandToUnroll, int Factor); +/// Loop-distribute the band @p BandToFission as much as possible. +isl::schedule applyMaxFission(isl::schedule_node BandToFission); + /// Build the desired set of partial tile prefixes. /// /// We build a set of partial tile prefixes, which are prefixes of the vector |