OSDN Git Service

TargetLowering interface to set/get minimum block entries for jump tables.
authorSebastian Pop <spop@codeaurora.org>
Tue, 25 Sep 2012 20:35:36 +0000 (20:35 +0000)
committerSebastian Pop <spop@codeaurora.org>
Tue, 25 Sep 2012 20:35:36 +0000 (20:35 +0000)
commit1a37d7e807ad6cc71fe3cffdf6674644c46a60eb
treeb95e8a119512fd8dd3efa9cad89421097262a380
parent442ffc346f942329bebdccdf54741713646e20ef
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164628 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Target/TargetLowering.h
lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
lib/CodeGen/SelectionDAG/TargetLowering.cpp
lib/Target/Hexagon/HexagonISelLowering.cpp