[flang-commits] [flang] [flang][OpenMP] Identify DO loops affected by loop-associated construct (PR #191719)
Leandro Lupori via flang-commits
flang-commits at lists.llvm.org
Tue Apr 14 13:50:35 PDT 2026
================
@@ -242,6 +242,13 @@ std::optional<int64_t> GetMinimumSequenceCount(
std::optional<int64_t> GetMinimumSequenceCount(
std::optional<std::pair<int64_t, int64_t>> range);
+/// Collect the set of DO loops present in the source code that are directly
+/// affected by the given loop construct. This does not include any DO loops
+/// that are affected by any construct nested in `x`.
+std::optional<std::vector<const parser::DoConstruct *>> CollectAffectedDoLoops(
+ const parser::OpenMPLoopConstruct &x, unsigned version,
+ SemanticsContext *semaCtx = nullptr);
----------------
luporl wrote:
It would be good to comment when this function can return `std::nullopt` or an empty vector.
>From the source, it seems `std::nullopt` is for when there is some issue, while an empty vector can be returned when depth is 0 or negative.
https://github.com/llvm/llvm-project/pull/191719
More information about the flang-commits
mailing list