[flang-commits] [flang] [flang][OpenMP] Support lowering of metadirective (part 1) (PR #193664)

Abid Qadeer via flang-commits flang-commits at lists.llvm.org
Mon Jun 1 04:08:24 PDT 2026


================
@@ -229,6 +230,19 @@ std::optional<llvm::SmallVector<mlir::Value>> getIteratorElementIndices(
     Fortran::lower::AbstractConverter &converter, const omp::Object &object,
     Fortran::lower::StatementContext &stmtCtx, mlir::Location loc);
 
+llvm::omp::TraitSet
+mapTraitSet(parser::OmpTraitSetSelectorName::Value flangSet);
+
+llvm::omp::TraitSelector
+mapTraitSelector(const parser::OmpTraitSelectorName &name,
+                 llvm::omp::TraitSet set);
+
+void makeVariantMatchInfo(llvm::omp::VariantMatchInfo &vmi,
+                          const parser::modifier::OmpContextSelector &ctxSel,
+                          semantics::SemanticsContext &semaCtx,
+                          mlir::Location loc,
+                          const parser::ScalarExpr *&dynamicCondExpr);
+
----------------
abidh wrote:

nit: These functions (makeVariantMatchInfo, mapTraitSet, mapTraitSelector) may find reuse in other places (e.g. declare variant lowering). A brief doc comment on each declaration, explaining the contract of makeVariantMatchInfo in particular, would help future users of this API.

https://github.com/llvm/llvm-project/pull/193664


More information about the flang-commits mailing list