diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-11-19 20:06:13 +0000 |
| commit | c0981da47d5696fe36474fcf86b4ce03ae3ff818 (patch) | |
| tree | f42add1021b9f2ac6a69ac7cf6c4499962739a45 /llvm/lib/IR/ModuleSummaryIndex.cpp | |
| parent | 344a3780b2e33f6ca763666c380202b18aab72a3 (diff) | |
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
| -rw-r--r-- | llvm/lib/IR/ModuleSummaryIndex.cpp | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp index f4ac6caf4f93..31c5cd938d03 100644 --- a/llvm/lib/IR/ModuleSummaryIndex.cpp +++ b/llvm/lib/IR/ModuleSummaryIndex.cpp @@ -251,12 +251,13 @@ void ModuleSummaryIndex::propagateAttributes( bool IsDSOLocal = true; for (auto &S : P.second.SummaryList) { if (!isGlobalValueLive(S.get())) { - // computeDeadSymbols should have marked all copies live. Note that - // it is possible that there is a GUID collision between internal - // symbols with the same name in different files of the same name but - // not enough distinguishing path. Because computeDeadSymbols should - // conservatively mark all copies live we can assert here that all are - // dead if any copy is dead. + // computeDeadSymbolsAndUpdateIndirectCalls should have marked all + // copies live. Note that it is possible that there is a GUID collision + // between internal symbols with the same name in different files of the + // same name but not enough distinguishing path. Because + // computeDeadSymbolsAndUpdateIndirectCalls should conservatively mark + // all copies live we can assert here that all are dead if any copy is + // dead. assert(llvm::none_of( P.second.SummaryList, [&](const std::unique_ptr<GlobalValueSummary> &Summary) { @@ -446,9 +447,11 @@ static std::string linkageToString(GlobalValue::LinkageTypes LT) { static std::string fflagsToString(FunctionSummary::FFlags F) { auto FlagValue = [](unsigned V) { return V ? '1' : '0'; }; - char FlagRep[] = {FlagValue(F.ReadNone), FlagValue(F.ReadOnly), - FlagValue(F.NoRecurse), FlagValue(F.ReturnDoesNotAlias), - FlagValue(F.NoInline), FlagValue(F.AlwaysInline), 0}; + char FlagRep[] = {FlagValue(F.ReadNone), FlagValue(F.ReadOnly), + FlagValue(F.NoRecurse), FlagValue(F.ReturnDoesNotAlias), + FlagValue(F.NoInline), FlagValue(F.AlwaysInline), + FlagValue(F.NoUnwind), FlagValue(F.MayThrow), + FlagValue(F.HasUnknownCall), 0}; return FlagRep; } |
