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

Cong Hou via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 13:48:52 PDT 2015


congh added inline comments.

================
Comment at: test/CodeGen/X86/switch-jump-table.ll:58
@@ +57,3 @@
+; CHECK2-LABEL: bar:
+; CHECK2: Successors according to CFG: BB#7(16) BB#1(96)
+; CHECK2: Successors according to CFG: BB#2(16) BB#3(16) BB#4(16) BB#5(16) BB#6(32)
----------------
hans wrote:
> This isn't really checking the probabilities though, but the block placement. Maybe that's the best we can do? :-/
> 
> Maybe use a more descriptive prefix than CHECK2? CHECK-PLACEMENT?
As this fix is for lowering IR to MC so I think the best pass that we should indicate here is expand-isel-pseudos. I have updated it. I also changed CHECK2 into CHECK-JT-WEIGHT to make it more descriptive. Thanks!


http://reviews.llvm.org/D12166





More information about the llvm-commits mailing list