<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 18 April 2014 15:30, Duncan P. N. Exon Smith <span dir="ltr"><<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</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: dexonsmith<br>
Date: Fri Apr 18 17:30:03 2014<br>
New Revision: 206666<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=206666&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=206666&view=rev</a><br>
Log:<br>
Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)<br>
<br>
This reverts commit r206628, reapplying r206622 (and r206626).<br>
<br>
Two tests are failing only on buildbots [1][2]: i.e., I can't reproduce<br>
on Darwin, and Chandler can't reproduce on Linux.  Asan and valgrind<br>
don't tell us anything, but we're hoping the msan bot will catch it.<br>
<br>
So, I'm applying this again to get more feedback from the bots.  I'll<br>
leave it in long enough to trigger builds in at least the sanitizer<br>
buildbots (it was failing for reasons unrelated to my commit last time<br>
it was in), and hopefully a few others.... and then I expect to revert a<br>
third time.<br>
 </blockquote><div><br></div><div>[...] </div><div><br></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">


+//===----------------------------------------------------------------------===//<br>
+//<br>
+// BlockMass implementation.<br>
+//<br>
+//===----------------------------------------------------------------------===//<br>
+BlockMass &BlockMass::operator*=(const BranchProbability &P) {<br>
+  uint32_t N = P.getNumerator(), D = P.getDenominator();<br>
+  assert(D || "divide by 0");<br></blockquote><div><br></div><div><div>lib/Analysis/BlockFrequencyInfoImpl.cpp:315:15: error: implicit conversion turns string literal into bool: 'const char [12]' to 'bool' [-Werror,-Wstring-conversion]</div>

<div>  assert(D || "divide by 0");</div><div>           ~~ ^~~~~~~~~~~~~</div></div><div><br></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">


+  assert(N <= D || "fraction greater than 1");<br></blockquote><div><br></div><div><div>lib/Analysis/BlockFrequencyInfoImpl.cpp:316:20: error: implicit conversion turns string literal into bool: 'const char [24]' to 'bool' [-Werror,-Wstring-conversion]</div>

<div>  assert(N <= D || "fraction greater than 1");</div><div>                ~~ ^~~~~~~~~~~~~~~~~~~~~~~~~</div></div><div><br></div><div>Please fix!</div><div></div></div><br></div><div class="gmail_extra">
Nick</div>
<div class="gmail_extra"><br></div></div>