<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yeah, sorry, just started looking at this about 10 minutes ago.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Word-smithing comments about the LangRef description, no worries on the code front.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">+    A metadata node is a constant tuple without types (when referenced by<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">+    ``call`` instructions, they use :ref:`metadata type <t_metadata>`). For<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">+    example: "``!{ i32 0, !"test" }``". Unlike other typed constants that are<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">+    meant to be interpreted as part of the instruction stream, metadata is a<o:p></o:p></span></p>
<p class="MsoNormal" style="text-autospace:none"><span style="font-size:11.0pt;font-family:"Courier New"">+    place to attach additional information such as debug info.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><a name="_MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Would read a little better if the "call" bit comes after the example (otherwise the example intuitively feels like it's for "call"
 which it isn't).<o:p></o:p></span></a></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">But then "without types" is immediately followed by "i32 0" which is a typed value… needs more consideration.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Sorry to hold up your commit, didn't mean to get in the way so much.  We can fix up the wording in LangRef as needed post-commit.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">--paulr<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> Duncan P. N. Exon Smith [mailto:dexonsmith@apple.com]
<br>
<b>Sent:</b> Friday, December 12, 2014 3:03 PM<br>
<b>To:</b> Robinson, Paul<br>
<b>Cc:</b> Eric Christopher; llvm-commits<br>
<b>Subject:</b> Re: [PATCH] IR: Make metadata typeless in assembly<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt"><br>
> On 2014 Dec 11, at 17:57, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
> <br>
> Okay, so I went right down the rabbit hole with this, and I've attached<br>
> a new patch that skips the `value` keyword.  I have a new upgrade script<br>
> that gets all the LLVM tests passing.<br>
> <br>
> The end result looks obviously better to me.  I wasn't sure if there'd<br>
> be ambiguities between complex types (starting with `%{<[`) and other<br>
> metadata operands, but it looks like all metadata operands either start<br>
> with `!` or are `null`.  This adds a restriction on syntax for new<br>
> types of metadata to be unambiguous w.r.t. types, but I don't think<br>
> that's serious.<br>
> <br>
> Haven't attached the upgrade script or massive test patch here (although<br>
> I have updated LangRef as per Eric's suggestions).<br>
> <br>
> Paul, let me know if this looks better to you too.<br>
> <br>
<br>
*ping*<br>
<br>
Sorry Paul, I know this is fast, but I don't want to leave assembly<br>
out-of-sync with the other two forms of IR (C++ and bitcode) any longer<br>
than necessary.<br>
<br>
It's too late for me to commit this today (as out-of-tree frontends and<br>
backends would have broken builds all weekend), but I'd like to commit<br>
it first thing on Monday if at all possible.<br>
<br>
Did my updated patch look better to you?  Do you have bigger concerns<br>
that require a longer conversation?<o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><span style="font-size:10.0pt"><br>
<br>
> <br>
>> On 2014 Dec 11, at 16:26, Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br>
>> <br>
>> Actually, maybe we don't need that after all.<br>
>> <br>
>> I had expected to need the `value` keyword to detect whether the operand<br>
>> would take a type.  I'm not so sure now that I've written the parser (and<br>
>> the nice errors about invalid types).  I'll see what I can do; give me a<br>
>> few minutes.<br>
>> <br>
>> <br>
>>> On 2014 Dec 11, at 16:16, Robinson, Paul <<a href="mailto:Paul_Robinson@playstation.sony.com">Paul_Robinson@playstation.sony.com</a>> wrote:<br>
>>> <br>
>>> Duncan,<br>
>>> Remind me why it's important to have the 'value' keyword?  This bikeshed was<br>
>>> probably painted a while back but syntactically it doesn't seem too useful.<br>
>>> It seems like you have (a) stuff starting with '!' is a metadata node/reference,<br>
>>> (b) everything else is a value (and must start with a type name).  There's<br>
>>> probably something I'm forgetting, that made 'value' useful…<br>
>>> Thanks,<br>
>>> --paulr<br>
>>> <o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</body>
</html>