PGO branch weight: update edge weights in SelectionDAGBuilder.
authorManman Ren <manman.ren@gmail.com>
Fri, 31 Jan 2014 00:42:44 +0000 (00:42 +0000)
committerManman Ren <manman.ren@gmail.com>
Fri, 31 Jan 2014 00:42:44 +0000 (00:42 +0000)
commit21f09088d3c3d6d238c6b341d3f673feb2edc9be
tree7fc794e9fa2dca4eafb6531e5e9fb35d1e99fd5d
parente932091eb5e17511e0db975811fc5aaf038b7be3
PGO branch weight: update edge weights in SelectionDAGBuilder.

When converting from "or + br" to two branches, or converting from
"and + br" to two branches, we correctly update the edge weights of
the two branches.

The previous attempt at r200431 was reverted at r200434 because of
two testing case failures. I modified my patch a little, but forgot
to re-run "make check-all".

Testing case CodeGen/ARM/lsr-unfolded-offset.ll is updated because of
the patch's impact on branch probability which causes changes in
spill placement.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@200502 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
test/CodeGen/ARM/lsr-unfolded-offset.ll
test/CodeGen/X86/MachineBranchProb.ll [new file with mode: 0644]