[PATCH] D59620: [llvm-pdbutil] Add -type-ref-stats to help find unused type info

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 21 10:14:30 PDT 2019


rnk added a comment.

In D59620#1438062 <https://reviews.llvm.org/D59620#1438062>, @zturner wrote:

> In D59620#1438019 <https://reviews.llvm.org/D59620#1438019>, @aganea wrote:
>
> > Another question - do you think we could replace forward references by the the concrete ones?
>
>
> I don't think we could replace forward references with the full declarations.  Forward references exist to deal with cycles, as well as to make sure the entire type stream can be topologically sorted.


While the linker certainly doesn't want to read PDBs with cycles in the type graph, it's possible that debuggers could handle it just fine. In fact, it might even speed things up. There are cases (unnamed types in C) where the compiler can't use forward references because there is no unique mangled name for the type, and the debuggers handle that.

I think it would be reasonable to add an option to LLD to write PDBs that replace all forward references with the appropriate complete type. Then we can experiment with debuggers and see if it works, what the size and perf effect is, etc.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59620/new/

https://reviews.llvm.org/D59620





More information about the llvm-commits mailing list