[llvm] r207194 - blockfreq: Document assertion
Duncan P. N. Exon Smith
dexonsmith at apple.com
Thu Apr 24 21:38:40 PDT 2014
Author: dexonsmith
Date: Thu Apr 24 23:38:40 2014
New Revision: 207194
URL: http://llvm.org/viewvc/llvm-project?rev=207194&view=rev
Log:
blockfreq: Document assertion
<rdar://problem/14292693>
Modified:
llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
Modified: llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp?rev=207194&r1=207193&r2=207194&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp (original)
+++ llvm/trunk/lib/Analysis/BlockFrequencyInfoImpl.cpp Thu Apr 24 23:38:40 2014
@@ -485,7 +485,7 @@ static void combineWeight(Weight &W, con
}
assert(W.Type == OtherW.Type);
assert(W.TargetNode == OtherW.TargetNode);
- assert(W.Amount < W.Amount + OtherW.Amount);
+ assert(W.Amount < W.Amount + OtherW.Amount && "Unexpected overflow");
W.Amount += OtherW.Amount;
}
static void combineWeightsBySorting(WeightList &Weights) {
More information about the llvm-commits
mailing list