[llvm] r176287 - Cost model support for lowered math builtins.

Renato Golin renato.golin at linaro.org
Fri Mar 1 00:12:01 PST 2013


On 28 February 2013 19:09, Benjamin Kramer <benny.kra at googlemail.com> wrote:

> We make the cost for calling libm functions extremely high as emitting the
> calls is expensive and causes spills (on x86) so performance suffers. We
> still
> vectorize important calls like ceilf and friends on SSE4.1. and fabs.
>
> Differential Revision: http://llvm-reviews.chandlerc.com/D466
>
> Added:
>     llvm/trunk/test/Analysis/CostModel/X86/intrinsic-cost.ll
> Modified:
>     llvm/trunk/lib/Analysis/CostModel.cpp
>     llvm/trunk/lib/CodeGen/BasicTargetTransformInfo.cpp
>

Hi Ben,

I still think the intrinsic detection should be in the X86 TTI and not
here. You can leave the basic cost (isLegal etc) here, but the detection of
intrinsics, since it's X86 specific, should be in there.

If other platforms have the same list, they should also override this
method.

cheers,
--renato
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130301/adafeab7/attachment.html>


More information about the llvm-commits mailing list