summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2018-11-19 05:23:16 +0000
committerVedant Kumar <vsk@apple.com>2018-11-19 05:23:16 +0000
commite7b789b5293b179b7972d6d3d6b85e010f221e66 (patch)
treef68e7334298c8889b904d6e5374f5b94acf7cadd /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent3616891046e7f13a758e53dcc6fa73a7c3232b35 (diff)
downloadbcm5719-llvm-e7b789b5293b179b7972d6d3d6b85e010f221e66.tar.gz
bcm5719-llvm-e7b789b5293b179b7972d6d3d6b85e010f221e66.zip
[ProfileSummary] Standardize methods and fix comment
Every Analysis pass has a get method that returns a reference of the Result of the Analysis, for example, BlockFrequencyInfo &BlockFrequencyInfoWrapperPass::getBFI(). I believe that ProfileSummaryInfo::getPSI() is the only exception to that, as it was returning a pointer. Another change is renaming isHotBB and isColdBB to isHotBlock and isColdBlock, respectively. Most methods use BB as the argument of variable names while methods usually refer to Basic Blocks as Blocks, instead of BB. For example, Function::getEntryBlock, Loop:getExitBlock, etc. I also fixed one of the comments. Patch by Rodrigo Caetano Rocha! Differential Revision: https://reviews.llvm.org/D54669 llvm-svn: 347182
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp4
1 files changed, 2 insertions, 2 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;
}
OpenPOWER on IntegriCloud