<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size: 12pt; color: rgb(0, 0, 0); font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;" dir="ltr">
<p style="margin-top:0;margin-bottom:0">Hi John,</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">The OpenCL C++ patch contains integration with the SPIR-V translation tool. We have restared the discussion about that tool on llvm dev recently:</p>
<p style="margin-top:0;margin-bottom:0"><a href="http://lists.llvm.org/pipermail/llvm-dev/2018-March/121794.html" class="OWAAutoLink">http://lists.llvm.org/pipermail/llvm-dev/2018-March/121794.html</a><br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">If you look for example in the README file it explain such things as new option -emit-spirv.</p>
<p style="margin-top:0;margin-bottom:0"><a href="https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44" class="OWAAutoLink">https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44</a></p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Also there is support for the SPIR-V friendly format:</p>
<p style="margin-top:0;margin-bottom:0"><a href="https://github.com/KhronosGroup/SPIRV-LLVM/blob/khronos/spirv-3.6.1/docs/SPIRVRepresentationInLLVM.rst" class="OWAAutoLink">https://github.com/KhronosGroup/SPIRV-LLVM/blob/khronos/spirv-3.6.1/docs/SPIRVRepresentationInLLVM.rst</a><br>
</p>
<p style="margin-top:0;margin-bottom:0">This is mainly located in <span>lib/CodeGen/OclCxxRewrite</span> directory.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Because, we have a separate activity to redesign the integration with SPIRV, we won't be contributing those bits currently. But the plan is to restart the discussion around this at some point hopefully soon.</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">Supporting SPIR-V is essential to us because it gives to many tool vendor a path to use Clang directly from upstream. So we will be working on its integration as well. But for now we would like to start with the generic
 OpenCL C++ support - Parsing, Sema, basic CodeGen, etc.<br>
</p>
<p style="margin-top:0;margin-bottom:0"><br>
</p>
<p style="margin-top:0;margin-bottom:0">I hope it clarifies your question.</p>
<p style="margin-top:0;margin-bottom:0">Thanks!<br>
</p>
<p style="margin-top:0;margin-bottom:0">Anastasia<br>
</p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" color="#000000" face="Calibri, sans-serif"><b>From:</b> rjmccall@apple.com <rjmccall@apple.com> on behalf of John McCall <rjmccall@apple.com><br>
<b>Sent:</b> 28 March 2018 22:25<br>
<b>To:</b> Anastasia Stulova<br>
<b>Cc:</b> clang-dev developer list; nd<br>
<b>Subject:</b> Re: [cfe-dev] A proposal for adding OpenCL C++ support (Spec v2.2)</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space"><br class="">
<div>
<blockquote type="cite" class="">
<div class="">On Mar 23, 2018, at 2:30 PM, Anastasia Stulova via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div>
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
There were no objections to this so far. I assume it means nobody is opposing this new feature.</div>
</div>
</blockquote>
<div><br class="">
</div>
I have no objections.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<div class="" style="">
<div dir="ltr" class="">
<div id="x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size:12pt; font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div class="" style="margin-top:0px; margin-bottom:0px">Just to give a bit more info and a chance for the last feedback. We don't plan to contribute the whole patch but only around 3K lines + tests. The overall changes will be smaller than OpenCL 2.0. And they
 will mainly affect <span class="">C++ code paths</span><span class="x_Apple-converted-space"> </span>in Sema and CodeGen, but some parsing bits too.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">The time frame to start this work will hopefully be the beginning of April.</div>
</div>
</div>
</div>
</div>
</div>
</blockquote>
<div><br class="">
</div>
Okay.  Can you explain what it means that you won't be contributing the whole patch?</div>
<div><br class="">
</div>
<div>John.</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div id="x_divtagdefaultwrapper" dir="ltr" class="" style="font-style: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; font-size: 12pt; font-family: Calibri,Helvetica,sans-serif,"EmojiFont","Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols;">
<div class="" style="">
<div dir="ltr" class="">
<div id="x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size:12pt; font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Cheers,</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Anastasia<br class="">
</div>
<br class="">
<div class="" style="">
<hr tabindex="-1" class="" style="display:inline-block; width:1225px">
<div id="x_x_divRplyFwdMsg" dir="ltr" class=""><font class="" style="font-size:11pt" face="Calibri, sans-serif"><b class="">From:</b><span class="x_Apple-converted-space"> </span>cfe-dev <<a href="mailto:cfe-dev-bounces@lists.llvm.org" class="">cfe-dev-bounces@lists.llvm.org</a>>
 on behalf of Anastasia Stulova via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>><br class="">
