[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 00:09:27 PDT 2026
Branch: refs/heads/users/ergawy/managed-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: 6b0274949824545c52592ab27f34f80a8b8d8913
https://github.com/llvm/llvm-project/commit/6b0274949824545c52592ab27f34f80a8b8d8913
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
Compare: https://github.com/llvm/llvm-project/compare/b4d17d263448...6b0274949824
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