<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 --- - IR verifier slows down linking Chrome with LTO by 2.5x"
href="https://llvm.org/bugs/show_bug.cgi?id=26214">26214</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>IR verifier slows down linking Chrome with LTO by 2.5x
</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>normal
</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>krasin@google.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>IR verifier added in <a href="http://reviews.llvm.org/rL257825">http://reviews.llvm.org/rL257825</a> and
<a href="http://reviews.llvm.org/rL257823">http://reviews.llvm.org/rL257823</a> significantly slows down LTO build. The larger
the target, the higher ratio of the slowdown. Linking Chrome with LTO is 27
mins before the changes, and 88 minutes after them.
Here is the profile:
+ 40.50% ld.gold LLVMgold.so [.] bool llvm::function_ref<bool
(llvm::Value const*)>::callback_fn<(anonymous
namespace)::Verifier::visitGlobalValue(llvm::GlobalValue
const&)::{lambda(llvm::Valu
+ 19.61% ld.gold LLVMgold.so [.] llvm::Use::getImpliedUser()
const
+ 7.20% ld.gold LLVMgold.so [.]
llvm::IRMover::move(llvm::Module&, llvm::ArrayRef<llvm::GlobalValue*>,
std::function<void (llvm::GlobalValue&, std::function<void
(llvm::GlobalValue&)>)>, llvm
+ 2.63% ld.gold LLVMgold.so [.]
llvm::SmallPtrSetImplBase::FindBucketFor(void const*) const
+ 1.92% ld.gold [kernel.kallsyms] [k] 0xffffffff81180fa0
+ 1.60% ld.gold LLVMgold.so [.] forEachUser(llvm::Value
const*, llvm::SmallPtrSet<llvm::Value const*, 32u>&, llvm::function_ref<bool
(llvm::Value const*)>) [clone .constprop.1086]
+ 1.58% ld.gold libc-2.19.so [.] _int_malloc
+ 1.18% ld.gold LLVMgold.so [.] llvm::Use::getUser() const
+ 0.82% ld.gold LLVMgold.so [.]
llvm::SmallPtrSetImplBase::insert_imp(void const*)
+ 0.76% ld.gold LLVMgold.so [.]
llvm::NamedMDNode::getOperand(unsigned int) const
This regression is severe for our use case (deploying Control Flow Integrity in
Chrome), but I don't think it's limited just to us. Anyone who uses LTO is
affected.</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>