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 | c31eb205c18ab0703b0df49739a1e431ad22386d (patch) | |
tree | c7fe588f029057a8273d52fd48dc28d85396beb8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | |
parent | e5b40a9112de2bdbb9ac3ab360f0b0a50d06752b (diff) | |
download | bcm5719-llvm-c31eb205c18ab0703b0df49739a1e431ad22386d.tar.gz bcm5719-llvm-c31eb205c18ab0703b0df49739a1e431ad22386d.zip |
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.
llvm-svn: 54248
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 6267eb9fea8..ef90400023c 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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 |