diff options
author | Evan Cheng <evan.cheng@apple.com> | 2012-07-02 22:39:56 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2012-07-02 22:39:56 +0000 |
commit | 39e90029a2a597afa22d81c5c8f47b6c49128058 (patch) | |
tree | f8c22b2604d64b73eabc2ebafc34e90f87fdef61 /llvm/lib/CodeGen | |
parent | 5c1a01a625e49edc0a159e6f96a5cf8e0d226248 (diff) | |
download | bcm5719-llvm-39e90029a2a597afa22d81c5c8f47b6c49128058.tar.gz bcm5719-llvm-39e90029a2a597afa22d81c5c8f47b6c49128058.zip |
Target option DisableJumpTables is a gross hack. Move it to TargetLowering instead.
llvm-svn: 159611
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 | ||||
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 4fd95e92b9c..2d074079ccf 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2052,7 +2052,7 @@ bool SelectionDAGBuilder::handleSmallSwitchRange(CaseRec& CR, } static inline bool areJTsAllowed(const TargetLowering &TLI) { - return !TLI.getTargetMachine().Options.DisableJumpTables && + return TLI.supportJumpTables() && (TLI.isOperationLegalOrCustom(ISD::BR_JT, MVT::Other) || TLI.isOperationLegalOrCustom(ISD::BRIND, MVT::Other)); } diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 2020cc7f7b0..6212918d6c4 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -612,6 +612,7 @@ TargetLowering::TargetLowering(const TargetMachine &tm, MinStackArgumentAlignment = 1; ShouldFoldAtomicFences = false; InsertFencesForAtomic = false; + SupportJumpTables = true; InitLibcallNames(LibcallRoutineNames); InitCmpLibcallCCs(CmpLibcallCCs); |