[PATCH] D41029: [JumpTables][PowerPC] Let targets decide which switch instructions are suitable for jump tables
Nemanja Ivanovic via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 31 06:06:39 PST 2018
nemanjai updated this revision to Diff 132158.
nemanjai added a comment.
Benchmarking has shown that we should be concerned with any type of call in the case statements equally (i.e. indirect calls are no worse than direct). Furthermore, large switch statements can be lowered to jump tables without much penalty even if there are calls.
As a result, the algorithm is now:
- Always lower large switches to jump tables (i.e. switches over 64 cases)
- If there are any calls in a smaller switch, don't lower it to a jump table
The comments should be addressed now.
Repository:
rL LLVM
https://reviews.llvm.org/D41029
Files:
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
test/CodeGen/PowerPC/NoJTsDueToCTRUse.ll
test/CodeGen/PowerPC/mcm-5.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D41029.132158.patch
Type: text/x-patch
Size: 21748 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180131/7a91606b/attachment.bin>
More information about the llvm-commits
mailing list