aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
diff options
context:
space:
mode:
authorJonas Paulsson <paulson1@linux.ibm.com>2024-09-19 16:59:31 +0200
committerGitHub <noreply@github.com>2024-09-19 16:59:31 +0200
commit14120227a34365e829d05c1413033d235d7d272c (patch)
tree923dcfc9248933c9b0191589b0d336c48ae10786 /llvm/lib/Bitcode/Reader/BitcodeReader.cpp
parent9ca62c5302633d0220de30f2b2a21d87dee64ac0 (diff)
downloadllvm-14120227a34365e829d05c1413033d235d7d272c.zip
llvm-14120227a34365e829d05c1413033d235d7d272c.tar.gz
llvm-14120227a34365e829d05c1413033d235d7d272c.tar.bz2
Target ABI: improve call parameters extensions handling (#100757)
For the purpose of verifying proper arguments extensions per the target's ABI, introduce the NoExt attribute that may be used by a target when neither sign- or zeroextension is required (e.g. with a struct in register). The purpose of doing so is to be able to verify that there is always one of these attributes present and by this detecting cases where sign/zero extension is actually missing. As a first step, this patch has the verification step done for the SystemZ backend only, but left off by default until all known issues have been addressed. Other targets/front-ends can now also add NoExt attribute where needed and do this check in the backend.
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 027a297..b7db631 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -2190,6 +2190,8 @@ static Attribute::AttrKind getAttrFromCode(uint64_t Code) {
return Attribute::Initializes;
case bitc::ATTR_KIND_CORO_ELIDE_SAFE:
return Attribute::CoroElideSafe;
+ case bitc::ATTR_KIND_NO_EXT:
+ return Attribute::NoExt;
}
}