<div dir="ltr"><div>On Mon, Dec 14, 2015 at 4:50 PM, David Blaikie <span dir="ltr"><<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>></span> wrote:<br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Tue, Dec 15, 2015 at 6:11 AM, Cong Hou via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Author: conghou<br>
Date: Mon Dec 14 13:11:54 2015<br>
New Revision: 255530<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=255530&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=255530&view=rev</a><br>
Log:<br>
Remove the successor probabilities normalization in tail duplication pass.<br>
<br>
The normalization may cause assertion failures on SystemZ and some out-of-tree<br>
tests. </blockquote><div><br></div></span><div>Sounds like you have test coverage - please commit such a test to go with this change.</div></div></div></div></blockquote><div><br></div><div>Actually I haven't got reduced test cases from others. I have requested but haven't got replied.</div><div><br></div><div>Cong</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><span class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">The root cause is that unknown probabilities are materialized into known<br>
ones by calling getSuccProbability(), which is then used to add another<br>
successor to the same MBB which results in mixed known and unknown<br>
probabilities. But currently those mixed probabilities cannot be normalized.<br>
<br>
I will compose another patch to fix the root issue.<br>
<br>
<br>
<br>
Modified:<br>
llvm/trunk/lib/CodeGen/TailDuplication.cpp<br>
<br>
Modified: llvm/trunk/lib/CodeGen/TailDuplication.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=255530&r1=255529&r2=255530&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/TailDuplication.cpp?rev=255530&r1=255529&r2=255530&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/CodeGen/TailDuplication.cpp (original)<br>
+++ llvm/trunk/lib/CodeGen/TailDuplication.cpp Mon Dec 14 13:11:54 2015<br>
@@ -751,7 +751,6 @@ TailDuplicatePass::duplicateSimpleBB(Mac<br>
assert(NumSuccessors <= 1);<br>
if (NumSuccessors == 0 || *PredBB->succ_begin() != NewTarget)<br>
PredBB->addSuccessor(NewTarget, Prob);<br>
- PredBB->normalizeSuccProbs();<br>
<br>
TDBBs.push_back(PredBB);<br>
}<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></span></div><br></div></div>
</blockquote></div><br></div></div>