summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/ModuleSummaryIndex.cpp
diff options
context:
space:
mode:
authorevgeny <eleviant@accesssoftek.com>2019-12-18 18:33:15 +0300
committerevgeny <eleviant@accesssoftek.com>2019-12-18 18:33:15 +0300
commitad364956edb7f06e0064e90e7c37d13b3cccd1cf (patch)
tree9d180ba44edd7947fdf1a25fb55c3fc70c23216b /llvm/lib/IR/ModuleSummaryIndex.cpp
parent3a779b7dfd8ee2924997dbed7f6c43d7989895f6 (diff)
downloadbcm5719-llvm-ad364956edb7f06e0064e90e7c37d13b3cccd1cf.tar.gz
bcm5719-llvm-ad364956edb7f06e0064e90e7c37d13b3cccd1cf.zip
[ThinLTO] Show preserved symbols in DOT files
Differential revision: https://reviews.llvm.org/D71608
Diffstat (limited to 'llvm/lib/IR/ModuleSummaryIndex.cpp')
-rw-r--r--llvm/lib/IR/ModuleSummaryIndex.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/IR/ModuleSummaryIndex.cpp b/llvm/lib/IR/ModuleSummaryIndex.cpp
index 5d35dbe06f2..180f96269a1 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<GlobalValue::GUID> &GUIDPreservedSymbols) const {
std::vector<Edge> CrossModuleEdges;
DenseMap<GlobalValue::GUID, std::vector<uint64_t>> NodeMap;
using GVSOrderedMapTy = std::map<GlobalValue::GUID, GlobalValueSummary *>;
@@ -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));
OpenPOWER on IntegriCloud