[llvm] r213429 - FrameLowering depends only upon the Subtarget, so only take a subtarget
Eric Christopher
echristo at gmail.com
Fri Jul 18 16:33:47 PDT 2014
Author: echristo
Date: Fri Jul 18 18:33:47 2014
New Revision: 213429
URL: http://llvm.org/viewvc/llvm-project?rev=213429&view=rev
Log:
FrameLowering depends only upon the Subtarget, so only take a subtarget
during initialization.
Modified:
llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
llvm/trunk/lib/Target/Mips/MipsFrameLowering.h
llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
Modified: llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp?rev=213429&r1=213428&r2=213429&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsFrameLowering.cpp Fri Jul 18 18:33:47 2014
@@ -82,9 +82,8 @@ using namespace llvm;
//
//===----------------------------------------------------------------------===//
-const MipsFrameLowering *MipsFrameLowering::create(MipsTargetMachine &TM,
- const MipsSubtarget &ST) {
- if (TM.getSubtargetImpl()->inMips16Mode())
+const MipsFrameLowering *MipsFrameLowering::create(const MipsSubtarget &ST) {
+ if (ST.inMips16Mode())
return llvm::createMips16FrameLowering(ST);
return llvm::createMipsSEFrameLowering(ST);
Modified: llvm/trunk/lib/Target/Mips/MipsFrameLowering.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsFrameLowering.h?rev=213429&r1=213428&r2=213429&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsFrameLowering.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsFrameLowering.h Fri Jul 18 18:33:47 2014
@@ -28,8 +28,7 @@ public:
explicit MipsFrameLowering(const MipsSubtarget &sti, unsigned Alignment)
: TargetFrameLowering(StackGrowsDown, Alignment, 0, Alignment), STI(sti) {}
- static const MipsFrameLowering *create(MipsTargetMachine &TM,
- const MipsSubtarget &ST);
+ static const MipsFrameLowering *create(const MipsSubtarget &ST);
bool hasFP(const MachineFunction &MF) const override;
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp?rev=213429&r1=213428&r2=213429&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp Fri Jul 18 18:33:47 2014
@@ -116,7 +116,7 @@ MipsSubtarget::MipsSubtarget(const std::
HasMSA(false), OverrideMode(NoOverride), TM(_TM), TargetTriple(TT),
DL(computeDataLayout(initializeSubtargetDependencies(CPU, FS, TM))),
TSInfo(DL), JITInfo(), InstrInfo(MipsInstrInfo::create(*this)),
- FrameLowering(MipsFrameLowering::create(*TM, *this)),
+ FrameLowering(MipsFrameLowering::create(*this)),
TLInfo(MipsTargetLowering::create(*TM, *this)) {
PreviousInMips16Mode = InMips16Mode;
@@ -255,7 +255,7 @@ void MipsSubtarget::setHelperClassesMips
TLInfoSE.swap(TLInfo);
if (!InstrInfo16) {
InstrInfo.reset(MipsInstrInfo::create(*this));
- FrameLowering.reset(MipsFrameLowering::create(*TM, *this));
+ FrameLowering.reset(MipsFrameLowering::create(*this));
TLInfo.reset(MipsTargetLowering::create(*TM, *this));
} else {
InstrInfo16.swap(InstrInfo);
@@ -273,7 +273,7 @@ void MipsSubtarget::setHelperClassesMips
TLInfo16.swap(TLInfo);
if (!InstrInfoSE) {
InstrInfo.reset(MipsInstrInfo::create(*this));
- FrameLowering.reset(MipsFrameLowering::create(*TM, *this));
+ FrameLowering.reset(MipsFrameLowering::create(*this));
TLInfo.reset(MipsTargetLowering::create(*TM, *this));
} else {
InstrInfoSE.swap(InstrInfo);
More information about the llvm-commits
mailing list