<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri","sans-serif";
mso-fareast-language:EN-US;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-GB link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>This one was found by post-commit visual inspection --- I do not have any testcase handy. But I will see if I can come up with one.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Arnaud<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span lang=EN-US style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> David Blaikie [mailto:dblaikie@gmail.com] <br><b>Sent:</b> 21 October 2014 18:37<br><b>To:</b> Arnaud De Grandmaison<br><b>Cc:</b> llvm-commits@cs.uiuc.edu<br><b>Subject:</b> Re: [llvm] r220302 - [PBQP] Fix coalescing benefits<o:p></o:p></span></p><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p><div><p class=MsoNormal style='margin-left:36.0pt'>On Tue, Oct 21, 2014 at 9:24 AM, Arnaud A. de Grandmaison <<a href="mailto:arnaud.degrandmaison@arm.com" target="_blank">arnaud.degrandmaison@arm.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal style='margin-left:36.0pt'>Author: aadg<br>Date: Tue Oct 21 11:24:15 2014<br>New Revision: 220302<br><br>URL: <a href="http://llvm.org/viewvc/llvm-project?rev=220302&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=220302&view=rev</a><br>Log:<br>[PBQP] Fix coalescing benefits<br><br>As coalescing registers is a benefit, the cost should be improved (i.e. made smaller) when coalescing is possible.<br><br>Modified:<br> llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp<br><br>Modified: llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp<br>URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=220302&r1=220301&r2=220302&view=diff" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp?rev=220302&r1=220301&r2=220302&view=diff</a><br>==============================================================================<br>--- llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp (original)<br>+++ llvm/trunk/lib/CodeGen/RegAllocPBQP.cpp Tue Oct 21 11:24:15 2014<br>@@ -350,7 +350,7 @@ public:<br><br> if (PRegOpt < Allowed.size()) {<br> PBQPRAGraph::RawVector NewCosts(G.getNodeCosts(NId));<br>- NewCosts[PRegOpt + 1] += CBenefit;<br>+ NewCosts[PRegOpt + 1] -= CBenefit;<o:p></o:p></p><div><p class=MsoNormal style='margin-left:36.0pt'><br>Test coverage for this?<br> <o:p></o:p></p></div><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><p class=MsoNormal style='margin-left:36.0pt'> G.setNodeCosts(NId, std::move(NewCosts));<br> }<br> } else {<br>@@ -395,7 +395,7 @@ private:<br> for (unsigned J = 0; J != Allowed2.size(); ++J) {<br> unsigned PReg2 = Allowed2[J];<br> if (PReg1 == PReg2)<br>- CostMat[I + 1][J + 1] += -Benefit;<br>+ CostMat[I + 1][J + 1] -= Benefit;<br> }<br> }<br> }<br><br><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><o:p></o:p></p></blockquote></div><p class=MsoNormal style='margin-left:36.0pt'><o:p> </o:p></p></div></div></div></body></html>