[all-commits] [llvm/llvm-project] 2855e8: [flang][cuda] Record implicit managed attribution ...
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Mon Sep 21 22:25:45 PDT 2026
Branch: refs/heads/users/ergawy/pinned-implicit-modfile
Home: https://github.com/llvm/llvm-project
Commit: 2855e82cfaa558bb0289e2aa0e5e533496d86810
https://github.com/llvm/llvm-project/commit/2855e82cfaa558bb0289e2aa0e5e533496d86810
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-09-20 (Sun, 20 Sep 2026)
Changed paths:
M flang/include/flang/Parser/dump-parse-tree.h
M flang/include/flang/Parser/parse-tree.h
M flang/lib/Parser/Fortran-parsers.cpp
M flang/lib/Parser/unparse.cpp
M flang/lib/Semantics/mod-file.cpp
M flang/lib/Semantics/resolve-names.cpp
M flang/test/Parser/cuf-sanity-tree.CUF
A flang/test/Semantics/CUDA/cuda-managed-implicit-modfile.cuf
Log Message:
-----------
[flang][cuda] Record implicit managed attribution in module files
An attribute the compiler applied under -gpu=mem:managed is written into the
module file the same way a user-written one is, so a reader cannot tell them
apart. It then treats the attribute as a user requirement: allocating such a
component in a DEVICE object is rejected, and the memory space the user did
ask for on the object no longer wins.
Spell the distinction in the module file as MANAGED(IMPLICIT), modelled on
INTENT(IN): CUDA-data-attr gains an optional parenthesized qualifier, carried
by a new CUDADataAttrSpec parse-tree node in AttrSpec and ComponentAttrSpec.
ATTRIBUTES(...) keeps the bare attribute, so the qualifier cannot be written
there.
The attribute itself is still written out, so a component keeps the same
memory space no matter which options a consumer is compiled with.
Also stop an implicitly applied attribute from making a module a definer of
CUDA symbols. Without this, adding -gpu=mem:managed to a module's build
rejects its OpenACC-only consumers over an attribute the user never wrote.
Commit: b9b829eebc25a4976a20c489838619f0856cc9ba
https://github.com/llvm/llvm-project/commit/b9b829eebc25a4976a20c489838619f0856cc9ba
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M flang/docs/ModFiles.md
M flang/include/flang/Support/Fortran-features.h
M flang/lib/Parser/Fortran-parsers.cpp
M flang/lib/Semantics/mod-file.cpp
M flang/lib/Support/Fortran-features.cpp
M flang/test/Semantics/CUDA/cuda-managed-implicit-modfile.cuf
Log Message:
-----------
[flang][cuda] Restrict the MANAGED(IMPLICIT) spelling to module files
Commit: 1f7312979e415c7a6318f52b66e84fdb9088e6b7
https://github.com/llvm/llvm-project/commit/1f7312979e415c7a6318f52b66e84fdb9088e6b7
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-09-21 (Mon, 21 Sep 2026)
Changed paths:
M flang/lib/Semantics/resolve-names.cpp
A flang/test/Semantics/CUDA/cuda-pinned-implicit-modfile.cuf
Log Message:
-----------
[flang][cuda] Record implicit pinned attribution in module files
Under -gpu=mem:pinned an unattributed ALLOCATABLE is attributed as pinned by
the compiler, the same way -gpu=mem:managed attributes one as managed, but
only the latter recorded that it had done so. The module file therefore spelled
an implicitly applied PINNED the same as one the user wrote, and a reader
treated it as a user requirement: adding -gpu=mem:pinned to a module's build
rejected its OpenACC-only consumers over an attribute the user never wrote.
Record the attribution for pinned as well, so it is written as
PINNED(IMPLICIT) and consumers can tell the two apart.
Compare: https://github.com/llvm/llvm-project/compare/2855e82cfaa5%5E...1f7312979e41
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list