Assign weights to edges to jump table / bit test header when lowering switch statement.
Currently, when lowering switch statement and a new basic block is built for jump table / bit test header, the edge to this new block is not assigned with a correct weight. This patch collects the edge weight from all its successors and assign this sum of weights to the edge (and also the other fall-through edge). Test cases are adjusted accordingly.
Differential Revision: http://reviews.llvm.org/D12166#
fae6eca7
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@246104
91177308-0d34-0410-b5e6-
96231b3b80d8