[flang-commits] [flang] [Flang][OpenMP] Skip unrelated passes in simd-only mode (PR #219193)
Sergio Afonso via flang-commits
flang-commits at lists.llvm.org
Thu Sep 3 05:52:47 PDT 2026
================
@@ -377,6 +382,10 @@ void createOpenMPFIRPassPipeline(mlir::PassManager &pm,
using DoConcurrentMappingKind =
Fortran::frontend::CodeGenOptions::DoConcurrentMappingKind;
+ // None of the passes below apply to simd constructs, so skip them.
+ if (opts.isSimdOnly)
+ return;
+
if (opts.doConcurrentMappingKind != DoConcurrentMappingKind::DCMK_None)
pm.addPass(flangomp::createDoConcurrentConversionPass(
opts.doConcurrentMappingKind == DoConcurrentMappingKind::DCMK_Device));
----------------
skatrak wrote:
No worries! I can reproduce the problem, but it appears to be a preexisting one.
The reason for this problem is not related to changes to `createOpenMPFIRPassPipeline`, but the OpenMP feature is enabled by `parseOpenMPArgs` whenever either `-fopenmp` or `-fopenmp-simd` are passed and that's the only thing that's checked by `CodeGenAction::beginSourceFileAction` before emitting the warning message. So the warning won't be emitted if any of the two options are passed.
Will create a fix for it shortly.
https://github.com/llvm/llvm-project/pull/219193
More information about the flang-commits
mailing list