[llvm-commits] [llvm] r133766 - in /llvm/trunk: include/llvm/Analysis/BranchProbabilityInfo.h include/llvm/InitializePasses.h include/llvm/Support/BranchProbability.h lib/Analysis/Analysis.cpp lib/Analysis/BranchProbabilityInfo.cpp lib/Analysis/CMakeLists.txt

Jakub Staszak jstaszak at apple.com
Thu Jun 23 16:01:29 PDT 2011


Hi Jacob,

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.

-Kuba

On Jun 23, 2011, at 3:39 PM, Jakob Stoklund Olesen wrote:

> 
> On Jun 23, 2011, at 2:45 PM, Jakub Staszak wrote:
> 
>> +  // Get sum of the edge weights going to the BB block.
>> +  uint32_t getBackSumForBlock(BasicBlock *BB) const;
> 
> This function doesn't make sense. The weights in different predecessors are unrelated, adding them doesn't give you a useful result.
> 
>> +  // Return a probability of getting to the DST block through SRC->DST edge.
>> +  // Returned value is a fraction between 0 (0% probability) and
>> +  // 1 (100% probability), however the value is never equal to 0, and can be 1
>> +  // only iff DST block has only one predecesor.
>> +  BranchProbability getBackEdgeProbability(BasicBlock *Src,
>> +                                           BasicBlock *Dst) const;
> 
> Which means that this function is returning nonsense.
> 
> /jakob
> 
> 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20110623/1b346127/attachment.html>


More information about the llvm-commits mailing list