[all-commits] [llvm/llvm-project] 493115: [BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC

Yevgeny Rouban via All-commits all-commits at lists.llvm.org
Thu Nov 5 21:22:12 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 4931158d27dcf1842b12d49f56ed5dede9c292fd
      https://github.com/llvm/llvm-project/commit/4931158d27dcf1842b12d49f56ed5dede9c292fd
  Author: Yevgeny Rouban <yrouban at azul.com>
  Date:   2020-11-06 (Fri, 06 Nov 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/BranchProbabilityInfo.h
    M llvm/lib/Analysis/BranchProbabilityInfo.cpp

  Log Message:
  -----------
  [BranchProbabilityInfo] Get rid of MaxSuccIdx. NFC

This refactoring allows to eliminate the MaxSuccIdx map
proposed in the commit a7b662d0.
The idea is to remove probabilities for a block BB for
all its successors one by one from first, second, ...
till N-th until they are defined in Probs. This works
because probabilities for the block are set at once for
all its successors from number 0 to N-1 and the rest
are removed if there were stale probs.
The protected method setEdgeProbability(), which set
probabilities for individual successor, is removed.
This makes it clear that the probabilities are set in
bulk by the public method with the same name.

Reviewed By: kazu, MaskRay

Differential Revision: https://reviews.llvm.org/D90837




More information about the All-commits mailing list