From de7438e472839df63e1f10478436c2f15b8e4184 Mon Sep 17 00:00:00 2001 From: Alex MacLean Date: Wed, 29 Jan 2025 16:27:27 -0800 Subject: [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) --- llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Bitcode/Reader/BitcodeReader.cpp') 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(); -- cgit v1.1