[PATCH] Allow 0-weight branches in BranchProbabilityInfo.

Hans Wennborg hans at chromium.org
Wed May 6 09:41:08 PDT 2015


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:8024
@@ -8013,1 +8023,3 @@
+      Weight = std::max(
+          1u, BPI->getEdgeWeight(SI.getParent(), I.getSuccessorIndex()));
       assert(Weight <= UINT32_MAX / SI.getNumSuccessors());
----------------
This looks good. I can address this TODO later.

I figured this would be the only change necessary for the switch lowering code. Are the changes to getEdgeWeight() and lowerWorkItem() also necessary?

http://reviews.llvm.org/D9533

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list