mirror of
https://github.com/intel/llvm.git
synced 2026-02-05 04:46:27 +08:00
bbd33f6766d8c35c35c4633921422cd860af048b
BranchFolderPass was not correctly setting the basic block branch weights when tail-merging created or merged blocks. This patch recomutes the weights of tail-merged blocks using the following formula: branch_weight(merged block to successor j) = sum(block_frequency(bb) * branch_probability(bb -> j)) bb is a block that is in the set of merged blocks. <rdar://problem/16256423> llvm-svn: 215135
Languages
LLVM
41.4%
C++
31.4%
C
13%
Assembly
9.6%
MLIR
1.5%
Other
2.7%