[NFC][SimplifyCFG] FoldBranchToCommonDest(): somewhat better structure weight updatin...
authorRoman Lebedev <lebedev.ri@gmail.com>
Thu, 21 Jan 2021 17:49:26 +0000 (20:49 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Fri, 22 Jan 2021 14:23:41 +0000 (17:23 +0300)
commit7b89efb55e4e5d6078aa9571f40859cc9ea01bcc
tree321c4687d53813ee3f514655aa518762c5e68e8f
parent256a0357524b6cea3c705a77ec3d3c0122ede861
[NFC][SimplifyCFG] FoldBranchToCommonDest(): somewhat better structure weight updating code

Hoist the successor updating out of the code that deals with branch
weight updating, and hoist the 'has weights' check from the latter,
making code more consistent and easier to follow.
llvm/lib/Transforms/Utils/SimplifyCFG.cpp