summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/Analysis')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp4
-rw-r--r--llvm/lib/Analysis/ProfileSummaryInfo.cpp12
2 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index 237faede16b..5a13149c022 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -665,7 +665,7 @@ ModuleSummaryIndexWrapperPass::ModuleSummaryIndexWrapperPass()
}
bool ModuleSummaryIndexWrapperPass::runOnModule(Module &M) {
- auto &PSI = *getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
+ auto *PSI = &getAnalysis<ProfileSummaryInfoWrapperPass>().getPSI();
Index.emplace(buildModuleSummaryIndex(
M,
[this](const Function &F) {
@@ -673,7 +673,7 @@ bool ModuleSummaryIndexWrapperPass::runOnModule(Module &M) {
*const_cast<Function *>(&F))
.getBFI());
},
- &PSI));
+ PSI));
return false;
}
diff --git a/llvm/lib/Analysis/ProfileSummaryInfo.cpp b/llvm/lib/Analysis/ProfileSummaryInfo.cpp
index 7472b6201c2..bd8459ddb82 100644
--- a/llvm/lib/Analysis/ProfileSummaryInfo.cpp
+++ b/llvm/lib/Analysis/ProfileSummaryInfo.cpp
@@ -151,7 +151,7 @@ bool ProfileSummaryInfo::isFunctionHotInCallGraph(const Function *F,
return true;
}
for (const auto &BB : *F)
- if (isHotBB(&BB, &BFI))
+ if (isHotBlock(&BB, &BFI))
return true;
return false;
}
@@ -180,7 +180,7 @@ bool ProfileSummaryInfo::isFunctionColdInCallGraph(const Function *F,
return false;
}
for (const auto &BB : *F)
- if (!isColdBB(&BB, &BFI))
+ if (!isColdBlock(&BB, &BFI))
return false;
return true;
}
@@ -253,14 +253,14 @@ uint64_t ProfileSummaryInfo::getOrCompColdCountThreshold() {
return ColdCountThreshold ? ColdCountThreshold.getValue() : 0;
}
-bool ProfileSummaryInfo::isHotBB(const BasicBlock *B, BlockFrequencyInfo *BFI) {
- auto Count = BFI->getBlockProfileCount(B);
+bool ProfileSummaryInfo::isHotBlock(const BasicBlock *BB, BlockFrequencyInfo *BFI) {
+ auto Count = BFI->getBlockProfileCount(BB);
return Count && isHotCount(*Count);
}
-bool ProfileSummaryInfo::isColdBB(const BasicBlock *B,
+bool ProfileSummaryInfo::isColdBlock(const BasicBlock *BB,
BlockFrequencyInfo *BFI) {
- auto Count = BFI->getBlockProfileCount(B);
+ auto Count = BFI->getBlockProfileCount(BB);
return Count && isColdCount(*Count);
}
OpenPOWER on IntegriCloud