<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 - Address Sanitizer compilation time regression"
href="https://bugs.llvm.org/show_bug.cgi?id=42924">42924</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Address Sanitizer compilation time regression
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>9.0
</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>release blocker
</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>chris@detrino.org
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>I have a large TU that used to take 8 minutes to compile with Clang 8.0 and now
takes 1 hour and 20 minutes with Clang 9.0 RC1 when using -fsanitize=address.
Using the new -ftime-trace flag showed that most of the time was going towards
AddressSanitizerFunctionPass which is taking ~40ms for each function. As this
is being compiled with -O1 nothing is being inlined and that 40ms times number
of functions is adding up to more than an hour.
Further profiling showed that all the time is being spent in memmove for
copying a GlobalsMetadata type on the following line:
<a href="https://github.com/llvm/llvm-project/blob/7f7ef0208b57a4d253cd8b07053460f40ad7cbc8/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp#L581">https://github.com/llvm/llvm-project/blob/7f7ef0208b57a4d253cd8b07053460f40ad7cbc8/llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp#L581</a>
Git blame on that line points to <a href="https://reviews.llvm.org/D56470">https://reviews.llvm.org/D56470</a> and it has
some discussion on copying the GlobalsMD struct.</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>