[all-commits] [llvm/llvm-project] b4d17d: [flang][cuda] Record implicit managed attribution ...
Kareem Ergawy via All-commits
all-commits at lists.llvm.org
Sun Sep 20 22:37:06 PDT 2026
Branch: refs/heads/users/ergawy/managed-implicit-modfile
Home: https://github.com/llvm/llvm-project
Commit: b4d17d2634480da7d8bd424ab4de2580c7e461a4
https://github.com/llvm/llvm-project/commit/b4d17d2634480da7d8bd424ab4de2580c7e461a4
Author: ergawy <kareem.ergawy at gmail.com>
Date: 2026-09-21 (Mon, 21 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.
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