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)
commit67d492a544164c75004f9a5a64a0501cc0ce71ad
tree9fbf3520d063a0b260b270f005ad5ca3bb679dfa
parentd99bb0a7ad76932065c2727c8f971b4838edd95e
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.

llvm-svn: 240071
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/test/CodeGen/X86/switch.ll