[all-commits] [llvm/llvm-project] 4df566: [clang] Add per-global code model attribute (#72078)
hev via All-commits
all-commits at lists.llvm.org
Fri Jan 5 16:52:11 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 4df566290751403f470fea3b27aa148ab1ddf144
https://github.com/llvm/llvm-project/commit/4df566290751403f470fea3b27aa148ab1ddf144
Author: hev <wangrui at loongson.cn>
Date: 2024-01-06 (Sat, 06 Jan 2024)
Changed paths:
M clang/include/clang/AST/Attr.h
M clang/include/clang/Basic/Attr.td
M clang/include/clang/Basic/AttrDocs.td
M clang/include/clang/Basic/DiagnosticSemaKinds.td
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Sema/SemaDeclAttr.cpp
A clang/test/CodeGen/LoongArch/attributes.cpp
A clang/test/Sema/attr-model.cpp
Log Message:
-----------
[clang] Add per-global code model attribute (#72078)
This patch adds a per-global code model attribute, which can override
the target's code model to access global variables.
Currently, the code model attribute is only supported on LoongArch. This
patch also maps GCC's code model names to LLVM's, which allows for
better compatibility between the two compilers.
Suggested-by: Arthur Eubanks <aeubanks at google.com>
Link:
https://discourse.llvm.org/t/how-to-best-implement-code-model-overriding-for-certain-values/71816
Link:
https://discourse.llvm.org/t/rfc-add-per-global-code-model-attribute/74944
---------
Signed-off-by: WANG Rui <wangrui at loongson.cn>
More information about the All-commits
mailing list