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

Mehdi Amini via llvm-dev llvm-dev at lists.llvm.org
Wed May 11 11:29:53 PDT 2016


> On May 11, 2016, at 11:18 AM, Reid Kleckner <rnk at google.com> wrote:
> 
> 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.

This is a bit blurry to me as it seems a bit orthogonal: the fact that there is an interface exposed to the frontends to emit debug info should be almost independent from where we actually emit the blob.
So yes, such an interface would require the frontends to expose the union of the information needed to emit Dwarf and CodeView, but it does imply that the metadata representation need to be extended (i.e. behind such an interface you could get the current metadatas for Dwarf and the single blob for CodeView).
Did I miss something?

-- 
Mehdi




More information about the llvm-dev mailing list