]> granicus.if.org Git - llvm/commit
Prevent binary-tree deterioration in sparse switch statements.
authorDaniel Jasper <djasper@google.com>
Tue, 20 Jan 2015 19:43:33 +0000 (19:43 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 20 Jan 2015 19:43:33 +0000 (19:43 +0000)
commit529ff2f2575d4be7ac57b291f493a3c659f5107e
treeba3f381c90f6f76962b035d09ce418429612d14e
parentb8ae0acfaf150de62ffcb42910cfa3c7f6eba796
Prevent binary-tree deterioration in sparse switch statements.

This addresses part of llvm.org/PR22262. Specifically, it prevents
considering the densities of sub-ranges that have fewer than
TLI.getMinimumJumpTableEntries() elements. Those densities won't help
jump tables.

This is not a complete solution but works around the most pressing
issue.

Review: http://reviews.llvm.org/D7070

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226600 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
test/CodeGen/X86/switch-bt.ll