The TBB and TBH instructions for Thumb2 are really handy for jump tables, but
authorJim Grosbach <grosbach@apple.com>
Wed, 11 Nov 2009 02:47:19 +0000 (02:47 +0000)
committerJim Grosbach <grosbach@apple.com>
Wed, 11 Nov 2009 02:47:19 +0000 (02:47 +0000)
commit1fc7d715aa35703fcc4a87ece718a8c447e8ee72
treed233b66747e945202fe0f1b32dc064fa1fa56551
parentcc4d3b25f336eef135cb7125716ecb2c1979e92e
The TBB and TBH instructions for Thumb2 are really handy for jump tables, but
can only branch forward. To best take advantage of them, we'd like to adjust
the basic blocks around a bit when reasonable. This patch puts basics in place
to do that, with a super-simple algorithm for backwards jump table targets that
creates a new branch after the jump table which branches backwards. Real
heuristics for reordering blocks or other modifications rather than inserting
branches will follow.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86791 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/ARM/ARMConstantIslandPass.cpp