diff options
author | Sebastian Pop <spop@codeaurora.org> | 2012-09-25 20:35:36 +0000 |
---|---|---|
committer | Sebastian Pop <spop@codeaurora.org> | 2012-09-25 20:35:36 +0000 |
commit | edb31faf92b8685929a5bde6627ce351e8712d8c (patch) | |
tree | d614964ab539d1d03cce341e93e6bcbddc6b6494 /llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | |
parent | 88387f5332378537f4c4a4bed7428fe7914de817 (diff) | |
download | bcm5719-llvm-edb31faf92b8685929a5bde6627ce351e8712d8c.tar.gz bcm5719-llvm-edb31faf92b8685929a5bde6627ce351e8712d8c.zip |
TargetLowering interface to set/get minimum block entries for jump tables.
Provide interface in TargetLowering to set or get the minimum number of basic
blocks whereby jump tables are generated for switch statements rather than an
if sequence.
getMinimumJumpTableEntries() defaults to 4.
setMinimumJumpTableEntries() allows target configuration.
This patch changes the default for the Hexagon architecture to 5
as it improves performance on some benchmarks.
llvm-svn: 164628
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonISelLowering.cpp')
-rw-r--r-- | llvm/lib/Target/Hexagon/HexagonISelLowering.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp index 703a128ee02..1c891f14d8f 100644 --- a/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp +++ b/llvm/lib/Target/Hexagon/HexagonISelLowering.cpp @@ -1350,6 +1350,8 @@ HexagonTargetLowering::HexagonTargetLowering(HexagonTargetMachine } else { setOperationAction(ISD::BR_JT, MVT::Other, Expand); } + // Increase jump tables cutover to 5, was 4. + setMinimumJumpTableEntries(5); setOperationAction(ISD::BR_CC, MVT::i32, Expand); |