[llvm-dev] [cfe-dev] RFC: Up front type information generation in clang and llvm

Reid Kleckner via llvm-dev llvm-dev at lists.llvm.org
Wed May 11 11:18:46 PDT 2016


On Wed, May 11, 2016 at 10:51 AM, Smith, Kevin B
<kevin.b.smith at intel.com> wrote:
> I believe that Amjad Aboud has argued several times that there could be one true way to generate LLVM debug info such that both
> windows and DWARF debug info could be generated from it.  I know for a fact that within the Intel Compiler that the FE generates a single
> set of debug info representation, that then gets translated into either MS PDB format, or DWARF depending on the target platform.
>
> Architecturally, that is very desirable. You really do not want to have every FE have to know about, and generate different debug info depending
> on whether they are targeting windows or a DWARF enabled target, do you?

If we go with the existing metadata representation, we will need to
extend it to be the union of DWARF and CodeView, and that will require
frontends to feed us more information specific to CodeView. In other
words, "we need help from the frontend." Depending on your
perspective, you could see this as spreading Windows knowledge across
the codebase.

I think extending the DI metadata is definitely workable. As you say,
it is obviously very useful for other frontends. I just feel that the
representation shift is needlessly inefficient and stands in our way
when we need to express things that it can't yet represent.

---

Anyway, at this point, many people have concerns about this idea, so I
think it would be best to move forward on CV by extending the DI
metadata. We can come back and revisit up front emission at some point
in the future. If we can demonstrate big compile-time and QoI
improvements, it might be worth supporting both approaches.


More information about the llvm-dev mailing list