diff options
author | Chris Lattner <sabre@nondot.org> | 2010-01-26 06:53:37 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-01-26 06:53:37 +0000 |
commit | 547c761dd6578896a80e649d2ca4ec4446ea3e44 (patch) | |
tree | 14cadbad27ecf638ecfa99f98abdd33980fc500c /llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | |
parent | 4db603f93bf3978f60e858c167045ca07d9cfca3 (diff) | |
download | bcm5719-llvm-547c761dd6578896a80e649d2ca4ec4446ea3e44.tar.gz bcm5719-llvm-547c761dd6578896a80e649d2ca4ec4446ea3e44.zip |
eliminate the TargetLowering::UsesGlobalOffsetTable bool, which is
subsumed by TargetLowering::getJumpTableEncoding(). Change uses of
it to be more specific.
llvm-svn: 94529
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp index 5a0bdb47d1b..f923927c43e 100644 --- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp @@ -510,7 +510,6 @@ TargetLowering::TargetLowering(TargetMachine &tm,TargetLoweringObjectFile *tlof) setOperationAction(ISD::TRAP, MVT::Other, Expand); IsLittleEndian = TD->isLittleEndian(); - UsesGlobalOffsetTable = false; ShiftAmountTy = PointerTy = MVT::getIntegerVT(8*TD->getPointerSize()); memset(RegClassForVT, 0,MVT::LAST_VALUETYPE*sizeof(TargetRegisterClass*)); memset(TargetDAGCombineArray, 0, array_lengthof(TargetDAGCombineArray)); @@ -814,8 +813,8 @@ unsigned TargetLowering::getJumpTableEncoding() const { SDValue TargetLowering::getPICJumpTableRelocBase(SDValue Table, SelectionDAG &DAG) const { - // FIXME: Eliminate usesGlobalOffsetTable() in favor of JTEntryKind. - if (usesGlobalOffsetTable()) + // If our PIC model is GP relative, use the global offset table as the base. + if (getJumpTableEncoding() == MachineJumpTableInfo::EK_GPRel32BlockAddress) return DAG.getGLOBAL_OFFSET_TABLE(getPointerTy()); return Table; } |