[all-commits] [llvm/llvm-project] e38c8e: [BranchProbabilityInfo] Remove block handles in er...

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


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e38c8e7590a0a82be24f3bcc5b87736498f2cb07
      https://github.com/llvm/llvm-project/commit/e38c8e7590a0a82be24f3bcc5b87736498f2cb07
  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] Remove block handles in eraseBlock()

BranchProbabilityInfo::eraseBlock() is a public method and
can be called without deleting the block itself.
This method is made remove the correspondent tracking handle
from BranchProbabilityInfo::Handles along with
the probabilities of the block. Handles.erase() call is moved
to eraseBlock().
In setEdgeProbability() we need to add the block handle only once.

Reviewed By: kazu

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




More information about the All-commits mailing list