summaryrefslogtreecommitdiff
path: root/flang/lib/Optimizer/OpenMP/SimdOnly.cpp
AgeCommit message (Collapse)Author
2025-08-21[flang] Fix `replaceAllUsesWith` API violations (1/N) (#154698)Matthias Springer
`replaceAllUsesWith` is not safe to use in a dialect conversion and will be deactivated soon (#154112). Fix commit fixes some API violations. Also some general improvements.
2025-08-14[flang][OpenMP] Add -f[no]-openmp-simd (#150269)Kajetan Puchalski
Both clang and gfortran support the -fopenmp-simd flag, which enables OpenMP support only for simd constructs, while disabling the rest of OpenMP. Implement the appropriate parse tree rewriting to remove non-SIMD OpenMP constructs at the parsing stage. Add a new SimdOnly flang OpenMP IR pass which rewrites generated OpenMP FIR to handle untangling composite simd constructs, and clean up OpenMP operations leftover after the parse tree rewriting stage. With this approach, the two parts of the logic required to make the flag work can be self-contained within the parse tree rewriter and the MLIR pass, respectively. It does not need to be implemented within the core lowering logic itself. The flag is expected to have no effect if -fopenmp is passed explicitly, and is only expected to remove OpenMP constructs, not things like OpenMP library functions calls. This matches the behaviour of other compilers. --------- Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>