[LLVMdev] [RFC] Separating Metadata from the Value hierarchy
Pete Cooper
peter_cooper at apple.com
Mon Nov 10 11:05:37 PST 2014
> 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.
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.
Pete
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141110/ad0b0630/attachment.html>
More information about the llvm-dev
mailing list