[flang-commits] [flang] [flang][Lower] Always generate namelist group locally (PR #109303)
Tom Eccles via flang-commits
flang-commits at lists.llvm.org
Fri Sep 20 03:01:11 PDT 2024
tblah wrote:
Thanks for taking a look.
> Could we look at compilation options to inform this decision, either now or in the long run?
I was originally thinking about doing this only when `-fopenmp` is passed, but there is `do concurrent` as well.
> Is this really legal OpenMP?
I agree this probably shouldn't be legal OpenMP, but so far as I can tell, restrictions on privatisation do not apply to reductions. The upstream ticket indicates that this is supported by both ifort and gfortran. But I would be very happy to instead add a semantic check preventing this if sufficient consensus could be reached to deviate from OpenMP and F23.
I agree that creating a very large namelist could be a performance hit. Do those programs declare all variables inside of the namelist inside of a common block (i.e. is this an optimization that users expect)?. If some of the variables are local then this optimization could not be performed anyway.
https://github.com/llvm/llvm-project/pull/109303
More information about the flang-commits
mailing list