Add a non-const subtarget returning function to the target machine

so that we can use it to get the old-style JIT out of the subtarget.

This code should be removed when the old-style JIT is removed
(imminently).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Christopher
2014-08-01 21:18:01 +00:00
parent cf8b959e8d
commit f9799dbe51
6 changed files with 17 additions and 5 deletions

View File

@@ -50,13 +50,18 @@ public:
return Subtarget;
return &DefaultSubtarget;
}
MipsSubtarget *getSubtargetImpl() override {
if (Subtarget)
return Subtarget;
return &DefaultSubtarget;
}
const InstrItineraryData *getInstrItineraryData() const override {
return Subtarget->inMips16Mode()
? nullptr
: &getSubtargetImpl()->getInstrItineraryData();
}
MipsJITInfo *getJITInfo() override {
return Subtarget->getJITInfo();
return getSubtargetImpl()->getJITInfo();
}
const MipsRegisterInfo *getRegisterInfo() const override {
return getSubtargetImpl()->getRegisterInfo();