[PATCH] D18477: Drop debug info for DISubprograms that are not referenced by anything

David Blaikie via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 10:32:09 PDT 2016


dblaikie added a comment.

Any particular benefit of doing this before doing the remapping from subprogram->cu? (I guess it means doing some of the test case cleanup first, and the change is pretty small - but we'll want to remove those code changes once the remapping is done, right?)


================
Comment at: lib/CodeGen/AsmPrinter/DwarfDebug.cpp:530
@@ -529,4 +529,3 @@
   for (const auto &P : SPMap)
-    forBothCUs(*P.second, [&](DwarfCompileUnit &CU) {
-      CU.finishSubprogramDefinition(cast<DISubprogram>(P.first));
-    });
+    if (ProcessedSPNodes.count(P.first) != 0)
+      forBothCUs(*P.second, [&](DwarfCompileUnit &CU) {
----------------
This is usually just written without the != 0

================
Comment at: test/DebugInfo/X86/debug-dead-local-var.ll:14-16
@@ -13,5 +13,8 @@
 
-; Check that we still have the structure type for X even though we're not
-; going to emit a low/high_pc for foo.
-; CHECK: DW_TAG_structure_type
 
----------------
Have you checked the commit history for this? It looks pretty deliberate, and while I suspect even if it was we probably still want to make the change you're making - but it'd be good to check the historic reasoning, etc.


Repository:
  rL LLVM

http://reviews.llvm.org/D18477





More information about the llvm-commits mailing list