[flang][OpenMP] Remove OmpEndLoopDirective from PFT#193602
Merged
Conversation
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.
Member
|
@llvm/pr-subscribers-flang-fir-hlfir Author: Krzysztof Parzyszek (kparzysz) ChangesIt'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. Full diff: https://github.com/llvm/llvm-project/pull/193602.diff 3 Files Affected:
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 5cdb54a07fecd..ca0dc97cf2841 100644
--- a/flang/lib/Lower/OpenMP/OpenMP.cpp
+++ b/flang/lib/Lower/OpenMP/OpenMP.cpp
@@ -2391,9 +2391,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>>
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.