<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 - Exponential code growth while inlining internal functions"
href="https://bugs.llvm.org/show_bug.cgi?id=33072">33072</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Exponential code growth while inlining internal functions
</td>
</tr>
<tr>
<th>Product</th>
<td>libraries
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</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>Interprocedural Optimizations
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>arielb1@mail.tau.ac.il
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=18456" name="attach_18456" title="File running 4^7 iterations of Collatz's Conjecture, which expands to 45kLoIR">attachment 18456</a> <a href="attachment.cgi?id=18456&action=edit" title="File running 4^7 iterations of Collatz's Conjecture, which expands to 45kLoIR">[details]</a></span>
File running 4^7 iterations of Collatz's Conjecture, which expands to 45kLoIR
It appears that under some situations I don't fully understand (e.g. the
attached example, which expands to over 45k lines of IR), LLVM can "deeply
inline" a tree of internal functions, causing exponential IR growth.
## Meta
This was originally reported as <a href="https://github.com/rust-lang/rust/issues/41696">https://github.com/rust-lang/rust/issues/41696</a>.
Confirmed on Rust's LLVM 4.0 and Debian's LLVM 3.9 - I don't have a trunk LLVM
ready right now.
## STR
$ wc -l sloline.cu.ll
83 sloline.cu.ll
$ opt -S -inline sloline.cu.ll | wc -l
45068
$</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>