[PATCH] D41522: [Inliner] Restrict soft-float inlining penalty.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 21 17:55:14 PST 2017

efriedma added inline comments.

Comment at: lib/Analysis/InlineCost.cpp:1103
+    if (TTI.getFPOpCost(I.getType()) == TargetTransformInfo::TCC_Expensive ||
+        (F.getFnAttribute("use-soft-float").getValueAsString() == "true"))
+      Cost += InlineConstants::CallPenalty;
echristo wrote:
> I realize you're just moving this code, but we might want to make this a TTI backend call for the function since there's also the subtarget feature on some targets as well.
> Would it make since for this to be a part of getFPOpCost instead?
I think this code was originally written before we had per-function TTI... but we should take advantage of it now.  Fixed the default implementation of getFPOpCost to do the right thing, and removed the explicit check for "use-soft-float".



More information about the llvm-commits mailing list