Skip to content

Conversation

kparzysz
Copy link
Contributor

No description provided.

@kparzysz kparzysz requested review from Stylie777 and tblah September 18, 2025 14:17
@llvmbot llvmbot added flang Flang issues not falling into any other category flang:openmp flang:semantics flang:parser labels Sep 18, 2025
@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2025

@llvm/pr-subscribers-flang-openmp

Author: Krzysztof Parzyszek (kparzysz)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/159576.diff

4 Files Affected:

  • (modified) flang/examples/FeatureList/FeatureList.cpp (-1)
  • (modified) flang/include/flang/Parser/dump-parse-tree.h (-1)
  • (modified) flang/include/flang/Parser/parse-tree.h (-6)
  • (modified) flang/lib/Semantics/check-omp-structure.cpp (-4)
diff --git a/flang/examples/FeatureList/FeatureList.cpp b/flang/examples/FeatureList/FeatureList.cpp
index 8d370adc51d61..cb92e30051930 100644
--- a/flang/examples/FeatureList/FeatureList.cpp
+++ b/flang/examples/FeatureList/FeatureList.cpp
@@ -485,7 +485,6 @@ struct NodeVisitor {
   READ_FEATURE(OmpLinearClause::Modifier)
   READ_FEATURE(OmpLinearModifier)
   READ_FEATURE(OmpLinearModifier::Value)
-  READ_FEATURE(OmpLoopDirective)
   READ_FEATURE(OmpMapClause)
   READ_FEATURE(OmpMapClause::Modifier)
   READ_FEATURE(OmpNumTasksClause)
diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h
index 1c9fd7673e06d..61a94223aabf4 100644
--- a/flang/include/flang/Parser/dump-parse-tree.h
+++ b/flang/include/flang/Parser/dump-parse-tree.h
@@ -615,7 +615,6 @@ class ParseTreeDumper {
   NODE_ENUM(OmpLinearModifier, Value)
   NODE(parser, OmpLocator)
   NODE(parser, OmpLocatorList)
-  NODE(parser, OmpLoopDirective)
   NODE(parser, OmpMapClause)
   NODE(OmpMapClause, Modifier)
   NODE(parser, OmpMapper)
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 7307283eb91ec..ff5a8b026613f 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -5075,12 +5075,6 @@ struct OpenMPAtomicConstruct : public OmpBlockConstruct {
   mutable Analysis analysis;
 };
 
-// OpenMP directives that associate with loop(s)
-struct OmpLoopDirective {
-  WRAPPER_CLASS_BOILERPLATE(OmpLoopDirective, llvm::omp::Directive);
-  CharBlock source;
-};
-
 // 2.14.2 cancellation-point -> CANCELLATION POINT construct-type-clause
 struct OpenMPCancellationPointConstruct {
   WRAPPER_CLASS_BOILERPLATE(
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 4c7cd1734e0e7..421e9e149755c 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -679,10 +679,6 @@ template <typename Checker> struct DirectiveSpellingVisitor {
     checker_(x.DirName().source, x.DirId());
     return false;
   }
-  bool Pre(const parser::OmpLoopDirective &x) {
-    checker_(x.source, x.v);
-    return false;
-  }
 
   bool Pre(const parser::OmpDirectiveSpecification &x) {
     auto &name = std::get<parser::OmpDirectiveName>(x.t);

@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2025

@llvm/pr-subscribers-flang-parser

Author: Krzysztof Parzyszek (kparzysz)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/159576.diff

4 Files Affected:

  • (modified) flang/examples/FeatureList/FeatureList.cpp (-1)
  • (modified) flang/include/flang/Parser/dump-parse-tree.h (-1)
  • (modified) flang/include/flang/Parser/parse-tree.h (-6)
  • (modified) flang/lib/Semantics/check-omp-structure.cpp (-4)
diff --git a/flang/examples/FeatureList/FeatureList.cpp b/flang/examples/FeatureList/FeatureList.cpp
index 8d370adc51d61..cb92e30051930 100644
--- a/flang/examples/FeatureList/FeatureList.cpp
+++ b/flang/examples/FeatureList/FeatureList.cpp
@@ -485,7 +485,6 @@ struct NodeVisitor {
   READ_FEATURE(OmpLinearClause::Modifier)
   READ_FEATURE(OmpLinearModifier)
   READ_FEATURE(OmpLinearModifier::Value)
-  READ_FEATURE(OmpLoopDirective)
   READ_FEATURE(OmpMapClause)
   READ_FEATURE(OmpMapClause::Modifier)
   READ_FEATURE(OmpNumTasksClause)
diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h
index 1c9fd7673e06d..61a94223aabf4 100644
--- a/flang/include/flang/Parser/dump-parse-tree.h
+++ b/flang/include/flang/Parser/dump-parse-tree.h
@@ -615,7 +615,6 @@ class ParseTreeDumper {
   NODE_ENUM(OmpLinearModifier, Value)
   NODE(parser, OmpLocator)
   NODE(parser, OmpLocatorList)
-  NODE(parser, OmpLoopDirective)
   NODE(parser, OmpMapClause)
   NODE(OmpMapClause, Modifier)
   NODE(parser, OmpMapper)
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 7307283eb91ec..ff5a8b026613f 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -5075,12 +5075,6 @@ struct OpenMPAtomicConstruct : public OmpBlockConstruct {
   mutable Analysis analysis;
 };
 
-// OpenMP directives that associate with loop(s)
-struct OmpLoopDirective {
-  WRAPPER_CLASS_BOILERPLATE(OmpLoopDirective, llvm::omp::Directive);
-  CharBlock source;
-};
-
 // 2.14.2 cancellation-point -> CANCELLATION POINT construct-type-clause
 struct OpenMPCancellationPointConstruct {
   WRAPPER_CLASS_BOILERPLATE(
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 4c7cd1734e0e7..421e9e149755c 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -679,10 +679,6 @@ template <typename Checker> struct DirectiveSpellingVisitor {
     checker_(x.DirName().source, x.DirId());
     return false;
   }
-  bool Pre(const parser::OmpLoopDirective &x) {
-    checker_(x.source, x.v);
-    return false;
-  }
 
   bool Pre(const parser::OmpDirectiveSpecification &x) {
     auto &name = std::get<parser::OmpDirectiveName>(x.t);

@llvmbot
Copy link
Member

llvmbot commented Sep 18, 2025

@llvm/pr-subscribers-flang-semantics

Author: Krzysztof Parzyszek (kparzysz)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/159576.diff

4 Files Affected:

  • (modified) flang/examples/FeatureList/FeatureList.cpp (-1)
  • (modified) flang/include/flang/Parser/dump-parse-tree.h (-1)
  • (modified) flang/include/flang/Parser/parse-tree.h (-6)
  • (modified) flang/lib/Semantics/check-omp-structure.cpp (-4)
diff --git a/flang/examples/FeatureList/FeatureList.cpp b/flang/examples/FeatureList/FeatureList.cpp
index 8d370adc51d61..cb92e30051930 100644
--- a/flang/examples/FeatureList/FeatureList.cpp
+++ b/flang/examples/FeatureList/FeatureList.cpp
@@ -485,7 +485,6 @@ struct NodeVisitor {
   READ_FEATURE(OmpLinearClause::Modifier)
   READ_FEATURE(OmpLinearModifier)
   READ_FEATURE(OmpLinearModifier::Value)
-  READ_FEATURE(OmpLoopDirective)
   READ_FEATURE(OmpMapClause)
   READ_FEATURE(OmpMapClause::Modifier)
   READ_FEATURE(OmpNumTasksClause)
diff --git a/flang/include/flang/Parser/dump-parse-tree.h b/flang/include/flang/Parser/dump-parse-tree.h
index 1c9fd7673e06d..61a94223aabf4 100644
--- a/flang/include/flang/Parser/dump-parse-tree.h
+++ b/flang/include/flang/Parser/dump-parse-tree.h
@@ -615,7 +615,6 @@ class ParseTreeDumper {
   NODE_ENUM(OmpLinearModifier, Value)
   NODE(parser, OmpLocator)
   NODE(parser, OmpLocatorList)
-  NODE(parser, OmpLoopDirective)
   NODE(parser, OmpMapClause)
   NODE(OmpMapClause, Modifier)
   NODE(parser, OmpMapper)
diff --git a/flang/include/flang/Parser/parse-tree.h b/flang/include/flang/Parser/parse-tree.h
index 7307283eb91ec..ff5a8b026613f 100644
--- a/flang/include/flang/Parser/parse-tree.h
+++ b/flang/include/flang/Parser/parse-tree.h
@@ -5075,12 +5075,6 @@ struct OpenMPAtomicConstruct : public OmpBlockConstruct {
   mutable Analysis analysis;
 };
 
-// OpenMP directives that associate with loop(s)
-struct OmpLoopDirective {
-  WRAPPER_CLASS_BOILERPLATE(OmpLoopDirective, llvm::omp::Directive);
-  CharBlock source;
-};
-
 // 2.14.2 cancellation-point -> CANCELLATION POINT construct-type-clause
 struct OpenMPCancellationPointConstruct {
   WRAPPER_CLASS_BOILERPLATE(
diff --git a/flang/lib/Semantics/check-omp-structure.cpp b/flang/lib/Semantics/check-omp-structure.cpp
index 4c7cd1734e0e7..421e9e149755c 100644
--- a/flang/lib/Semantics/check-omp-structure.cpp
+++ b/flang/lib/Semantics/check-omp-structure.cpp
@@ -679,10 +679,6 @@ template <typename Checker> struct DirectiveSpellingVisitor {
     checker_(x.DirName().source, x.DirId());
     return false;
   }
-  bool Pre(const parser::OmpLoopDirective &x) {
-    checker_(x.source, x.v);
-    return false;
-  }
 
   bool Pre(const parser::OmpDirectiveSpecification &x) {
     auto &name = std::get<parser::OmpDirectiveName>(x.t);

Copy link
Contributor

@Stylie777 Stylie777 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kparzysz kparzysz merged commit e2467cb into llvm:main Sep 19, 2025
14 checks passed
@kparzysz kparzysz deleted the users/kparzysz/remove-omploopdirective branch September 19, 2025 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flang:openmp flang:parser flang:semantics flang Flang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants