mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
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). llvm-svn: 214560
This commit is contained in:
parent
9829cda628
commit
dfc6457da2
@ -100,6 +100,7 @@ public:
|
||||
virtual const TargetSubtargetInfo *getSubtargetImpl() const {
|
||||
return nullptr;
|
||||
}
|
||||
virtual TargetSubtargetInfo *getSubtargetImpl() { return nullptr; }
|
||||
|
||||
mutable TargetOptions Options;
|
||||
|
||||
|
@ -33,6 +33,7 @@ public:
|
||||
bool isLittle);
|
||||
|
||||
const ARMSubtarget *getSubtargetImpl() const override { return &Subtarget; }
|
||||
ARMSubtarget *getSubtargetImpl() override { return &Subtarget; }
|
||||
const ARMBaseRegisterInfo *getRegisterInfo() const override {
|
||||
return getSubtargetImpl()->getRegisterInfo();
|
||||
}
|
||||
@ -54,7 +55,7 @@ public:
|
||||
const DataLayout *getDataLayout() const override {
|
||||
return getSubtargetImpl()->getDataLayout();
|
||||
}
|
||||
ARMJITInfo *getJITInfo() override { return Subtarget.getJITInfo(); }
|
||||
ARMJITInfo *getJITInfo() override { return getSubtargetImpl()->getJITInfo(); }
|
||||
|
||||
/// \brief Register ARM analysis passes with a pass manager.
|
||||
void addAnalysisPasses(PassManagerBase &PM) override;
|
||||
|
@ -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();
|
||||
|
@ -38,7 +38,7 @@ public:
|
||||
const PPCFrameLowering *getFrameLowering() const override {
|
||||
return getSubtargetImpl()->getFrameLowering();
|
||||
}
|
||||
PPCJITInfo *getJITInfo() override { return Subtarget.getJITInfo(); }
|
||||
PPCJITInfo *getJITInfo() override { return getSubtargetImpl()->getJITInfo(); }
|
||||
const PPCTargetLowering *getTargetLowering() const override {
|
||||
return getSubtargetImpl()->getTargetLowering();
|
||||
}
|
||||
@ -53,6 +53,7 @@ public:
|
||||
return getSubtargetImpl()->getDataLayout();
|
||||
}
|
||||
const PPCSubtarget *getSubtargetImpl() const override { return &Subtarget; }
|
||||
PPCSubtarget *getSubtargetImpl() override { return &Subtarget; }
|
||||
const InstrItineraryData *getInstrItineraryData() const override {
|
||||
return &getSubtargetImpl()->getInstrItineraryData();
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
return getSubtargetImpl()->getFrameLowering();
|
||||
}
|
||||
const SparcSubtarget *getSubtargetImpl() const override { return &Subtarget; }
|
||||
SparcSubtarget *getSubtargetImpl() override { return &Subtarget; }
|
||||
const SparcRegisterInfo *getRegisterInfo() const override {
|
||||
return getSubtargetImpl()->getRegisterInfo();
|
||||
}
|
||||
@ -44,7 +45,9 @@ public:
|
||||
const SparcSelectionDAGInfo *getSelectionDAGInfo() const override {
|
||||
return getSubtargetImpl()->getSelectionDAGInfo();
|
||||
}
|
||||
SparcJITInfo *getJITInfo() override { return Subtarget.getJITInfo(); }
|
||||
SparcJITInfo *getJITInfo() override {
|
||||
return getSubtargetImpl()->getJITInfo();
|
||||
}
|
||||
const DataLayout *getDataLayout() const override {
|
||||
return getSubtargetImpl()->getDataLayout();
|
||||
}
|
||||
|
@ -41,8 +41,9 @@ public:
|
||||
const TargetFrameLowering *getFrameLowering() const override {
|
||||
return getSubtargetImpl()->getFrameLowering();
|
||||
}
|
||||
X86JITInfo *getJITInfo() override { return Subtarget.getJITInfo(); }
|
||||
X86JITInfo *getJITInfo() override { return getSubtargetImpl()->getJITInfo(); }
|
||||
const X86Subtarget *getSubtargetImpl() const override { return &Subtarget; }
|
||||
X86Subtarget *getSubtargetImpl() override { return &Subtarget; }
|
||||
const X86TargetLowering *getTargetLowering() const override {
|
||||
return getSubtargetImpl()->getTargetLowering();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user