mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-05 01:31:05 +00: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). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@214560 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
cf8b959e8d
commit
f9799dbe51
@ -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…
x
Reference in New Issue
Block a user