[llvm] Use Module level target-abi to assign target features for codegenerated functions. (PR #100833)

Craig Topper via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 4 14:25:20 PST 2025


================
@@ -387,6 +388,25 @@ Function *Function::Create(FunctionType *Ty, LinkageTypes Linkage,
   return Create(Ty, Linkage, M.getDataLayout().getProgramAddressSpace(), N, &M);
 }
 
+StringRef Function::getDefaultTargetFeatures(const StringRef TargetABI) {
+  Triple T(getParent()->getTargetTriple());
+  StringRef attr = "";
+  if (T.isRISCV64()) {
+    if (TargetABI.equals_insensitive("lp64d"))
----------------
topperc wrote:

I guess that doesn't require +e to be passed so nevermind.

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


More information about the llvm-commits mailing list