<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 - Large number of locals in zlib output"
href="https://bugs.llvm.org/show_bug.cgi?id=40892">40892</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Large number of locals in zlib output
</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>Backend: WebAssembly
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>alonzakai@gmail.com
</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=21517" name="attach_21517" title="cheerp output for comparison">attachment 21517</a> <a href="attachment.cgi?id=21517&action=edit" title="cheerp output for comparison">[details]</a></span>
cheerp output for comparison
Comparing to cheerp, the core $deflate function in their output has 7 locals,
while the wasm backend's version has 85. This may explain why the size of the
function is much larger.
I'm not sure what's going on here. One pattern I noticed is constants with one
set and one get (e.g., 11664 - might help to search for that const). There are
'runs' of such assignments to locals (each with a different value), and they
all have this pattern. They also seem to end up used in the same code area
later. I guess they are a bunch of phis, with the other value being the zero
initialization (does LLVM use that?).</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>