summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorSanjay Patel <spatel@rotateright.com>2017-11-27 21:15:43 +0000
committerSanjay Patel <spatel@rotateright.com>2017-11-27 21:15:43 +0000
commit0de1a4bc2d2632ceb42a022c52195de323740e73 (patch)
tree2d93fe4f2d0f399395696ba1cce0f74b01fe7c09 /llvm/lib/Analysis/TargetTransformInfo.cpp
parent7c3a89231cbb560050062dd904149efb77263e9f (diff)
downloadbcm5719-llvm-0de1a4bc2d2632ceb42a022c52195de323740e73.tar.gz
bcm5719-llvm-0de1a4bc2d2632ceb42a022c52195de323740e73.zip
[PartiallyInlineLibCalls][x86] add TTI hook to allow sqrt inlining to depend on arg rather than result
This should fix PR31455: https://bugs.llvm.org/show_bug.cgi?id=31455 Differential Revision: https://reviews.llvm.org/D28314 llvm-svn: 319094
Diffstat (limited to 'llvm/lib/Analysis/TargetTransformInfo.cpp')
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index 53bedfe3f63..7feb40da271 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -281,6 +281,10 @@ bool TargetTransformInfo::haveFastSqrt(Type *Ty) const {
return TTIImpl->haveFastSqrt(Ty);
}
+bool TargetTransformInfo::isFCmpOrdCheaperThanFCmpZero(Type *Ty) const {
+ return TTIImpl->isFCmpOrdCheaperThanFCmpZero(Ty);
+}
+
int TargetTransformInfo::getFPOpCost(Type *Ty) const {
int Cost = TTIImpl->getFPOpCost(Ty);
assert(Cost >= 0 && "TTI should not produce negative costs!");
OpenPOWER on IntegriCloud