[polly] [Polly] Keep proximity dependence exact if simplifying it unbounds its distance (PR #225840)
Timur Baidusenov via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 26 10:35:47 PDT 2026
================
@@ -656,6 +656,41 @@ static void printSchedule(llvm::raw_ostream &OS, const isl::schedule &Schedule,
}
#endif
+/// Return whether the dependence distances of @p Map, which relates instances
+/// of the same statement, are bounded.
+static bool hasBoundedDistances(const isl::map &Map) {
+ isl::set Deltas = Map.deltas();
+ return !Deltas.is_null() && isl_set_is_bounded(Deltas.get()) == isl_bool_true;
+}
+
+/// Undo the simplification of the proximity dependences of a statement on
+/// itself where it made their distances unbounded.
+///
+/// The scheduler looks for schedule rows that bound the distance of every
+/// proximity dependence. If the simplification drops the constraints of the
+/// domain that bound the distance of a dependence, such as a value that is
+/// read by all later iterations of a loop, then every row that advances along
+/// that loop has an unbounded distance, and the scheduler falls back to
+/// carrying dependences one row at a time instead of forming a permutable
+/// band.
+///
+/// @param Simplified The simplified proximity dependences.
+/// @param Exact The proximity dependences before simplification.
+static isl::union_map keepBoundedDistances(isl::union_map Simplified,
----------------
bai-tim wrote:
Addressed
https://github.com/llvm/llvm-project/pull/225840
More information about the llvm-commits
mailing list