[PATCH] D12166: Assign weights to edges to jump table when lowering switch statement.

David Li via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 20 10:54:27 PDT 2015


davidxl added a comment.

Can we add more unit test cases (with annotated profile data) to cover profile update for various switch lowering strategies?


================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:1901
@@ -1900,3 +1900,3 @@
   addSuccessorWithWeight(SwitchBB, B.Default);
   addSuccessorWithWeight(SwitchBB, MBB);
 
----------------
Same bug occurs here too. The weight to MBB should be the sum of the ExtraWeight of all cases of 'B'.   See visitBitTestCase.


http://reviews.llvm.org/D12166





More information about the llvm-commits mailing list