[PATCH] Insert tbb/tbh optimization where previous jump table resided
Daniel Stewart
stewartd at codeaurora.org
Thu Dec 11 10:18:37 PST 2014
The insertion of tbb/tbh instructions should be placed where the previous jump table instruction was, not at the end of the block. It is possible that new water was created after a basic block that ends in a jump table, due to not having a sufficient area within range. In this case, the new water is created at the end of the block and an unconditional branch instruction is added to the end of the basic block. A subsequent Thumb2 optimization of the jump table places a tbb/tbh at the end of the block and erases the existing jump table branch. But this results in the unconditional branch being hit before the jump table ever gets hit.
This patch places the tbb/tbh at the same location as the jump table branch.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D6621
Files:
lib/Target/ARM/ARMConstantIslandPass.cpp
test/CodeGen/Thumb2/constant-islands-jump-table.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D6621.17180.patch
Type: text/x-patch
Size: 14034 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20141211/4c8b07dd/attachment.bin>
More information about the llvm-commits
mailing list