From 478fc8442bb11b9a2d6c26c02a665d73fbbdedc4 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 10 Jul 2009 21:00:45 +0000 Subject: [PATCH] remove the now-dead TM argument to these methods. llvm-svn: 75276 --- lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp | 2 +- lib/Target/X86/X86FastISel.cpp | 4 ++-- lib/Target/X86/X86ISelLowering.cpp | 6 +++--- lib/Target/X86/X86Subtarget.cpp | 4 ++-- lib/Target/X86/X86Subtarget.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp index 33aef4005dc..a43776353c3 100644 --- a/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp +++ b/lib/Target/X86/AsmPrinter/X86ATTAsmPrinter.cpp @@ -603,7 +603,7 @@ void X86ATTAsmPrinter::printPICJumpTableEntry(const MachineJumpTableInfo *MJTI, O << JTEntryDirective << ' '; - if (Subtarget->isPICStyleRIPRel() || Subtarget->isPICStyleStubPIC(TM)) { + if (Subtarget->isPICStyleRIPRel() || Subtarget->isPICStyleStubPIC()) { O << TAI->getPrivateGlobalPrefix() << getFunctionNumber() << '_' << uid << "_set_" << MBB->getNumber(); } else if (Subtarget->isPICStyleGOT()) { diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 2864cd06286..5c2c1ba263c 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/lib/Target/X86/X86FastISel.cpp @@ -578,7 +578,7 @@ bool X86FastISel::X86SelectCallAddress(Value *V, X86AddressMode &AM) { // base and index registers are unused. assert(AM.Base.Reg == 0 && AM.IndexReg == 0); AM.Base.Reg = X86::RIP; - } else if (Subtarget->isPICStyleStubPIC(TM)) { + } else if (Subtarget->isPICStyleStubPIC()) { AM.GVOpFlags = X86II::MO_PIC_BASE_OFFSET; } else if (Subtarget->isPICStyleGOT()) { AM.GVOpFlags = X86II::MO_GOTOFF; @@ -1620,7 +1620,7 @@ unsigned X86FastISel::TargetMaterializeConstant(Constant *C) { // x86-32 PIC requires a PIC base register for constant pools. unsigned PICBase = 0; unsigned char OpFlag = 0; - if (Subtarget->isPICStyleStubPIC(TM)) { // Not dynamic-no-pic + if (Subtarget->isPICStyleStubPIC()) { // Not dynamic-no-pic OpFlag = X86II::MO_PIC_BASE_OFFSET; PICBase = getInstrInfo()->getGlobalBaseReg(&MF); } else if (Subtarget->isPICStyleGOT()) { diff --git a/lib/Target/X86/X86ISelLowering.cpp b/lib/Target/X86/X86ISelLowering.cpp index af4d405bce3..2c6a727f08f 100644 --- a/lib/Target/X86/X86ISelLowering.cpp +++ b/lib/Target/X86/X86ISelLowering.cpp @@ -4458,7 +4458,7 @@ X86TargetLowering::LowerConstantPool(SDValue Op, SelectionDAG &DAG) { WrapperKind = X86ISD::WrapperRIP; else if (Subtarget->isPICStyleGOT()) OpFlag = X86II::MO_GOTOFF; - else if (Subtarget->isPICStyleStubPIC(getTargetMachine())) + else if (Subtarget->isPICStyleStubPIC()) OpFlag = X86II::MO_PIC_BASE_OFFSET; SDValue Result = DAG.getTargetConstantPool(CP->getConstVal(), getPointerTy(), @@ -4490,7 +4490,7 @@ SDValue X86TargetLowering::LowerJumpTable(SDValue Op, SelectionDAG &DAG) { WrapperKind = X86ISD::WrapperRIP; else if (Subtarget->isPICStyleGOT()) OpFlag = X86II::MO_GOTOFF; - else if (Subtarget->isPICStyleStubPIC(getTargetMachine())) + else if (Subtarget->isPICStyleStubPIC()) OpFlag = X86II::MO_PIC_BASE_OFFSET; SDValue Result = DAG.getTargetJumpTable(JT->getIndex(), getPointerTy(), @@ -4522,7 +4522,7 @@ X86TargetLowering::LowerExternalSymbol(SDValue Op, SelectionDAG &DAG) { WrapperKind = X86ISD::WrapperRIP; else if (Subtarget->isPICStyleGOT()) OpFlag = X86II::MO_GOTOFF; - else if (Subtarget->isPICStyleStubPIC(getTargetMachine())) + else if (Subtarget->isPICStyleStubPIC()) OpFlag = X86II::MO_PIC_BASE_OFFSET; SDValue Result = DAG.getTargetExternalSymbol(Sym, getPointerTy(), OpFlag); diff --git a/lib/Target/X86/X86Subtarget.cpp b/lib/Target/X86/X86Subtarget.cpp index 8259629b818..2812fdbc72e 100644 --- a/lib/Target/X86/X86Subtarget.cpp +++ b/lib/Target/X86/X86Subtarget.cpp @@ -75,7 +75,7 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const { return X86II::MO_GOT; } - if (isPICStyleStubPIC(TM)) { // Darwin/32 in PIC mode. + if (isPICStyleStubPIC()) { // Darwin/32 in PIC mode. // Determine whether we have a stub reference and/or whether the reference // is relative to the PIC base or not. @@ -100,7 +100,7 @@ ClassifyGlobalReference(const GlobalValue *GV, const TargetMachine &TM) const { return X86II::MO_PIC_BASE_OFFSET; } - if (isPICStyleStubNoDynamic(TM)) { // Darwin/32 in -mdynamic-no-pic mode. + if (isPICStyleStubNoDynamic()) { // Darwin/32 in -mdynamic-no-pic mode. // Determine whether we have a stub reference. // If this is a strong reference to a definition, it is definitely not diff --git a/lib/Target/X86/X86Subtarget.h b/lib/Target/X86/X86Subtarget.h index 9bba9401b58..6397a56ab0c 100644 --- a/lib/Target/X86/X86Subtarget.h +++ b/lib/Target/X86/X86Subtarget.h @@ -187,11 +187,11 @@ public: bool isPICStyleGOT() const { return PICStyle == PICStyles::GOT; } bool isPICStyleRIPRel() const { return PICStyle == PICStyles::RIPRel; } - bool isPICStyleStubPIC(const TargetMachine &TM) const { + bool isPICStyleStubPIC() const { return PICStyle == PICStyles::StubPIC; } - bool isPICStyleStubNoDynamic(const TargetMachine &TM) const { + bool isPICStyleStubNoDynamic() const { return PICStyle == PICStyles::StubDynamicNoPIC; } bool isPICStyleStubAny() const {