From 14120227a34365e829d05c1413033d235d7d272c Mon Sep 17 00:00:00 2001 From: Jonas Paulsson Date: Thu, 19 Sep 2024 16:59:31 +0200 Subject: 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. --- 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 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; } } -- cgit v1.1