[PATCH] Prevent binary-tree deterioration in sparse trees.

Hans Wennborg hans at chromium.org
Tue Jan 20 11:05:56 PST 2015


I'm fine with this as an incremental improvement.


================
Comment at: test/CodeGen/X86/switch-jump-table.ll:55
@@ +54,3 @@
+; Ensure that optimizing for jump tables doesn't needlessly deteriorate the
+; created binary tree search. See PR22262.
+define void @test(i32 %x, i32* %y) {
----------------
I'm not sure this test is in the right file. Is there a file dealing with binary tree lowering issues? If not, maybe we should have one?

================
Comment at: test/CodeGen/X86/switch-jump-table.ll:91
@@ +90,3 @@
+  ret void
+; The correct binary switch here would start with a comparison against 39.
+; CHECK: cmpl $29
----------------
Maybe this comment could be improved to reflect that 39 would be the ideal, but 29 is what it's currently doing. Otherwise, the diff between what the comment is saying and the test is testing could be confusing.

http://reviews.llvm.org/D7070

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






More information about the llvm-commits mailing list