[llvm] r206666 - Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)

Nick Lewycky nlewycky at google.com
Fri Apr 18 16:53:17 PDT 2014


On 18 April 2014 15:30, Duncan P. N. Exon Smith <dexonsmith at apple.com>wrote:

> Author: dexonsmith
> Date: Fri Apr 18 17:30:03 2014
> New Revision: 206666
>
> URL: http://llvm.org/viewvc/llvm-project?rev=206666&view=rev
> Log:
> Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)
>
> This reverts commit r206628, reapplying r206622 (and r206626).
>
> Two tests are failing only on buildbots [1][2]: i.e., I can't reproduce
> on Darwin, and Chandler can't reproduce on Linux.  Asan and valgrind
> don't tell us anything, but we're hoping the msan bot will catch it.
>
> So, I'm applying this again to get more feedback from the bots.  I'll
> leave it in long enough to trigger builds in at least the sanitizer
> buildbots (it was failing for reasons unrelated to my commit last time
> it was in), and hopefully a few others.... and then I expect to revert a
> third time.
>


[...]

+//===----------------------------------------------------------------------===//
> +//
> +// BlockMass implementation.
> +//
>
> +//===----------------------------------------------------------------------===//
> +BlockMass &BlockMass::operator*=(const BranchProbability &P) {
> +  uint32_t N = P.getNumerator(), D = P.getDenominator();
> +  assert(D || "divide by 0");
>

lib/Analysis/BlockFrequencyInfoImpl.cpp:315:15: error: implicit conversion
turns string literal into bool: 'const char [12]' to 'bool'
[-Werror,-Wstring-conversion]
  assert(D || "divide by 0");
           ~~ ^~~~~~~~~~~~~

+  assert(N <= D || "fraction greater than 1");
>

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

Please fix!

Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140418/4b0df1c7/attachment.html>


More information about the llvm-commits mailing list