<html>
<head>
<base href="https://llvm.org/bugs/" />
</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 --- - clang takes a long time to compile an empty file including ExecutionEngine/Interpreter.h"
href="https://llvm.org/bugs/show_bug.cgi?id=25245">25245</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>clang takes a long time to compile an empty file including ExecutionEngine/Interpreter.h
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</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>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>davide@freebsd.org
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>While experimenting with the JIT, I noticed that clang takes *a lot* of time to
compile a file that includes ExecutionEngine/Interpreter.h.
$ cat factorial.cpp
#include "llvm/ExecutionEngine/Interpreter.h"
int main(void) {}
$ time clang++ -v -c -std=c++11 -g -fno-rtti factorial.cpp `llvm-config
--cppflags interpreter support core mcjit native nativecodegen` -o factorial
[...]
real 0m12.204s
user 0m12.064s
sys 0m0.126s
Time shows up all the CPU time is spent in userland, and some additional
profiling shows that we spend large part of our cycles in the parser (the
output is (unfortunately) a little bit messy but you can click on the
rectangles to zoom in)
<a href="https://people.freebsd.org/~davide/pics/clang_takes_forever.svg">https://people.freebsd.org/~davide/pics/clang_takes_forever.svg</a>
Is this something that can be worked around/improved?</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>