[flang-commits] [flang] [Flang][OpenMP] Add semantic support for Loop Sequences and OpenMP loop fuse (PR #161213)
Ferran Toda via flang-commits
flang-commits at lists.llvm.org
Mon Oct 6 06:01:25 PDT 2025
================
@@ -1980,10 +1984,10 @@ bool OmpAttributeVisitor::Pre(const parser::OpenMPLoopConstruct &x) {
SetContextAssociatedLoopLevel(GetNumAffectedLoopsFromLoopConstruct(x));
if (beginName.v == llvm::omp::Directive::OMPD_do) {
- auto &optLoopCons = std::get<std::optional<parser::NestedConstruct>>(x.t);
- if (optLoopCons.has_value()) {
+ auto &loopConsList = std::get<std::list<parser::NestedConstruct>>(x.t);
+ if (loopConsList.size() == 1) { //a OMPD_do cant be a loop sequence
----------------
NouTimbaler wrote:
During canonicallization it is only allowed to form a loop sequence if the `OMP FUSE` directive is present.
I can add an assertion here
https://github.com/llvm/llvm-project/pull/161213
More information about the flang-commits
mailing list