summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/TargetTransformInfo.cpp
diff options
context:
space:
mode:
authorZaara Syeda <syzaara@ca.ibm.com>2018-01-17 18:22:55 +0000
committerZaara Syeda <syzaara@ca.ibm.com>2018-01-17 18:22:55 +0000
commit8e951fd2f6267275becabef2f7ad973a2af0e6a8 (patch)
tree98e6d8baf3a845f2bf255c9545c2a66fece7dc88 /llvm/lib/Analysis/TargetTransformInfo.cpp
parent2686e3cac64a7f9b3b7f7ace0abf226b149a7ad9 (diff)
downloadbcm5719-llvm-8e951fd2f6267275becabef2f7ad973a2af0e6a8.tar.gz
bcm5719-llvm-8e951fd2f6267275becabef2f7ad973a2af0e6a8.zip
[PowerPC] Add handling for ColdCC calling convention and a pass to mark
candidates with coldcc attribute. This patch adds support for the coldcc calling convention for Power. This changes the set of non-volatile registers. It includes a pass to stress test the implementation by marking all static directly called functions with the coldcc attribute through the option -enable-coldcc-stress-test. It also includes an option, -ppc-enable-coldcc, to add the coldcc attribute to functions which are cold at all call sites based on BlockFrequencyInfo when the containing function does not call any non cold functions. Differential Revision: https://reviews.llvm.org/D38413 llvm-svn: 322721
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 b744cae51ed..e046984ffc3 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/lib/Analysis/TargetTransformInfo.cpp
@@ -226,6 +226,10 @@ bool TargetTransformInfo::shouldBuildLookupTablesForConstant(Constant *C) const
return TTIImpl->shouldBuildLookupTablesForConstant(C);
}
+bool TargetTransformInfo::useColdCCForColdCall(Function &F) const {
+ return TTIImpl->useColdCCForColdCall(F);
+}
+
unsigned TargetTransformInfo::
getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const {
return TTIImpl->getScalarizationOverhead(Ty, Insert, Extract);
OpenPOWER on IntegriCloud