]> granicus.if.org Git - llvm/commit
Factor out a splitSwitchCase() function so that it can be reused.
authorDaniel Jasper <djasper@google.com>
Tue, 20 Jan 2015 08:57:44 +0000 (08:57 +0000)
committerDaniel Jasper <djasper@google.com>
Tue, 20 Jan 2015 08:57:44 +0000 (08:57 +0000)
commita68dc112616e1c318e10b0d0336cf68bcea371e1
tree5eb810ffa41b6d477807bc5ebe8c20231adcb6f5
parent06df574f2031ac2201a3f0ccbf0ce08cd206a22a
Factor out a splitSwitchCase() function so that it can be reused.

This is in preparation for a fix to llvm.org/PR22262. One of the ideas
here is to first find a good jump table range first and then split
before and after it. Thereby, we don't need to use the
split-based-on-density heuristic at all, which can make the "binary
tree" deteriorate in various cases.

Also some minor cleanups.

No functional changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@226551 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.h