[flang-commits] [flang] 43aa40d - [flang][OpenMP] Remove OmpEndLoopDirective from PFT (#193602)

via flang-commits flang-commits at lists.llvm.org
Thu Apr 23 05:05:59 PDT 2026


Author: Krzysztof Parzyszek
Date: 2026-04-23T07:05:54-05:00
New Revision: 43aa40ddc67c8f1585e122c33706ecb17b24f3bd

URL: https://github.com/llvm/llvm-project/commit/43aa40ddc67c8f1585e122c33706ecb17b24f3bd
DIFF: https://github.com/llvm/llvm-project/commit/43aa40ddc67c8f1585e122c33706ecb17b24f3bd.diff

LOG: [flang][OpenMP] Remove OmpEndLoopDirective from PFT (#193602)

It's no longer necessary. An end-directive for a loop construct used to
be a separate construct, but now it only exists as a member in
OpenMPLoopConstruct.

Added: 
    

Modified: 
    flang/include/flang/Lower/PFTBuilder.h
    flang/lib/Lower/OpenMP/OpenMP.cpp
    flang/test/Lower/pre-fir-tree03.f90

Removed: 
    


################################################################################
diff  --git a/flang/include/flang/Lower/PFTBuilder.h b/flang/include/flang/Lower/PFTBuilder.h
index 55a755acaaeb7..840bbf705ff4a 100644
--- a/flang/include/flang/Lower/PFTBuilder.h
+++ b/flang/include/flang/Lower/PFTBuilder.h
@@ -141,7 +141,7 @@ using Directives =
     std::tuple<parser::CompilerDirective, parser::OpenACCConstruct,
                parser::OpenACCRoutineConstruct,
                parser::OpenACCDeclarativeConstruct, parser::OpenMPConstruct,
-               parser::OpenMPDeclarativeConstruct, parser::OmpEndLoopDirective,
+               parser::OpenMPDeclarativeConstruct,
                parser::CUFKernelDoConstruct>;
 
 using DeclConstructs = std::tuple<parser::OpenMPDeclarativeConstruct,

diff  --git a/flang/lib/Lower/OpenMP/OpenMP.cpp b/flang/lib/Lower/OpenMP/OpenMP.cpp
index bfdf77340c78e..fd1a8b9cd5a42 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2392,9 +2392,6 @@ static void genFuseOp(Fortran::lower::AbstractConverter &converter,
 
   llvm::SmallVector<mlir::Value> applyees;
   for (auto &child : eval.getNestedEvaluations()) {
-    // Stop at OmpEndLoopDirective
-    if (&child == &eval.getLastNestedEvaluation())
-      break;
     // Skip any Compiler Directive
     if (child.getIf<parser::CompilerDirective>())
       continue;

diff  --git a/flang/test/Lower/pre-fir-tree03.f90 b/flang/test/Lower/pre-fir-tree03.f90
index 1de66e3f8d016..03268ba0782d5 100644
--- a/flang/test/Lower/pre-fir-tree03.f90
+++ b/flang/test/Lower/pre-fir-tree03.f90
@@ -21,7 +21,6 @@ program test_omp
     ! CHECK: EndDoStmt
     end do
     ! CHECK: <<End DoConstruct>>
-    ! CHECK: OmpEndLoopDirective
     !$omp end do
     ! CHECK: <<End OpenMPConstruct>>
 


        


More information about the flang-commits mailing list