summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorDale Johannesen <dalej@apple.com>2008-07-31 18:13:12 +0000
committerDale Johannesen <dalej@apple.com>2008-07-31 18:13:12 +0000
commitc31eb205c18ab0703b0df49739a1e431ad22386d (patch)
treec7fe588f029057a8273d52fd48dc28d85396beb8 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parente5b40a9112de2bdbb9ac3ab360f0b0a50d06752b (diff)
downloadbcm5719-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.cpp5
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
OpenPOWER on IntegriCloud