summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Bitcode/Reader/BitcodeReader.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/Bitcode/Reader/BitcodeReader.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/Bitcode/Reader/BitcodeReader.cpp')
-rw-r--r--llvm/lib/Bitcode/Reader/BitcodeReader.cpp23
1 files changed, 6 insertions, 17 deletions
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 9cf1302b030..7ffa6248879 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -743,8 +743,7 @@ private:
std::vector<ValueInfo> makeRefList(ArrayRef<uint64_t> Record);
std::vector<FunctionSummary::EdgeTy> makeCallList(ArrayRef<uint64_t> Record,
bool IsOldProfileFormat,
- bool HasProfile,
- bool HasRelBF);
+ bool HasProfile);
Error parseEntireSummary(unsigned ID);
Error parseModuleStringTable();
@@ -5048,15 +5047,12 @@ ModuleSummaryIndexBitcodeReader::makeRefList(ArrayRef<uint64_t> Record) {
return Ret;
}
-std::vector<FunctionSummary::EdgeTy>
-ModuleSummaryIndexBitcodeReader::makeCallList(ArrayRef<uint64_t> Record,
- bool IsOldProfileFormat,
- bool HasProfile, bool HasRelBF) {
+std::vector<FunctionSummary::EdgeTy> ModuleSummaryIndexBitcodeReader::makeCallList(
+ ArrayRef<uint64_t> Record, bool IsOldProfileFormat, bool HasProfile) {
std::vector<FunctionSummary::EdgeTy> Ret;
Ret.reserve(Record.size());
for (unsigned I = 0, E = Record.size(); I != E; ++I) {
CalleeInfo::HotnessType Hotness = CalleeInfo::HotnessType::Unknown;
- uint64_t RelBF = 0;
ValueInfo Callee = getValueInfoFromValueId(Record[I]).first;
if (IsOldProfileFormat) {
I += 1; // Skip old callsitecount field
@@ -5064,9 +5060,7 @@ ModuleSummaryIndexBitcodeReader::makeCallList(ArrayRef<uint64_t> Record,
I += 1; // Skip old profilecount field
} else if (HasProfile)
Hotness = static_cast<CalleeInfo::HotnessType>(Record[++I]);
- else if (HasRelBF)
- RelBF = Record[++I];
- Ret.push_back(FunctionSummary::EdgeTy{Callee, CalleeInfo(Hotness, RelBF)});
+ Ret.push_back(FunctionSummary::EdgeTy{Callee, CalleeInfo{Hotness}});
}
return Ret;
}
@@ -5145,11 +5139,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
// FS_PERMODULE_PROFILE: [valueid, flags, instcount, fflags, numrefs,
// numrefs x valueid,
// n x (valueid, hotness)]
- // FS_PERMODULE_RELBF: [valueid, flags, instcount, fflags, numrefs,
- // numrefs x valueid,
- // n x (valueid, relblockfreq)]
case bitc::FS_PERMODULE:
- case bitc::FS_PERMODULE_RELBF:
case bitc::FS_PERMODULE_PROFILE: {
unsigned ValueID = Record[0];
uint64_t RawFlags = Record[1];
@@ -5175,10 +5165,9 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
std::vector<ValueInfo> Refs = makeRefList(
ArrayRef<uint64_t>(Record).slice(RefListStartIndex, NumRefs));
bool HasProfile = (BitCode == bitc::FS_PERMODULE_PROFILE);
- bool HasRelBF = (BitCode == bitc::FS_PERMODULE_RELBF);
std::vector<FunctionSummary::EdgeTy> Calls = makeCallList(
ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex),
- IsOldProfileFormat, HasProfile, HasRelBF);
+ IsOldProfileFormat, HasProfile);
auto FS = llvm::make_unique<FunctionSummary>(
Flags, InstCount, getDecodedFFlags(RawFunFlags), std::move(Refs),
std::move(Calls), std::move(PendingTypeTests),
@@ -5270,7 +5259,7 @@ Error ModuleSummaryIndexBitcodeReader::parseEntireSummary(unsigned ID) {
bool HasProfile = (BitCode == bitc::FS_COMBINED_PROFILE);
std::vector<FunctionSummary::EdgeTy> Edges = makeCallList(
ArrayRef<uint64_t>(Record).slice(CallGraphEdgeStartIndex),
- IsOldProfileFormat, HasProfile, false);
+ IsOldProfileFormat, HasProfile);
ValueInfo VI = getValueInfoFromValueId(ValueID).first;
auto FS = llvm::make_unique<FunctionSummary>(
Flags, InstCount, getDecodedFFlags(RawFunFlags), std::move(Refs),
OpenPOWER on IntegriCloud