2 Commits

Author SHA1 Message Date
Alexis Engelke
56c579e288
[Analysis][NFC] Use block numbers for BranchProbabilityInfo (#186658)
Instead of a hash map mapping pairs of blocks and successor index to the
probability, store the probabilities as flat array and start indices
into this array in a per-block information vector.

Also drop value handles: no stored pointers => no stale pointers. If a
block is removed, the block number is not reused unless the function is
renumbered, and BPI doesn't support renumbering.
2026-03-16 13:04:04 +01:00
tianleliu
0df0906af6
[JumpThreading] Use [BB->SuccIndx] to get probability when updating BB info. (#134585)
In case the same src BB targets to the same dest BB in different
conditions/edges, such as switch-cases, we should use
prob[SrcBB->SuccIndx] instead of prob[SrcBB->DstBB] to get probability.
2025-04-08 16:32:34 +08:00