diff options
author | Joerg Sonnenberger <joerg@bec.de> | 2016-11-15 12:39:46 +0000 |
---|---|---|
committer | Joerg Sonnenberger <joerg@bec.de> | 2016-11-15 12:39:46 +0000 |
commit | 1a7eec68a9b38314f01a8cd795d3eec92d996136 (patch) | |
tree | 69f8a097361224b70ab3bd214b2ea85bf84bd224 /llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | |
parent | 6380ce22127370f34b9d958209d634ddde3abe97 (diff) | |
download | bcm5719-llvm-1a7eec68a9b38314f01a8cd795d3eec92d996136.tar.gz bcm5719-llvm-1a7eec68a9b38314f01a8cd795d3eec92d996136.zip |
Introduce TLI predicative for base-relative Jump Tables.
For 64bit ABIs it is common practice to use relative Jump Tables with
potentially different relocation bases. As the logic for the jump table
itself doesn't depend on the relocation base, make it easier for targets
to use the generic logic. Start by dropping the now redundant MIPS logic.
Differential Revision: https://reviews.llvm.org/D26578
llvm-svn: 286951
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp index bce58d18b4c..d98a81b2f23 100644 --- a/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp @@ -3566,7 +3566,7 @@ bool SelectionDAGLegalize::ExpandNode(SDNode *Node) { ISD::SEXTLOAD, dl, PTy, Chain, Addr, MachinePointerInfo::getJumpTable(DAG.getMachineFunction()), MemVT); Addr = LD; - if (TM.isPositionIndependent()) { + if (TLI.isJumpTableRelative()) { // For PIC, the sequence is: // BRIND(load(Jumptable + index) + RelocBase) // RelocBase can be JumpTable, GOT or some sort of global base. |