[llvm] r302308 - Override invalidate of ProfileSummaryInfo to return false.
Easwaran Raman via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 15:15:09 PDT 2017
Author: eraman
Date: Fri May 5 17:15:09 2017
New Revision: 302308
URL: http://llvm.org/viewvc/llvm-project?rev=302308&view=rev
Log:
Override invalidate of ProfileSummaryInfo to return false.
Differential revision: https://reviews.llvm.org/D32775
Modified:
llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h
Modified: llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h?rev=302308&r1=302307&r2=302308&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h (original)
+++ llvm/trunk/include/llvm/Analysis/ProfileSummaryInfo.h Fri May 5 17:15:09 2017
@@ -54,6 +54,18 @@ public:
ProfileSummaryInfo(Module &M) : M(M) {}
ProfileSummaryInfo(ProfileSummaryInfo &&Arg)
: M(Arg.M), Summary(std::move(Arg.Summary)) {}
+
+ /// Handle the invalidation of this information.
+ ///
+ /// When used as a result of \c ProfileSummaryAnalysis this method will be
+ /// called when the module this was computed for changes. Since profile
+ /// summary is immutable after it is annotated on the module, we return false
+ /// here.
+ bool invalidate(Module &, const PreservedAnalyses &,
+ ModuleAnalysisManager::Invalidator &) {
+ return false;
+ }
+
/// Returns the profile count for \p CallInst.
static Optional<uint64_t> getProfileCount(const Instruction *CallInst,
BlockFrequencyInfo *BFI);
More information about the llvm-commits
mailing list