[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)
Eli Friedman via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 16:06:05 PDT 2024
================
@@ -62,6 +62,13 @@ namespace llvm {
LibFunc TheLibFunc, AttributeList AttributeList,
FunctionType *Invalid, ArgsTy... Args) = delete;
+ // Handle -mregparm for the given function.
+ // FIXME: This should likely be implemented in
+ // CodeGenModule::SetLLVMFunctionAttributes() since callers of
+ // markRegisterParameterAttributes() will not have gotten appropriate
+ // attributes for things like sign/zero-extension, etc.
----------------
efriedma-quic wrote:
This doesn't really properly capture the divide between clang, the frontend, and LLVM the optimizer.
What we want here is basically a warning: this interface shouldn't be used unless you know exactly what you're doing. Then a FIXME on the clang side to indicate we plan to revise the CreateRuntimeFunction() interface at some point.
Suggested text on the LLVM API:
Note that this function is a rough approximation that only works for simple function signatures. Note this does not apply other relevant attributes for function signatures, including sign/zero-extension for arguments and return values.
https://github.com/llvm/llvm-project/pull/89707
More information about the cfe-commits
mailing list