From ad364956edb7f06e0064e90e7c37d13b3cccd1cf Mon Sep 17 00:00:00 2001 From: evgeny Date: Wed, 18 Dec 2019 18:33:15 +0300 Subject: [ThinLTO] Show preserved symbols in DOT files Differential revision: https://reviews.llvm.org/D71608 --- llvm/lib/IR/ModuleSummaryIndex.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp') diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp index 5d35dbe..180f9626 100644 --- a/llvm/lib/IR/ModuleSummaryIndex.cpp +++ b/llvm/lib/IR/ModuleSummaryIndex.cpp @@ -405,7 +405,9 @@ static bool hasWriteOnlyFlag(const GlobalValueSummary *S) { return false; } -void ModuleSummaryIndex::exportToDot(raw_ostream &OS) const { +void ModuleSummaryIndex::exportToDot( + raw_ostream &OS, + const DenseSet &GUIDPreservedSymbols) const { std::vector CrossModuleEdges; DenseMap> NodeMap; using GVSOrderedMapTy = std::map; @@ -485,6 +487,8 @@ void ModuleSummaryIndex::exportToDot(raw_ostream &OS) const { A.addComment("dsoLocal"); if (Flags.CanAutoHide) A.addComment("canAutoHide"); + if (GUIDPreservedSymbols.count(SummaryIt.first)) + A.addComment("preserved"); auto VI = getValueInfo(SummaryIt.first); A.add("label", getNodeLabel(VI, SummaryIt.second)); -- cgit v1.1