<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 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Book Antiqua";
        panose-1:2 4 6 2 5 3 5 3 3 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        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:"Book Antiqua",serif;
        color:#943634;
        font-weight:normal;
        font-style:normal;
        text-decoration:none none;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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-IE link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'>Thanks Craig.<o:p></o:p></span></p><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'>I have ‘</span><span style='font-family:"Courier New";color:black;mso-fareast-language:EN-US'>v16f16</span><span style='color:black;mso-fareast-language:EN-US'>’ added to ‘</span><span style='font-family:"Courier New";color:black;mso-fareast-language:EN-US'>ValueTypes.td</span><span style='color:black;mso-fareast-language:EN-US'>’ just before ‘</span><span style='font-family:"Courier New";color:black;mso-fareast-language:EN-US'>v1f32</span><span style='color:black;mso-fareast-language:EN-US'>’ and then the values of the following enumerates increased by one to correspond to this insertion.  And also changed ‘</span><span style='font-family:"Courier New";color:black;mso-fareast-language:EN-US'>include/llvm/CodeGen/MachineValueType.h</span><span style='color:black;mso-fareast-language:EN-US'>’ to match this change.<o:p></o:p></span></p><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'>However, I have not changed ‘</span><span style='font-family:"Courier New"'>utils/TableGen/CodeGenTarget.cpp</span>’ so I will try that out.<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>Thanks for this insight,<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal>            MartinO<span style='color:black;mso-fareast-language:EN-US'><o:p></o:p></span></p><p class=MsoNormal><span style='color:black;mso-fareast-language:EN-US'><o:p> </o:p></span></p><p class=MsoNormal><b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'>From:</span></b><span lang=EN-US style='font-size:11.0pt;font-family:"Calibri",sans-serif'> Craig Topper [mailto:craig.topper@gmail.com] <br><b>Sent:</b> 06 March 2016 02:06<br><b>To:</b> Martin.ORiordan@movidius.com<br><b>Cc:</b> LLVM Developers <llvm-dev@lists.llvm.org><br><b>Subject:</b> Re: [llvm-dev] Adding 'v16f16' to tablegen<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>Did you add the type to include llvm/CodeGen/ValueTypes.td and utils/TableGen/CodeGenTarget.cpp?<o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On Sat, Mar 5, 2016 at 2:26 PM, Martin J. O'Riordan via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<o:p></o:p></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>I have been able to adapt the main LLVM sources to work with vectors of 16 x FP16 values and I have introduced the ‘</span><span style='font-family:"Courier New"'>v16f16</span><span style='font-family:"Book Antiqua",serif'>’ data type to CLang and LLVM, but I am stumped on how to get TableGen to recognise this type.  At the moment I am trying to optimise the calling convention code, and whenever I refer to ‘</span><span style='font-family:"Courier New"'>v16f16</span><span style='font-family:"Book Antiqua",serif'>’ I get a crash in TableGen (unrecognised type).  Unfortunately I haven’t got my head around the innards of TableGen yet, so I am asking if anyone has any advice on how to add a new vector data type to TableGen?</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>The main reason I need this is that OpenCL supports vectors with 16 elements for all supported scalar types, and the SHAVE processor does support FP16 (aka ‘</span><span style='font-family:"Courier New"'>half</span><span style='font-family:"Book Antiqua",serif'>’) data types.  Although we don’t natively support 16 x FP16, I would like to optimise how values of this type are passed and returned; so any advice is appreciated.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>I have the same problem with ‘</span><span style='font-family:"Courier New"'>v16f64</span><span style='font-family:"Book Antiqua",serif'>’, although this type does not occur in any real code that I have found outside the OpenCL test-suite.</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>Thanks,</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'> </span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'>            MartinO</span><o:p></o:p></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span style='font-family:"Book Antiqua",serif'> </span><o:p></o:p></p></div></div><p class=MsoNormal style='margin-bottom:12.0pt'><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><o:p></o:p></p></blockquote></div><p class=MsoNormal><br><br clear=all><o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><p class=MsoNormal>-- <o:p></o:p></p><div><p class=MsoNormal>~Craig<o:p></o:p></p></div></div></div></div></body></html>