[PATCH] D14361: Let SelectionDAG start to use probability-based interface to add successors.

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 23 11:15:03 PST 2015


congh updated this revision to Diff 40952.
congh added a comment.

Update the patch with test cases fixes.

There is one more big change in this update: BranchProbability is now constructed as an unknown one by default (it was zero before). This forces users to initialize it before using it. In SelectionDAGBuilder, before adding a successor we check if the provided probability is unknown or not: if yes, we get the probability from BPI. Previously it checks zero probability and this is incorrect as we allow zero probabilities now.


http://reviews.llvm.org/D14361

Files:
  include/llvm/Analysis/BranchProbabilityInfo.h
  include/llvm/Support/BranchProbability.h
  lib/CodeGen/MachineBasicBlock.cpp
  lib/CodeGen/SelectionDAG/FastISel.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
  lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h
  lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
  lib/Target/AArch64/AArch64FastISel.cpp
  lib/Target/Mips/MipsDelaySlotFiller.cpp
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/X86/X86FrameLowering.cpp
  test/CodeGen/ARM/ifcvt-branch-weight-bug.ll
  test/CodeGen/ARM/ifcvt-branch-weight.ll
  test/CodeGen/ARM/ifcvt-iter-indbr.ll
  test/CodeGen/ARM/taildup-branch-weight.ll
  test/CodeGen/Generic/MachineBranchProb.ll
  test/CodeGen/Hexagon/ifcvt-edge-weight.ll
  test/CodeGen/PowerPC/sjlj.ll
  test/CodeGen/X86/MachineBranchProb.ll
  test/CodeGen/X86/catchpad-weight.ll
  test/CodeGen/X86/stack-protector-weight.ll
  test/CodeGen/X86/switch-edge-weight.ll
  test/CodeGen/X86/switch-jump-table.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D14361.40952.patch
Type: text/x-patch
Size: 64598 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151123/5be578b9/attachment.bin>


More information about the llvm-commits mailing list