[llvm-commits] BlockFrequency for BasicBlocks

Jakub Staszak jstaszak at apple.com
Wed Jun 22 14:39:56 PDT 2011


On Jun 21, 2011, at 8:21 PM, Andrew Trick wrote:

> 
> Yes, by "1" I meant literal 1, not scaled 1. I think this could happen inside getEdgeFreq() when (N * getBlockFreq(Src)) < D. You should probably check for that case and return the smallest nonzero frequency.
> 
> You actually shouldn't have a problem in divBlockFreq, but somewhere you should assert that the input BranchProbability is well-formed (N < D).

The bug was in the complete different place. Instead of using backedge probability info (probability of getting to DST block through SRC block) i used edge probability. It caused some problem in very rare cases (only during benchmarking).


> -Andy
> 
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bf4bb.5.patch
Type: application/octet-stream
Size: 20597 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110622/9b184e86/attachment.obj>


More information about the llvm-commits mailing list