In preparation for replacing the whole subtarget on the target machine,
[oota-llvm.git] / lib / Target / Mips / MipsSubtarget.cpp
index a03b5ca19e61ae41e8613959c9e405819ef9b160..f801dcd9e945b569c53b43294330f1a8e7473405 100644 (file)
@@ -115,9 +115,9 @@ MipsSubtarget::MipsSubtarget(const std::string &TT, const std::string &CPU,
       HasDSPR2(false), AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16),
       HasMSA(false), OverrideMode(NoOverride), TM(_TM), TargetTriple(TT),
       DL(computeDataLayout(initializeSubtargetDependencies(CPU, FS, TM))),
-      TSInfo(DL), JITInfo(), InstrInfo(MipsInstrInfo::create(*TM)),
+      TSInfo(DL), JITInfo(), InstrInfo(MipsInstrInfo::create(*this)),
       FrameLowering(MipsFrameLowering::create(*TM, *this)),
-      TLInfo(MipsTargetLowering::create(*TM)) {
+      TLInfo(MipsTargetLowering::create(*TM, *this)) {
 
   PreviousInMips16Mode = InMips16Mode;
 
@@ -254,9 +254,9 @@ void MipsSubtarget::setHelperClassesMips16() {
   FrameLoweringSE.swap(FrameLowering);
   TLInfoSE.swap(TLInfo);
   if (!InstrInfo16) {
-    InstrInfo.reset(MipsInstrInfo::create(*TM));
+    InstrInfo.reset(MipsInstrInfo::create(*this));
     FrameLowering.reset(MipsFrameLowering::create(*TM, *this));
-    TLInfo.reset(MipsTargetLowering::create(*TM));
+    TLInfo.reset(MipsTargetLowering::create(*TM, *this));
   } else {
     InstrInfo16.swap(InstrInfo);
     FrameLowering16.swap(FrameLowering);
@@ -272,9 +272,9 @@ void MipsSubtarget::setHelperClassesMipsSE() {
   FrameLowering16.swap(FrameLowering);
   TLInfo16.swap(TLInfo);
   if (!InstrInfoSE) {
-    InstrInfo.reset(MipsInstrInfo::create(*TM));
+    InstrInfo.reset(MipsInstrInfo::create(*this));
     FrameLowering.reset(MipsFrameLowering::create(*TM, *this));
-    TLInfo.reset(MipsTargetLowering::create(*TM));
+    TLInfo.reset(MipsTargetLowering::create(*TM, *this));
   } else {
     InstrInfoSE.swap(InstrInfo);
     FrameLoweringSE.swap(FrameLowering);