aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorAlex MacLean <amaclean@nvidia.com>2025-01-29 16:27:27 -0800
committerGitHub <noreply@github.com>2025-01-29 16:27:27 -0800
commitde7438e472839df63e1f10478436c2f15b8e4184 (patch)
treee537e67af685c00e88f5a004943b9a06e388fdd0 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parentf0d05b099dafda89df4c971b64b2051c33db5da1 (diff)
downloadllvm-de7438e472839df63e1f10478436c2f15b8e4184.zip
llvm-de7438e472839df63e1f10478436c2f15b8e4184.tar.gz
llvm-de7438e472839df63e1f10478436c2f15b8e4184.tar.bz2
[NVPTX] Auto-Upgrade some nvvm.annotations to attributes (#119261)
Add a new AutoUpgrade function to convert some legacy nvvm.annotations metadata to function level attributes. These attributes are quicker to look-up so improve compile time and are more idiomatic than using metadata which should not include required information that changes the meaning of the program. Currently supported annotations are: - !"kernel" -> ptx_kernel calling convention - !"align" -> alignstack parameter attributes (return not yet supported)
Diffstat (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index e16e8a0..1a09e80 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -7157,6 +7157,8 @@ Error BitcodeReader::materializeModule() {
UpgradeModuleFlags(*TheModule);
+ UpgradeNVVMAnnotations(*TheModule);
+
UpgradeARCRuntime(*TheModule);
return Error::success();