<b class="">Sent:</b><span class="x_Apple-converted-space"> </span>23 February 2018 16:29<br class="">
<b class="">To:</b><span class="x_Apple-converted-space"> </span>clang-dev developer list<br class="">
<b class="">Cc:</b><span class="x_Apple-converted-space"> </span>nd<br class="">
<b class="">Subject:</b><span class="x_Apple-converted-space"> </span>[cfe-dev] A proposal for adding OpenCL C++ support (Spec v2.2)</font>
<div class=""> </div>
</div>
<div dir="ltr" class="">
<div id="x_x_x_divtagdefaultwrapper" dir="ltr" class="" style="font-size:12pt; font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols">
<div class="" style="margin-top:0px; margin-bottom:0px">Hello,</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">A number of developers from the member companies within the Khronos Group are interested to contribute the prototype implementation of OpenCL C++ that is currently located on github and based on version
 3.6:</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><a href="https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44" class="x_x_x_OWAAutoLink">https://github.com/KhronosGroup/SPIR/commit/0cfb6f7533d42ae3398a8574efd8abbdac88ac44</a><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">This implementation is compliant to OpenCL v2.2 standard:</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><a href="https://www.khronos.org/registry/OpenCL/specs/opencl-2.2-cplusplus.pdf" class="x_x_x_OWAAutoLink">https://www.khronos.org/registry/OpenCL/specs/opencl-2.2-cplusplus.pdf</a><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Similarly to OpenCL C being based on C99, OpenCL C++ support is entirely based on C++14 with a number of extensions (some of which will be shared with OpenCL C) and a few minor restrictions.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">The plan would be to take small patches from the github repository and perform any necessary rework and clean up before putting up for review. From the OpenCL side, I don't see any issue with this plan
 as it doesn't interfere with any current development I am aware of, and also it would be great to progress to the next OpenCL standard. I just want to check if there are any objections from anyone or things we should be aware of before the start. I'm particularly
 looking for feedback from C++ implementers as there might be some overlap.</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Additionally, there are two more related threads, which I plan to discuss separately. There is:</div>
<div class="" style="margin-top:0px; margin-bottom:0px">(i) standard library support libclcxx:<a href="https://github.com/KhronosGroup/libclcxx." class="x_x_x_OWAAutoLink"><span class="x_Apple-converted-space"> </span>https://github.com/KhronosGroup/libclcxx.</a><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">(ii) and IR generation to SPIRV: <a href="http://lists.llvm.org/pipermail/llvm-dev/2018-February/121317.html" class="x_x_x_OWAAutoLink">http://lists.llvm.org/pipermail/llvm-dev/2018-February/121317.html</a></div>
<div class="" style="margin-top:0px; margin-bottom:0px">that we would like to provide as well, in order to allow Clang to produce an end binary targeting a wider range of architectures directly (not just AMD GPU).<span class="x_Apple-converted-space"> </span><span class="" style="">We
 expect that the complete open source solution for OpenCL C++ will increase significantly Clang users and unify our dev</span><span class="" style="">elopment forces i.e. refactoring, bug hunting, etc. The plan would be to do similar for OpenCL C too at a later
 point of time. </span></div>
<span class="" style="color:rgb(255,0,0)"></span>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Please, contact me if you have any thoughts or comments.<br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px"><br class="">
</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Cheers,</div>
<div class="" style="margin-top:0px; margin-bottom:0px">Anastasia<br class="">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">_______________________________________________</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<span class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; float:none; display:inline!important">cfe-dev
 mailing list</span><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<a href="mailto:cfe-dev@lists.llvm.org" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">cfe-dev@lists.llvm.org</a><br class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px">
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" class="" style="font-family:Helvetica; font-size:12px; font-style:normal; font-weight:normal; letter-spacing:normal; orphans:auto; text-align:start; text-indent:0px; text-transform:none; white-space:normal; widows:auto; word-spacing:0px">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></div>
</blockquote>
</div>
<br class="">
</div>
</div>
</div>
</body>
</html>