OSDN Git Service

Add support to optionally limit the size of jump tables.
authorEvandro Menezes <e.menezes@samsung.com>
Mon, 26 Sep 2016 15:32:33 +0000 (15:32 +0000)
committerEvandro Menezes <e.menezes@samsung.com>
Mon, 26 Sep 2016 15:32:33 +0000 (15:32 +0000)
commit653861f9c744f044cc5822257d2f5a44f754e9a8
tree65e82231c8ff5f1ebc39249355db4880ace3e2a5
parent34552649e8185e5a5bf78d550bd41b2bea5724e6
Add support to optionally limit the size of jump tables.

Many high-performance processors have a dedicated branch predictor for
indirect branches, commonly used with jump tables.  As sophisticated as such
branch predictors are, they tend to have well defined limits beyond which
their effectiveness is hampered or even nullified.  One such limit is the
number of possible destinations for a given indirect branches that such
branch predictors can handle.

This patch considers a limit that a target may set to the number of
destination addresses in a jump table.

Patch by: Evandro Menezes <e.menezes@samsung.com>, Aditya Kumar
<aditya.k7@samsung.com>, Sebastian Pop <s.pop@samsung.com>.

Differential revision: https://reviews.llvm.org/D21940

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@282412 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/TargetLoweringBase.cpp
lib/Target/AArch64/AArch64ISelLowering.cpp
lib/Target/AArch64/AArch64Subtarget.cpp
lib/Target/AArch64/AArch64Subtarget.h
test/CodeGen/AArch64/max-jump-table.ll [new file with mode: 0644]