[clang] [llvm] target ABI: improve call parameters extensions handling (PR #100757)
Eli Friedman via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 26 10:18:31 PDT 2024
================
@@ -1185,6 +1189,9 @@ Currently, only the following parameter attributes are defined:
value should be sign-extended to the extent required by the target's
ABI (which is usually 32-bits) by the caller (for a parameter) or
the callee (for a return value).
+``noext`` This indicates to the code generator that the parameter or return
+ value has the high bits undefined, as for a struct in register, and
+ therefore does not need to be sign or zero extended.
----------------
efriedma-quic wrote:
It's not.
The issue is that it's easy to write LLVM code that accidentally skips ABI computations. "noext" is an explicit marker indicating that the code generating the IR does understand the ABI, and decided no extension is necessary. That lets the backend detect whether some transform skipped doing ABI computations.
https://github.com/llvm/llvm-project/pull/100757
More information about the llvm-commits
mailing list