[PATCH] D76495: Changes to sync patch D52966
Vishal Chebrolu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 20 07:00:23 PDT 2020
vish99 created this revision.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
Attempt to merge D52896 <https://reviews.llvm.org/D52896>, D52898 <https://reviews.llvm.org/D52898>, D52966 <https://reviews.llvm.org/D52966>, D53253 <https://reviews.llvm.org/D53253>, D53254 <https://reviews.llvm.org/D53254>
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D76495
Files:
llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
llvm/lib/Bitcode/Reader/BitcodeReader.cpp
llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
Index: llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3737,6 +3737,11 @@
NameVals.clear();
}
+// Current version for the summary.
+// This is bumped whenever we introduce changes in the way some record are
+// interpreted, like flags for instance.
+static const uint64_t INDEX_VERSION = 7;
+
/// Emit the per-module summary section alongside the rest of
/// the module's bitcode.
void ModuleBitcodeWriterBase::writePerModuleGlobalValueSummary() {
Index: llvm/lib/Bitcode/Reader/BitcodeReader.cpp
===================================================================
--- llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -5785,11 +5785,9 @@
}
const uint64_t Version = Record[0];
const bool IsOldProfileFormat = Version == 1;
- if (Version < 1 || Version > ModuleSummaryIndex::BitcodeSummaryVersion)
+ if (Version < 1 || Version > 7)
return error("Invalid summary version " + Twine(Version) +
- ". Version should be in the range [1-" +
- Twine(ModuleSummaryIndex::BitcodeSummaryVersion) +
- "].");
+ ". Version should be in the range [1-7].");
Record.clear();
// Keep around the last seen summary to be used when we see an optional
@@ -5904,6 +5902,11 @@
std::move(PendingTypeCheckedLoadVCalls),
std::move(PendingTypeTestAssumeConstVCalls),
std::move(PendingTypeCheckedLoadConstVCalls));
+ PendingTypeTests.clear();
+ PendingTypeTestAssumeVCalls.clear();
+ PendingTypeCheckedLoadVCalls.clear();
+ PendingTypeTestAssumeConstVCalls.clear();
+ PendingTypeCheckedLoadConstVCalls.clear();
auto VIAndOriginalGUID = getValueInfoFromValueId(ValueID);
FS->setModulePath(getThisModule()->first());
FS->setOriginalName(VIAndOriginalGUID.second);
@@ -6046,6 +6049,11 @@
std::move(PendingTypeCheckedLoadVCalls),
std::move(PendingTypeTestAssumeConstVCalls),
std::move(PendingTypeCheckedLoadConstVCalls));
+ PendingTypeTests.clear();
+ PendingTypeTestAssumeVCalls.clear();
+ PendingTypeCheckedLoadVCalls.clear();
+ PendingTypeTestAssumeConstVCalls.clear();
+ PendingTypeCheckedLoadConstVCalls.clear();
LastSeenSummary = FS.get();
LastSeenGUID = VI.getGUID();
FS->setModulePath(ModuleIdMap[ModuleId]);
Index: llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
===================================================================
--- llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
+++ llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
@@ -550,8 +550,7 @@
F.hasFnAttribute(Attribute::NoRecurse), F.returnDoesNotAlias(),
// FIXME: refactor this to use the same code that inliner is using.
// Don't try to import functions with noinline attribute.
- F.getAttributes().hasFnAttribute(Attribute::NoInline),
- F.hasFnAttribute(Attribute::AlwaysInline)};
+ F.getAttributes().hasFnAttribute(Attribute::NoInline)};
auto FuncSummary = std::make_unique<FunctionSummary>(
Flags, NumInsts, FunFlags, /*EntryCount=*/0, std::move(Refs),
CallGraphEdges.takeVector(), TypeTests.takeVector(),
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D76495.251624.patch
Type: text/x-patch
Size: 3345 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200320/218822e3/attachment.bin>
More information about the llvm-commits
mailing list