[clang] [llvm] [CodeGen][i386] Move -mregparm storage earlier and fix Runtime calls (PR #89707)

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 23 21:28:31 PDT 2024


================
@@ -4781,6 +4782,7 @@ CodeGenModule::CreateRuntimeFunction(llvm::FunctionType *FTy, StringRef Name,
         }
       }
       setDSOLocal(F);
+      markRegisterParameterAttributes(F);
----------------
efriedma-quic wrote:

Zero/sign-extend attributes are also missing, I think.  Which probably doesn't affect x86, but could have obscure effects on some targets.

Using SetLLVMFunctionAttributes here isn't really a problem, except that it takes a clang::Type, not an llvm::Type type, and we only have a conversion in the other direction.  So you'd need to modify the callers.  And there are a lot of callers.

https://github.com/llvm/llvm-project/pull/89707


More information about the llvm-commits mailing list