mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-02 00:36:36 +00:00
So that we can include frame lowering in the subtarget, remove include
circular dependency with the subtarget by inlining accessor methods and outlining a routine. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@212236 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1faddea960
commit
ba0f074283
@ -16,6 +16,7 @@
|
||||
#include "Mips16InstrInfo.h"
|
||||
#include "MipsInstrInfo.h"
|
||||
#include "MipsRegisterInfo.h"
|
||||
#include "MipsSubtarget.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
@ -28,6 +29,9 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
Mips16FrameLowering::Mips16FrameLowering(const MipsSubtarget &STI)
|
||||
: MipsFrameLowering(STI, STI.stackAlignment()) {}
|
||||
|
||||
void Mips16FrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
MachineBasicBlock &MBB = MF.front();
|
||||
MachineFrameInfo *MFI = MF.getFrameInfo();
|
||||
|
@ -19,8 +19,7 @@
|
||||
namespace llvm {
|
||||
class Mips16FrameLowering : public MipsFrameLowering {
|
||||
public:
|
||||
explicit Mips16FrameLowering(const MipsSubtarget &STI)
|
||||
: MipsFrameLowering(STI, STI.stackAlignment()) {}
|
||||
explicit Mips16FrameLowering(const MipsSubtarget &STI);
|
||||
|
||||
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
||||
/// the function.
|
||||
|
@ -15,7 +15,6 @@
|
||||
#define MIPS_FRAMEINFO_H
|
||||
|
||||
#include "Mips.h"
|
||||
#include "MipsSubtarget.h"
|
||||
#include "llvm/Target/TargetFrameLowering.h"
|
||||
|
||||
namespace llvm {
|
||||
|
@ -16,6 +16,7 @@
|
||||
#include "MipsAnalyzeImmediate.h"
|
||||
#include "MipsMachineFunction.h"
|
||||
#include "MipsSEInstrInfo.h"
|
||||
#include "MipsSubtarget.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
@ -257,6 +258,9 @@ bool ExpandPseudo::expandCopyACC(MachineBasicBlock &MBB, Iter I,
|
||||
return true;
|
||||
}
|
||||
|
||||
MipsSEFrameLowering::MipsSEFrameLowering(const MipsSubtarget &STI)
|
||||
: MipsFrameLowering(STI, STI.stackAlignment()) {}
|
||||
|
||||
unsigned MipsSEFrameLowering::ehDataReg(unsigned I) const {
|
||||
static const unsigned EhDataReg[] = {
|
||||
Mips::A0, Mips::A1, Mips::A2, Mips::A3
|
||||
|
@ -20,8 +20,7 @@ namespace llvm {
|
||||
|
||||
class MipsSEFrameLowering : public MipsFrameLowering {
|
||||
public:
|
||||
explicit MipsSEFrameLowering(const MipsSubtarget &STI)
|
||||
: MipsFrameLowering(STI, STI.stackAlignment()) {}
|
||||
explicit MipsSEFrameLowering(const MipsSubtarget &STI);
|
||||
|
||||
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
||||
/// the function.
|
||||
|
Loading…
Reference in New Issue
Block a user