[all-commits] [llvm/llvm-project] 147ccc: [JumpThreading] Call eraseBlock when folding a con...

kazutakahirata via All-commits all-commits at lists.llvm.org
Sun Nov 15 22:30:01 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 147ccc848a5581765a758dc752842053aa0024d0
      https://github.com/llvm/llvm-project/commit/147ccc848a5581765a758dc752842053aa0024d0
  Author: Kazu Hirata <kazu at google.com>
  Date:   2020-11-15 (Sun, 15 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/BranchProbabilityInfo.cpp
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    A llvm/test/Transforms/JumpThreading/thread-prob-2.ll

  Log Message:
  -----------
  [JumpThreading] Call eraseBlock when folding a conditional branch

This patch teaches the jump threading pass to call BPI->eraseBlock
when it folds a conditional branch.

Without this patch, BranchProbabilityInfo could end up with stale edge
probabilities for the basic block containing the conditional branch --
one edge probability with less than 1.0 and the other for a removed
edge.

This patch is one of the steps before we can safely re-apply D91017.

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




More information about the All-commits mailing list