<html>
<head>
<base href="http://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 --- - Possible bug in MachineScheduler tryPressure"
href="http://llvm.org/bugs/show_bug.cgi?id=18883">18883</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Possible bug in MachineScheduler tryPressure
</td>
</tr>
<tr>
<th>Product</th>
<td>new-bugs
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Macintosh
</td>
</tr>
<tr>
<th>OS</th>
<td>MacOS X
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Keywords</th>
<td>code-quality
</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>stephen.montgomery333@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>atrick@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>I've been working on an out-of-tree target for which register pressure
reduction is critical. Sometime between the 3.3 and 3.4 releases something
changed in MachineScheduler which caused my target to generate poor instruction
schedules. It's also still present on the trunk so far as I can see.
I believe that the problem may lie in static function tryPressure() in
MachineScheduler.cpp with the code whose comment starts:
// If one candidate decreases and the other increases, go with it.
If I understood correctly, if one candidate has UnitInc<0 and the other has
UnitInc>=0 then pick the candidate with UnitInc<0 because it reduces register
pressure. If that's the case, then should the call be to tryGreater(), in order
to pick the candidate for which UnitInc<0 has value 1, rather than tryLess()
which will pick the candidate for which is has value 0?
I can't easily supply a test case because I see this problem on my target,
which only has a few registers, but it might take quite a bit of work to make
it happen on other targets.</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>