Switch lowering: enable whole-switch jump tables at -O0.
authorHans Wennborg <hans@hanshq.net>
Thu, 18 Jun 2015 22:22:30 +0000 (22:22 +0000)
committerHans Wennborg <hans@hanshq.net>
Thu, 18 Jun 2015 22:22:30 +0000 (22:22 +0000)
commit5caacef5c1cbd8c710908b2213677311247b7d9f
tree93af629debe5f5f4803e148e4120a0415967cbdd
parent50cef0052f054115c727c9133d307ae31c8478fa
Switch lowering: enable whole-switch jump tables at -O0.

To same compile time, the analysis to find dense case-clusters in switches is
not done at -O0. However, when the whole switch is dense enough, it is easy to
turn it into a jump table, resulting in much faster code with no extra effort.

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