diff options
author | Dale Johannesen <dalej@apple.com> | 2008-07-31 18:13:12 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2008-07-31 18:13:12 +0000 |
commit | 7232464bdaae5e6e48986a1e3b9a95fac7aa7bdf (patch) | |
tree | 166cb00f2c381ac43ecabcebe51bcb240fcba217 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | 75dcf08243d19a40d2e1cc12057bf9c00ca3df3b (diff) |
Add a flag to disable jump table generation (all
switches use the binary search algorithm) for
environments that don't support it. PPC64 JIT
is such an environment; turn the flag on for that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@54248 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6267eb9fea..ef90400023 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -1916,8 +1916,9 @@ bool SelectionDAGLowering::handleSmallSwitchRange(CaseRec& CR, } static inline bool areJTsAllowed(const TargetLowering &TLI) { - return (TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || - TLI.isOperationLegal(ISD::BRIND, MVT::Other)); + return !DisableJumpTables && + (TLI.isOperationLegal(ISD::BR_JT, MVT::Other) || + TLI.isOperationLegal(ISD::BRIND, MVT::Other)); } /// handleJTSwitchCase - Emit jumptable for current switch case range |