summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
diff options
context:
space:
mode:
authorEaswaran Raman <eraman@google.com>2018-01-24 18:15:29 +0000
committerEaswaran Raman <eraman@google.com>2018-01-24 18:15:29 +0000
commitbf38deef3f1186733f35e06a5cae329ddf5e9650 (patch)
treec967f8dee020fa773c2e3f8f4443643019d6a10d /llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
parent052f14ef5a662b58d6db4acfae253252bcb6bdcd (diff)
downloadbcm5719-llvm-bf38deef3f1186733f35e06a5cae329ddf5e9650.tar.gz
bcm5719-llvm-bf38deef3f1186733f35e06a5cae329ddf5e9650.zip
Revert "[ThinLTO] Add call edges' relative block frequency to per-module summary."
Causes buildbot regressions. llvm-svn: 323358
Diffstat (limited to 'llvm/lib/Analysis/ModuleSummaryAnalysis.cpp')
-rw-r--r--llvm/lib/Analysis/ModuleSummaryAnalysis.cpp21
1 files changed, 3 insertions, 18 deletions
diff --git a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
index e4a18b7bd45..cf2fe7776dd 100644
--- a/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ b/llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -273,24 +273,9 @@ computeFunctionSummary(ModuleSummaryIndex &Index, const Module &M,
// to record the call edge to the alias in that case. Eventually
// an alias summary will be created to associate the alias and
// aliasee.
- auto &ValueInfo = CallGraphEdges[Index.getOrInsertValueInfo(
- cast<GlobalValue>(CalledValue))];
- ValueInfo.updateHotness(Hotness);
- // Add the relative block frequency to CalleeInfo if there is no profile
- // information.
- if (BFI != nullptr && Hotness == CalleeInfo::HotnessType::Unknown) {
- auto BBFreq = BFI->getBlockFreq(CI->getParent()).getFrequency();
- // FIXME: This might need some scaling to prevent BBFreq values from
- // being rounded down to 0.
- auto EntryFreq = BFI->getEntryFreq();
- // Block frequencies can be directly set for a block and so we need to
- // handle the case of entry frequency being 0.
- if (EntryFreq)
- BBFreq /= EntryFreq;
- else
- BBFreq = 0;
- ValueInfo.updateRelBlockFreq(BBFreq);
- }
+ CallGraphEdges[Index.getOrInsertValueInfo(
+ cast<GlobalValue>(CalledValue))]
+ .updateHotness(Hotness);
} else {
// Skip inline assembly calls.
if (CI && CI->isInlineAsm())
OpenPOWER on IntegriCloud