[LLVMdev] [RFC] Separating Metadata from the Value hierarchy

Eric Christopher echristo at gmail.com
Mon Nov 10 12:08:58 PST 2014


On Mon Nov 10 2014 at 11:08:04 AM Pete Cooper <peter_cooper at apple.com>
wrote:

> On Nov 10, 2014, at 10:17 AM, Duncan P. N. Exon Smith <
> dexonsmith at apple.com> wrote:
>
> The class hierarchy I envision looks something like this:
>
>    Metadata
>      MDNode
>        TempMDNode      // MDNodeFwdRef?
>        UniquableMDNode // GenericMDNode?
>        DINode          // Is this layer useful?
>          DILocation
>          DIScope
>            DIType
>              DIBasicType
>              DICompositeType
>              ...
>            DISubprogram
>            ...
>          DICompileUnit
>          ...
>      MDString
>      ValueAsMetadata
>
> Why not just make the Debug classes totally first class, i.e., the root of
> their own hierarchy?  Given that you’re removing local metadata, fixing up
> dbgvalue, and debug locations are already stored on instructions in a
> special way, I don’t see why we need to even represent debug info as
> metadata at all.
>
>
Because it fits the general idea of metadata. The same ideas behind how to
deal with debug info is the same as how to deal with metadata.


> Debug info is already being treated specially in parsing, printing,
> storage, etc.  Seems like having Module contain a pointer to its
> CompileUnit(s) would move a huge amount of this stuff completely out of
> metadata.  Then you can still have your own rules for uniquing if you want
> them.
>

I disagree with this in that I don't think it's a necessary part of the
design. With these changes there's no compelling argument to separate out
debug info at all.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141110/e9077026/attachment.html>


More information about the llvm-dev mailing list