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

Adrian Prantl via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 10:22:10 PDT 2016

aprantl created this revision.
aprantl added reviewers: dexonsmith, dblaikie, echristo, probinson.
aprantl added a subscriber: llvm-commits.
aprantl set the repository for this revision to rL LLVM.

This patch drops the debug info for all DISubprograms that are 
(a) not attached to an llvm::Function and
(b) not indirectly reachable via inline scopes from any surviving Function and
(c) not reachable from a type (i.e.: member functions).

Background: I'm currently working on a patch to reverse the pointers between DICompileUnit and DISubprogram (for more info check Duncan's RFC on lazy-loading of debug info metadata http://lists.llvm.org/pipermail/llvm-dev/2016-March/097419.html). The idea is to remove the list of subprograms from DICompileUnit and instead point to the owning compile unit from each DISubprogram. After doing this all DISubprograms fulfilling the above criteria will be implicitly dropped unless we go through an extra effort to preserve them. Since there is not much value in preserving DISubprograms that have been optimized away entirely (as in: not even inlined) I'm proposing to just drop them entirely and save some space.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: D18477.51650.patch
Type: text/x-patch
Size: 4864 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160325/de0720ff/attachment.bin>

More information about the llvm-commits mailing list