[PATCH] D33609: Bitcode: Remove some dead code. Spotted by Teresa.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 16:21:54 PDT 2017


This revision was automatically updated to reflect the committed changes.
Closed by commit rL304046: Bitcode: Remove some dead code. Spotted by Teresa. (authored by pcc).

Changed prior to commit:
  https://reviews.llvm.org/D33609?vs=100484&id=100492#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D33609

Files:
  llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp


Index: llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
===================================================================
--- llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
+++ llvm/trunk/lib/Bitcode/Writer/BitcodeWriter.cpp
@@ -3415,30 +3415,8 @@
 
   // Create value IDs for undefined references.
   forEachSummary([&](GVInfo I) {
-    if (auto *VS = dyn_cast<GlobalVarSummary>(I.second)) {
-      for (auto &RI : VS->refs())
-        assignValueId(RI.getGUID());
-      return;
-    }
-
-    auto *FS = dyn_cast<FunctionSummary>(I.second);
-    if (!FS)
-      return;
-    for (auto &RI : FS->refs())
+    for (auto &RI : I.second->refs())
       assignValueId(RI.getGUID());
-
-    for (auto &EI : FS->calls()) {
-      GlobalValue::GUID GUID = EI.first.getGUID();
-      if (!hasValueId(GUID)) {
-        // For SamplePGO, the indirect call targets for local functions will
-        // have its original name annotated in profile. We try to find the
-        // corresponding PGOFuncName as the GUID.
-        GUID = Index.getGUIDFromOriginalID(GUID);
-        if (GUID == 0 || !hasValueId(GUID))
-          continue;
-      }
-      assignValueId(GUID);
-    }
   });
 
   for (const auto &GVI : valueIds()) {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D33609.100492.patch
Type: text/x-patch
Size: 1219 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170526/4c7c419a/attachment.bin>


More information about the llvm-commits mailing list