<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=us-ascii">
<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: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:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
{mso-style-name:msonormal;
mso-margin-top-alt:auto;
margin-right:0in;
mso-margin-bottom-alt:auto;
margin-left:0in;
font-size:12.0pt;
font-family:"Times New Roman",serif;}
span.EmailStyle18
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:windowtext;}
span.EmailStyle19
{mso-style-type:personal;
font-family:"Calibri",sans-serif;
color:#1F497D;}
span.EmailStyle20
{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="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal"><span style="color:#1F497D">Hi Anastasia,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We would like to let driver accept all –cl- options listed here
<a href="https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clBuildProgram.html">
https://www.khronos.org/registry/cl/sdk/1.2/docs/man/xhtml/clBuildProgram.html</a><o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Currently when users use clang to compile OpenCL program to ISA, they have to pass these options with –Xclang, e.g.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Clang –Xclang -cl-kernel-arg-info a.cl<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">When there are many –cl options, each one needs to be preceded with –Xclang, which is very inconvenient.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">We took a look of Options.td and found there are lots of –cc1 options already there which are allowed to be used with driver and passed on to –cc1 instance. Since these –cl options are frequently used by OpenCL
users, I think it is reasonable to also allow driver to accept them and pass on to –cc1.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Aaron has a patch for this. Only some simple changes are needed.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Thanks.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D">Sam<o:p></o:p></span></p>
<p class="MsoNormal"><span style="color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b>From:</b> Anastasia Stulova [mailto:Anastasia.Stulova@arm.com]
<br>
<b>Sent:</b> Friday, May 27, 2016 11:44 AM<br>
<b>To:</b> Shi, Aaron (en ye) <Aaronenye.Shi@amd.com>; cfe-dev@lists.llvm.org<br>
<b>Cc:</b> xiuli.pan@intel.com; alexey.bader@intel.com; richard@metafoo.co.uk; Haustov, Nikolay <Nikolay.Haustov@amd.com>; Liu, Yaxun (Sam) <Yaxun.Liu@amd.com>; nd <nd@arm.com><br>
<b>Subject:</b> RE: [RFC][OpenCL] Allow -cl-std and other standard -cl- options in driver<o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">You should be able to pass –std=CL1.1¦CL1.2¦CL2.0 to the Clang driver. We have broken it lately though, but the fix is on the way:
</span><a href="http://reviews.llvm.org/D20630"><span lang="EN-GB">http://reviews.llvm.org/D20630</span></a><span lang="EN-GB" style="color:#1F497D"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">Some other options are supported too, but not called the same way i.e. -ffast-math (analogue to -cl-fast-relaxed-math).<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">Which options would you be interested in particular? I think we should try to avoid duplication with existing ones that are already in Clang.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">The -cl options are generally a part of the OpenCL runtime API spec, but they might be useful to have for standalone compilation indeed.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">Cheers,<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D">Anastasia<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-GB" style="color:#1F497D"><o:p> </o:p></span></p>
<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"> Shi, Aaron (en ye) [</span><a href="mailto:Aaronenye.Shi@amd.com"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">mailto:Aaronenye.Shi@amd.com</span></a><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">]
<br>
<b>Sent:</b> 26 May 2016 19:55<br>
<b>To:</b> </span><a href="mailto:cfe-dev@lists.llvm.org"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">cfe-dev@lists.llvm.org</span></a><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif"><br>
<b>Cc:</b> Anastasia Stulova; </span><a href="mailto:xiuli.pan@intel.com"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">xiuli.pan@intel.com</span></a><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">;
</span><a href="mailto:alexey.bader@intel.com"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">alexey.bader@intel.com</span></a><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">;
</span><a href="mailto:richard@metafoo.co.uk"><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">richard@metafoo.co.uk</span></a><span style="font-size:10.0pt;font-family:"Tahoma",sans-serif">; Haustov, Nikolay; Liu, Yaxun (Sam)<br>
<b>Subject:</b> [RFC][OpenCL] Allow -cl-std and other standard -cl- options in driver<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><span lang="EN-GB"><o:p> </o:p></span></p>
<p class="MsoNormal">cfe-dev,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Currently, -cl-std= and -cl- options are only accepted by clang compiler with –cc1, which is not convenient for OpenCL users.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is it possible to allow these options into clang driver (without –cc1)?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Thanks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span style="color:black;text-transform:uppercase">Aaron (En Ye) Shi</span></b><span style="font-size:10.0pt;color:black"><br>
PEY, SW Engineering | Stream OpenCL<br>
<b>O</b> +(1) 289-695-0685 <b>M</b> +(1) 647-709-3020<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>