[PATCH] D84064: [flang][openacc] OpenACC module signature

Peter Klausler via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 17 11:43:22 PDT 2020


klausler requested changes to this revision.
klausler added inline comments.
This revision now requires changes to proceed.


================
Comment at: flang/module/openacc.f90:17
+  ! 3.1 Runtime integer parameter openacc_version
+  integer(kind=4), parameter :: openacc_version = 201911
+
----------------
Explicit `kind` parameter values are generally non-portable.  I think that you can use a default `INTEGER` here.


================
Comment at: flang/module/openacc.f90:19
+
+  integer(kind=4), parameter :: acc_handle_kind = 4
+
----------------
`acc_handle_kind = kind(0)` or `acc_handle_kind = selected_int_kind(9)` would be better, I think.

Or define a `PRIVATE` parameter at the head of the file (`integer, private, parameter :: default_int_kind(kind(0))` and use that.  But `kind(0)` is idiomatic and clear.


================
Comment at: flang/module/openacc.f90:186
+
+contains
+  ! 3.2.1
----------------
Is your intent to implement these subprograms here in this module eventually?

If so, it might be better to define their `module` interfaces here in the module, and put their implementations into one or more submodules.

If not, then these subprograms should probably be just interfaces.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D84064/new/

https://reviews.llvm.org/D84064





More information about the llvm-commits mailing list