Revert "[ThinLTO] Add call edges' relative block frequency to per-module summary."

Causes buildbot regressions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@323358 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Easwaran Raman
2018-01-24 18:15:29 +00:00
parent e2f036e8e9
commit a9daa08738
7 changed files with 27 additions and 119 deletions
+3 -18
View File
@@ -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())