<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - OpenMP support is broken for JIT-compiled modules"
href="https://bugs.llvm.org/show_bug.cgi?id=47134">47134</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>OpenMP support is broken for JIT-compiled modules
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Other
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Clang Compiler Support
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>glevner@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>A commit from June 1, 2020 breaks the JIT compilation of C++ modules using
OpenMP parallel/for pragmas. This affects top-of-tree users as well as users of
branch 11.x.
The commit is 1a4fb2edcb908d6c9141036d29b46a347b1b6f18:
Summary: This changes Clang's generation of OpenMP runtime functions
to use the types and functions defined in OpenMPKinds and
OpenMPConstants. New OpenMP runtime function information should now be
added to OMPKinds.def. This patch also changed the definitions of
__kmpc_push_num_teams and __kmpc_copyprivate to match those found in
the runtime.
When using a release version of LLVM, if you use Orc v2 to JIT compile a module
containing a parallel/for pragma, the code compiles and seems to work, but if
you try to save the bitcode to file, you get the following error:
Invalid record (Producer: 'LLVM11.0.0' Reader: 'LLVM 11.0.0')
With a debug version of LLVM, compilation fails with a broken assertion at line
455 of llvm/lib/IR/Instructions.cpp: "Calling a function with a bad signature!"
Johannes Doerfert's patch (<a href="https://reviews.llvm.org/D80735">https://reviews.llvm.org/D80735</a>) seems to fix the
problem.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>