[PATCH] TTI: Add getCallInstrCost.

Michael Zolotukhin mzolotukhin at apple.com
Fri Mar 6 15:33:48 PST 2015


================
Comment at: include/llvm/CodeGen/BasicTTIImpl.h:681
@@ +680,3 @@
+                                    RetTy->getVectorNumElements()))
+      return ScalarCost;
+
----------------
hfinkel wrote:
> That's not quite right. You still need to call getCallInstrCost with the associated vector types.
Hi Hal,

I don't think I get it. When the types are vector, we first call getCallInstrCost for corresponding scalar types and then return `ScalarCalls*ScalarCost+ScalarizationCost` for not vectorizable functions and `ScalarCost` for vectorizable ones. If the types are scalar, we just return 10. What's missing here?

Could you please elaborate your point a little?

http://reviews.llvm.org/D8094

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list