llvm-project/llvm/test/Analysis
Evgeniy Brevnov bb0842a3f1 [BPI] Incorrect probability reported in case of mulptiple edges.
Summary:
By design 'BranchProbabilityInfo:: getEdgeProbability(const BasicBlock *Src, const BasicBlock *Dst) const' should return sum of probabilities over all edges from Src to Dst. Current implementation is buggy and returns 1/num_of_successors if probabilities are not explicitly set.

Note current implementation of BPI printing has an issue as well and annotates each edge with sum of probabilities over all ages from one basic block to another. That's why 30% probability reported (instead of 10%) in the lit test. This is not urgent issue since only printing is affected.
Note also current implementation assumes that either all or none edges have probabilities set. This is not the only place which uses such assumption. At least we should assert that in verifier. In addition we can think on a more robust API of BPI which would prevent situations.

Reviewers: skatkov, yrouban, taewookoh

Reviewed By: skatkov

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D79071
2020-04-30 11:41:03 +07:00
..
AliasSet [llvm] Fix missing FileCheck directive colons 2020-04-06 09:59:08 -06:00
AssumptionCache
BasicAA [AssumeBundles] adapte GVN to assume bundles 2020-04-14 12:48:14 +02:00
BlockFrequencyInfo
BranchProbabilityInfo [BPI] Incorrect probability reported in case of mulptiple edges. 2020-04-30 11:41:03 +07:00
CFLAliasAnalysis [CFLGraph] Add support for unary fneg instruction. 2019-06-06 19:21:23 +00:00
CallGraph Revert "[CallGraph] Refine call graph for indirect calls with !callees metadata" 2019-08-16 10:59:18 +00:00
ConstantFolding [ConstantFold][SVE] Fix constant folding for scalable vector compare instruction. 2020-03-12 16:15:38 -07:00
CostModel [X86] Lower the cost of v4i64->v4i32 and v8i64->v8i32 truncate with AVX 2020-04-29 13:21:44 -07:00
DDG [DDG] Data Dependence Graph - Graph Simplification 2020-02-19 13:41:51 -05:00
Delinearization Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
DemandedBits
DependenceAnalysis Require "target datalayout" to be at the beginning of an IR file. 2020-04-20 11:55:49 -07:00
DivergenceAnalysis [AMDGPU] New llvm.amdgcn.ballot intrinsic 2020-03-31 10:35:39 +02:00
DominanceFrontier IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
Dominators
GlobalsModRef Revert a107f86 "[GlobalsAA] Add back a check to intrinsic_addresstaken.ll to see if the AVX and AVX512 bots still fail for it." 2020-01-24 13:15:23 -08:00
IVUsers
LazyCallGraph Revert "[CallGraph] Refine call graph for indirect calls with !callees metadata" 2019-08-16 10:59:18 +00:00
LazyValueAnalysis [ValueLattice] Go to overdefined in getRange() for full ranges. 2020-03-14 19:50:15 +00:00
LegacyDivergenceAnalysis Resubmit: [DA][TTI][AMDGPU] Add option to select GPUDA with TTI 2020-01-24 10:39:40 -08:00
Lint [Lint] Permit aliasing noalias readonly arguments 2019-04-23 23:43:47 +00:00
LoopAccessAnalysis Revert "[IRBuilder] Fold consistently for or/and whether constant is LHS or RHS" 2019-07-07 22:12:01 +00:00
LoopCacheAnalysis/PowerPC [LoopCacheAnalysis]: Add support for negative stride 2020-02-10 13:22:35 -05:00
LoopInfo
LoopNestAnalysis [LoopNest]: Analysis to discover properties of a loop nest. 2020-03-03 18:25:19 +00:00
MemoryDependenceAnalysis Lost regression test from commit 5a63813dc7. 2020-03-04 19:52:42 +07:00
MemorySSA [MemorySSA] Pass DT to the upward iterator for proper PhiTranslation. 2020-04-29 14:28:31 -07:00
MustExecute [MustExecute] Add backward exploration for must-be-executed-context 2020-02-20 14:49:30 +09:00
PhiValues
PostDominators
ProfileSummary
RegionInfo IR: Support parsing numeric block ids, and emit them in textual output. 2019-03-22 18:27:13 +00:00
ScalarEvolution [ValueTracking] Let analyses assume a value cannot be partially poison 2020-04-23 08:08:53 +09:00
ScopedNoAliasAA
StackSafetyAnalysis [memtag] Plug in stack safety analysis. 2020-03-16 16:35:25 -07:00
TypeBasedAliasAnalysis Migrate function attribute "no-frame-pointer-elim"="false" to "frame-pointer"="none" as cleanups after D56351 2019-12-24 16:27:51 -08:00
ValueTracking [AssumeBundles] Use assume bundles in isKnownNonZero 2020-04-24 20:41:51 +02:00
alias-analysis-uses.ll