<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 - ThinLTO seems to break computed goto"
href="https://bugs.llvm.org/show_bug.cgi?id=39241">39241</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>ThinLTO seems to break computed goto
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>new bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>mh+llvm@glandium.org
</td>
</tr>
<tr>
<th>CC</th>
<td>eleviant@accesssoftek.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>STR:
git clone <a href="https://github.com/silnrsi/graphite">https://github.com/silnrsi/graphite</a>
cd graphite
mkdir build
cd build
cmake -GNinja -DCMAKE_C_COMPILER=/path/to/bin/clang
-DCMAKE_CXX_COMPILER=/path/to/bin/clang++ -DCMAKE_CXX_FLAGS=-flto=thin
-DCMAKE_SHARED_LINKER_FLAGS=-flto=thin -DCMAKE_EXE_LINKER_FLAGS=-flto=thin
-DCMAKE_MODULE_LINKER_FLAGS=-flto=thin -DCMAKE_C_FLAGS=-flto=thin
-DCMAKE_AR=/path/to/bin/llvm-ar -DCMAKE_RANLIB=/path/to/bin/llvm-ranlib ..
ninja
ninja test
This results in many tests failing (84 out of 93 on my machine). A non-LTO
build only fails only 8 tests on my machine.
This worked fine with clang 6, so I bisected it down to:
commit 11b0e47b5b79bab22d27b6b2952b1f7582848063 (refs/bisect/bad)
Author: Eugene Leviant <<a href="mailto:eleviant@accesssoftek.com">eleviant@accesssoftek.com</a>>
Date: Fri Feb 16 08:11:04 2018 +0000
[ThinLTO] Import global variables
Differential revision: <a href="https://reviews.llvm.org/D43077">https://reviews.llvm.org/D43077</a>
git-svn-id: <a href="https://llvm.org/svn/llvm-project/llvm/trunk@325320">https://llvm.org/svn/llvm-project/llvm/trunk@325320</a>
91177308-0d34-0410-b5e6-96231b3b80d8
I haven't dug into how exactly the generated code is broken, but adding the
following to the cmake command line makes it work: -DGRAPHITE2_VM_TYPE=call
That makes call_machine.cpp be used instead of direct_machine.cpp. The main
difference between both is that the latter is using computed gotos.</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>