[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
Jakob Stoklund Olesen
stoklund at 2pi.dk
Thu Jun 23 15:39:33 PDT 2011
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
More information about the llvm-commits
mailing list