[PATCH] D18556: [ThinLTO] Augment FunctionImport dump with value name to GUID map

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 4 11:57:56 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL265326: [ThinLTO] Augment FunctionImport dump with value name to GUID map (authored by tejohnson).

Changed prior to commit:
  http://reviews.llvm.org/D18556?vs=51921&id=52592#toc

Repository:
  rL LLVM

http://reviews.llvm.org/D18556

Files:
  llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp

Index: llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
===================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
+++ llvm/trunk/lib/Transforms/IPO/FunctionImport.cpp
@@ -320,16 +320,27 @@
     // Find the globals to import
     DenseSet<const GlobalValue *> GlobalsToImport;
     for (auto &GV : *SrcModule) {
-      if (GV.hasName() && ImportGUIDs.count(GV.getGUID())) {
+      if (!GV.hasName())
+        continue;
+      auto GUID = GV.getGUID();
+      auto Import = ImportGUIDs.count(GUID);
+      DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing " << GUID << " "
+                   << GV.getName() << " from " << SrcModule->getSourceFileName()
+                   << "\n");
+      if (Import) {
         GV.materialize();
         GlobalsToImport.insert(&GV);
       }
     }
     for (auto &GV : SrcModule->aliases()) {
       if (!GV.hasName())
         continue;
       auto GUID = GV.getGUID();
-      if (ImportGUIDs.count(GUID)) {
+      auto Import = ImportGUIDs.count(GUID);
+      DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing " << GUID << " "
+                   << GV.getName() << " from " << SrcModule->getSourceFileName()
+                   << "\n");
+      if (Import) {
         // Alias can't point to "available_externally". However when we import
         // linkOnceODR the linkage does not change. So we import the alias
         // and aliasee only in this case.
@@ -345,7 +356,11 @@
       if (!GV.hasName())
         continue;
       auto GUID = GV.getGUID();
-      if (ImportGUIDs.count(GUID)) {
+      auto Import = ImportGUIDs.count(GUID);
+      DEBUG(dbgs() << (Import ? "Is" : "Not") << " importing " << GUID << " "
+                   << GV.getName() << " from " << SrcModule->getSourceFileName()
+                   << "\n");
+      if (Import) {
         GV.materialize();
         GlobalsToImport.insert(&GV);
       }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18556.52592.patch
Type: text/x-patch
Size: 1940 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160404/c4a66096/attachment.bin>


More information about the llvm-commits mailing list