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

llvmbot via All-commits all-commits at lists.llvm.org
Thu Dec 3 23:55:34 PST 2020


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e2fc11cf9f6cd801b5f3bf94541561829ff02f77
      https://github.com/llvm/llvm-project/commit/e2fc11cf9f6cd801b5f3bf94541561829ff02f77
  Author: Kazu Hirata <kazu at google.com>
  Date:   2020-12-03 (Thu, 03 Dec 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    A llvm/test/Transforms/JumpThreading/thread-prob-4.ll
    A llvm/test/Transforms/JumpThreading/thread-prob-5.ll
    A llvm/test/Transforms/JumpThreading/thread-prob-6.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.

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




More information about the All-commits mailing list