<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Jacob,<div><br></div><div>You are right. It makes sense only if we have profile info, it other case it wouldn't work fine. I'm working on the fix now.</div><div><br></div><div><div>
<span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; font-size: medium; "><div>-Kuba</div></span>
</div>
<br><div><div>On Jun 23, 2011, at 3:39 PM, Jakob Stoklund Olesen wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On Jun 23, 2011, at 2:45 PM, Jakub Staszak wrote:<br><br><blockquote type="cite">+  // Get sum of the edge weights going to the BB block.<br></blockquote><blockquote type="cite">+  uint32_t getBackSumForBlock(BasicBlock *BB) const;<br></blockquote><br>This function doesn't make sense. The weights in different predecessors are unrelated, adding them doesn't give you a useful result.<br><br><blockquote type="cite">+  // Return a probability of getting to the DST block through SRC->DST edge.<br></blockquote><blockquote type="cite">+  // Returned value is a fraction between 0 (0% probability) and<br></blockquote><blockquote type="cite">+  // 1 (100% probability), however the value is never equal to 0, and can be 1<br></blockquote><blockquote type="cite">+  // only iff DST block has only one predecesor.<br></blockquote><blockquote type="cite">+  BranchProbability getBackEdgeProbability(BasicBlock *Src,<br></blockquote><blockquote type="cite">+                                           BasicBlock *Dst) const;<br></blockquote><br>Which means that this function is returning nonsense.<br><br>/jakob<br><br><br></div></blockquote></div><br></div></body></html>