[TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI.
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 12 Mar 2019 09:48:02 +0000 (09:48 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Tue, 12 Mar 2019 09:48:02 +0000 (09:48 +0000)
commit31ff647c1d261364e716e6b607065b6ecce4ca1f
treed76a4a953894a7948569b82379361e536c0dd846
parentcdb7c31f0adaa9fb338ec1a226cfd44cd9d31c5d
[TTI] Enable analysis of clib functions in getIntrinsicCosts. NFCI.

This is addressing the issue that we're not modeling the cost of clib functions
in TTI::getIntrinsicCosts and thus we're basically addressing this fixme:

// FIXME: This is wrong for libc intrinsics.

To enable analysis of clib functions, we not only need an intrinsic ID and
formal arguments, but also the actual user of that function so that we can e.g.
look at alignment and values of arguments. So, this is the initial plumbing to
pass the user of an intrinsinsic on to getCallCosts, which queries
getIntrinsicCosts.

Differential Revision: https://reviews.llvm.org/D59014

llvm-svn: 355901
llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Analysis/TargetTransformInfo.cpp