<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 --- - -fomit-frame-pointer introduces spills"
href="https://llvm.org/bugs/show_bug.cgi?id=25373">25373</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>-fomit-frame-pointer introduces spills
</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>All
</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>Register Allocator
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>james.molloy@arm.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>Created <span class=""><a href="attachment.cgi?id=15200" name="attach_15200" title="Reproducer">attachment 15200</a> <a href="attachment.cgi?id=15200&action=edit" title="Reproducer">[details]</a></span>
Reproducer
The attached IR compiles with no spills or reloads when the frame pointer is
enabled. However if the frame pointer is disabled,
$ llc -disable-fp-elim=true 2.ll -o - | grep -c Reload
0
$ llc -disable-fp-elim=false 2.ll -o - | grep -c Reload
2
This was reduced from a benchmark where our spill decisions were suboptimal.
Enabling FP omission (increasing the register bank by one) caused 10% more
spills. Even worse, reducing the register bank by one also caused 10% more
spills, but reducing it one further so there were only 10 registers reduced the
spill count again:
R0..R12: N+10% spills
R0..R11: N spills
R0..R10: N+10% spills
R0..R9: N spills
So actually we do just as good a job with 10 regs as we do with 12 regs, and
better than the job we do with 13 regs!
I hope the reduced testcase actually points to the same underlying problem.</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>