[all-commits] [llvm/llvm-project] b2f05f: [JumpThreading] Remove extraneous calls to setEdge...

kazutakahirata via All-commits all-commits at lists.llvm.org
Tue Oct 27 21:13:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b2f05fae80b0c1a307a9e257157a0d70e6623eb8
      https://github.com/llvm/llvm-project/commit/b2f05fae80b0c1a307a9e257157a0d70e6623eb8
  Author: Kazu Hirata <kazu at google.com>
  Date:   2020-10-27 (Tue, 27 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/JumpThreading.cpp
    R llvm/test/Transforms/JumpThreading/thread-prob-1.ll
    R llvm/test/Transforms/JumpThreading/thread-prob-2.ll

  Log Message:
  -----------
  [JumpThreading] Remove extraneous calls to setEdgeProbability

This patch removes extraneous calls to setEdgeProbability introduced
in c91487769d80487eba1712a7a172a1c8977a9b4f.

The follow-up patch, a7b662d0f4098371b96ce4446fb0eba79b0b649f, has
since fixed BranchProbabilityInfo::eraseBlock, so we don't need to
worry about getting stale values from getEdgeProbability.

Also, since getEdgeProbability(BB, BB->getSingleSuccessor()) returns
edge probability 1/1 by default for BB with exactly one successor
edge, we don't need to explicitly call setEdgeProbability.

This patch introduces almost no functional change, but we do end up
reducing debug messages from setEdgeProbability.

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




More information about the All-commits mailing list