<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>Of course, thanks for the interest.</p>
<p>The goal of this work is to enable OpenMP 4.x accelerator
offloading for OpenCL 2.1 devices.<br>
By specifying "-fopenmp
-fopenmp-targets=spir(64)-unknown-unknown", the compiler should
produce a fat binary consisting of host code and SPIR-V target
code. Using the LLVM fork from Nicholas Wilson (
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/pipermail/llvm-dev/2017-May/112538.html">http://lists.llvm.org/pipermail/llvm-dev/2017-May/112538.html</a> ), I
created a toolchain to emit SPIR-V kernels and extended codegen to
generate appropriate code for this target. I also wrote an OpenCL
2.1 plugin for the OpenMP runtime subproject. Although the device
runtime routines are still missing, I already got some nice
results.</p>
<p>Now, my problem is that some benchmarks use math lib functions
(in target regions). In principal, these functions are available
on OpenCL devices. However, the compiler doesn't mangle the
function calls, which makes the back-end not recognizing them as
built-ins. Therefore, I would like to mangle the names when openmp
and spir are specified, according to the spec.</p>
<p>Kind regards,<br>
Daniel<br>
</p>
<br>
<div class="moz-cite-prefix">On 11/28/2017 06:06 PM, Andreas
Bergmeier wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CABfF9mP9VD9A=gTT4kY2A8yBbZm3pAeLRCYdtNM_SGm-_H91nA@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
That sounds very interesting. Can you get a bit more into detail?
<div><br>
</div>
<div>Cheers</div>
<div>Andreas<br>
<br>
<div class="gmail_quote">
<div dir="ltr">Daniel Schürmann via cfe-dev <<a
href="mailto:cfe-dev@lists.llvm.org"
moz-do-not-send="true">cfe-dev@lists.llvm.org</a>>
schrieb am Di., 28. Nov. 2017, 17:16:<br>
</div>
<blockquote class="gmail_quote" style="margin:0 0 0
.8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>Hi all,</p>
<p>I wanted to ask, if someone knows a possibility to
always enforce name mangling,<br>
no matter what source language (but instead depending on
other compiler flags).</p>
<p>I am currently developing a SPIR-V target for OpenMP
using OpenCL as runtime.<br>
Thus, I have C/C++ input files, but emit SPIR-V.<br>
The SPIR-V specification states: "By convention, for
debugging purposes, modules with <a
href="https://www.khronos.org/registry/spir-v/specs/1.0/SPIRV.html#OpSource"
target="_blank" moz-do-not-send="true"><strong>OpSource</strong></a>
<em>Source Language</em> of OpenCL use the Itanium
name-mangling standard."<br>
The problem arises, when I try to make use of built-in
functions, which are expected to be mangled<br>
for the LLVM->SPIR-V transformation (with many of
them being overloaded).</p>
<p>Is there any global option which can be set on
invocation or do I have to apply changes all over the
place where the actual mangling happens? Then, it might
be enough to change function names and calls. Is the
name mangling done in the parsing/sema stage or in
codegen?</p>
<p>Kind regards,<br>
Daniel</p>
</div>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank"
moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
<a
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote>
</div>
</div>
</blockquote>
<br>
</body>
</html>