[llvm] r206666 - Reapply "blockfreq: Rewrite BlockFrequencyInfoImpl" (#2)
Duncan P. N. Exon Smith
dexonsmith at apple.com
Fri Apr 18 18:19:21 PDT 2014
On 2014-Apr-18, at 16:53, Nick Lewycky <nlewycky at google.com> wrote:
> 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
Sorry I missed this earlier! I've reverted the patch (as planned),
but next time I reapply that'll be fixed.
That's a useful warning -- I'm surprised I don't see that with clang.
More information about the llvm-commits
mailing list