[PATCH] D117766: [flang] Add support for -acc for compatibility with nvfortran.
Andrzej Warzynski via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 24 08:07:36 PST 2022
awarzynski added a comment.
This change will make the `flang` script support `nvfortran` a bit better, but that's at the cost of some extra complexity. And this script has never been meant to be particularly scalable or extensible :) @ygribov , do you envisage more such options? Or is this a one off?
================
Comment at: flang/tools/f18/flang:182
# * the external Fortran driver that will generate the code
# Most options accepted by Flang will be claimed by it. The only exceptions are
+# `-I`, `-J` and `-acc`.
----------------
`-acc` is not accepted by Flang, so it's in a yet different category. Also, the current comment is out-of-date: `-fopenmp` and `-fopenacc` _are_ in the same category as `-I` and `-J`. Would you mind updating it accordingly?
================
Comment at: flang/tools/f18/flang:259-263
+ elif
+ # Options that have different names in Flang and the external driver.
+ [[ $opt == "-acc" ]]; then
+ flang_opts+=(-fopenacc)
+ fc_opts+=($opt)
----------------
This new case makes sense, but could you make it clear that this is specifically for `nvfortan`? Updating the comment would be fine.
================
Comment at: flang/tools/f18/flang:262
+ [[ $opt == "-acc" ]]; then
+ flang_opts+=(-fopenacc)
+ fc_opts+=($opt)
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D117766/new/
https://reviews.llvm.org/D117766
More information about the llvm-commits
mailing list