<div dir="ltr"><div class="gmail_extra">I haven't been able to follow all of the thread that got us here but your patch below has distilled the result enough for me to at least ask questions.</div><div class="gmail_extra"><br></div><div class="gmail_extra">I'm sorry of some of the justification is buried in the thread and I'm just making you repeat it, but I suspect I'm not the only one that would benefit from the rationale being summarized here.</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Fri, Oct 24, 2014 at 4:16 PM, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div id=":1pq" class="a3s" style="overflow:hidden">Using `Value` instead of `MDNode`<br>
=================================<br>
<br>
A number of APIs expect `MDNode` -- previously, the only referenceable<br>
type of metadata -- but this patch (and the ones that will follow) have<br>
referenceable metadata that *do not* inherit from `MDNode`.  Metadata<br>
APIs such as `Instruction::getMetadata()` and<br>
`NamedMDNode::getOperand()` need to return non-`MDNode` metadata.<br></div></blockquote><div><br></div><div>To me, this change is a red flag and points out a bit of a lie in the subject line: this is not actually first-class debug-info IR. This is just making debug info become special metadata with special encoding properties.</div><div><br></div><div>Note, I'm actually ok with us having special metadata that has special encoding properties. But if we're going that route, I don't think that there is anything "debug info" centric about it, and it shouldn't be described as such. I also think the relationship of MDUser, MDNode, and MDString need to be clarified a great deal. Why doesn't getMetadata return an 'MDUser*' for example?</div><div><br></div><div>It feels as though you really want to sink the current functionality of MDNode down to some subclass of a more generic metadata IR type? Maybe I'm misunderstanding?</div><div><br></div><div><br></div><div>I also have to ask because I can't currently see it: what does debug info being metadata buy us? How much code is simplified by that, and at what cost?</div></div></div></div>