[llvm] r212151 - Move MipsJITInfo to the subtarget rather than the target machine.
Eric Christopher
echristo at gmail.com
Tue Jul 1 17:54:12 PDT 2014
Author: echristo
Date: Tue Jul 1 19:54:12 2014
New Revision: 212151
URL: http://llvm.org/viewvc/llvm-project?rev=212151&view=rev
Log:
Move MipsJITInfo to the subtarget rather than the target machine.
Modified:
llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
llvm/trunk/lib/Target/Mips/MipsSubtarget.h
llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
llvm/trunk/lib/Target/Mips/MipsTargetMachine.h
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp?rev=212151&r1=212150&r2=212151&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.cpp Tue Jul 1 19:54:12 2014
@@ -85,7 +85,7 @@ MipsSubtarget::MipsSubtarget(const std::
InMips16Mode(false), InMips16HardFloat(Mips16HardFloat),
InMicroMipsMode(false), HasDSP(false), HasDSPR2(false),
AllowMixed16_32(Mixed16_32 | Mips_Os16), Os16(Mips_Os16), HasMSA(false),
- RM(_RM), OverrideMode(NoOverride), TM(_TM), TargetTriple(TT) {
+ RM(_RM), OverrideMode(NoOverride), TM(_TM), TargetTriple(TT), JITInfo() {
std::string CPUName = CPU;
CPUName = selectMipsCPU(TT, CPUName);
Modified: llvm/trunk/lib/Target/Mips/MipsSubtarget.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsSubtarget.h?rev=212151&r1=212150&r2=212151&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsSubtarget.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsSubtarget.h Tue Jul 1 19:54:12 2014
@@ -14,6 +14,7 @@
#ifndef MIPSSUBTARGET_H
#define MIPSSUBTARGET_H
+#include "MipsJITInfo.h"
#include "llvm/MC/MCInstrItineraries.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetSubtargetInfo.h"
@@ -132,6 +133,8 @@ protected:
MipsTargetMachine *TM;
Triple TargetTriple;
+
+ MipsJITInfo JITInfo;
public:
bool enablePostRAScheduler(CodeGenOpt::Level OptLevel,
AntiDepBreakMode& Mode,
@@ -248,6 +251,8 @@ public:
/// specify which component of the system provides it. Hardware, software, and
/// hybrid implementations are all valid.
bool systemSupportsUnalignedAccess() const { return hasMips32r6(); }
+
+ MipsJITInfo *getJITInfo() { return &JITInfo; }
};
} // End llvm namespace
Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp?rev=212151&r1=212150&r2=212151&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.cpp Tue Jul 1 19:54:12 2014
@@ -89,7 +89,7 @@ MipsTargetMachine::MipsTargetMachine(con
Subtarget(TT, CPU, FS, isLittle, RM, this),
DL(computeDataLayout(Subtarget)), InstrInfo(MipsInstrInfo::create(*this)),
FrameLowering(MipsFrameLowering::create(*this, Subtarget)),
- TLInfo(MipsTargetLowering::create(*this)), TSInfo(DL), JITInfo() {
+ TLInfo(MipsTargetLowering::create(*this)), TSInfo(DL) {
initAsmInfo();
}
Modified: llvm/trunk/lib/Target/Mips/MipsTargetMachine.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Mips/MipsTargetMachine.h?rev=212151&r1=212150&r2=212151&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Mips/MipsTargetMachine.h (original)
+++ llvm/trunk/lib/Target/Mips/MipsTargetMachine.h Tue Jul 1 19:54:12 2014
@@ -17,7 +17,6 @@
#include "MipsFrameLowering.h"
#include "MipsISelLowering.h"
#include "MipsInstrInfo.h"
-#include "MipsJITInfo.h"
#include "MipsSelectionDAGInfo.h"
#include "MipsSubtarget.h"
#include "llvm/CodeGen/Passes.h"
@@ -43,7 +42,6 @@ class MipsTargetMachine : public LLVMTar
std::unique_ptr<const MipsFrameLowering> FrameLoweringSE;
std::unique_ptr<const MipsTargetLowering> TLInfoSE;
MipsSelectionDAGInfo TSInfo;
- MipsJITInfo JITInfo;
public:
MipsTargetMachine(const Target &T, StringRef TT,
@@ -71,7 +69,9 @@ public:
: &getSubtargetImpl()->getInstrItineraryData();
}
- MipsJITInfo *getJITInfo() override { return &JITInfo; }
+ MipsJITInfo *getJITInfo() override {
+ return Subtarget.getJITInfo();
+ }
const MipsRegisterInfo *getRegisterInfo() const override {
return &InstrInfo->getRegisterInfo();
More information about the llvm-commits
mailing list