[JumpThreading] Remove extraneous calls to setEdgeProbability
authorKazu Hirata <kazu@google.com>
Wed, 28 Oct 2020 04:12:54 +0000 (21:12 -0700)
committerKazu Hirata <kazu@google.com>
Wed, 28 Oct 2020 04:12:54 +0000 (21:12 -0700)
commitb2f05fae80b0c1a307a9e257157a0d70e6623eb8
treeb4aa1fa8974469d78f3720c898e60e2d380a3321
parentae76729a015478fdfe1477653c36bfe390445f0d
[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
llvm/lib/Transforms/Scalar/JumpThreading.cpp
llvm/test/Transforms/JumpThreading/thread-prob-1.ll [deleted file]
llvm/test/Transforms/JumpThreading/thread-prob-2.ll [deleted file]