diff options
| author | Easwaran Raman <eraman@google.com> | 2017-05-09 23:21:10 +0000 |
|---|---|---|
| committer | Easwaran Raman <eraman@google.com> | 2017-05-09 23:21:10 +0000 |
| commit | f5f916007270ffb4313d7898a4e5b257caf93220 (patch) | |
| tree | a0833d5c4c53fe9106997af821d5f0be74723f97 /llvm/include | |
| parent | 77e9e84a8e267597f4832980a9d84b1bc3598b3c (diff) | |
| download | bcm5719-llvm-f5f916007270ffb4313d7898a4e5b257caf93220.tar.gz bcm5719-llvm-f5f916007270ffb4313d7898a4e5b257caf93220.zip | |
[ProfileSummary] Make getProfileCount a non-static member function.
This change is required because the notion of count is different for
sample profiling and getProfileCount will need to determine the
underlying profile type.
Differential revision: https://reviews.llvm.org/D33012
llvm-svn: 302597
Diffstat (limited to 'llvm/include')
| -rw-r--r-- | llvm/include/llvm/Analysis/ProfileSummaryInfo.h | 4 | ||||
| -rw-r--r-- | llvm/include/llvm/Transforms/Utils/Cloning.h | 7 |
2 files changed, 7 insertions, 4 deletions
diff --git a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h index 75c4cbd0370..c5f97083af4 100644 --- a/llvm/include/llvm/Analysis/ProfileSummaryInfo.h +++ b/llvm/include/llvm/Analysis/ProfileSummaryInfo.h @@ -67,8 +67,8 @@ public: } /// Returns the profile count for \p CallInst. - static Optional<uint64_t> getProfileCount(const Instruction *CallInst, - BlockFrequencyInfo *BFI); + Optional<uint64_t> getProfileCount(const Instruction *CallInst, + BlockFrequencyInfo *BFI); /// \brief Returns true if \p F has hot function entry. bool isFunctionEntryHot(const Function *F); /// Returns true if \p F has hot function entry or hot call edge. diff --git a/llvm/include/llvm/Transforms/Utils/Cloning.h b/llvm/include/llvm/Transforms/Utils/Cloning.h index 0a8903a6ed7..91c9d255302 100644 --- a/llvm/include/llvm/Transforms/Utils/Cloning.h +++ b/llvm/include/llvm/Transforms/Utils/Cloning.h @@ -43,6 +43,7 @@ class InvokeInst; class Loop; class LoopInfo; class Module; +class ProfileSummaryInfo; class ReturnInst; /// Return an exact copy of the specified module @@ -175,15 +176,17 @@ public: explicit InlineFunctionInfo(CallGraph *cg = nullptr, std::function<AssumptionCache &(Function &)> *GetAssumptionCache = nullptr, + ProfileSummaryInfo *PSI = nullptr, BlockFrequencyInfo *CallerBFI = nullptr, BlockFrequencyInfo *CalleeBFI = nullptr) - : CG(cg), GetAssumptionCache(GetAssumptionCache), CallerBFI(CallerBFI), - CalleeBFI(CalleeBFI) {} + : CG(cg), GetAssumptionCache(GetAssumptionCache), PSI(PSI), + CallerBFI(CallerBFI), CalleeBFI(CalleeBFI) {} /// CG - If non-null, InlineFunction will update the callgraph to reflect the /// changes it makes. CallGraph *CG; std::function<AssumptionCache &(Function &)> *GetAssumptionCache; + ProfileSummaryInfo *PSI; BlockFrequencyInfo *CallerBFI, *CalleeBFI; /// StaticAllocas - InlineFunction fills this in with all static allocas that |

