Move getInitialFrameState() to TargetFrameInfo

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@119754 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Anton Korobeynikov
2010-11-18 23:25:52 +00:00
parent 75b7b879c0
commit d9e3385ced
25 changed files with 84 additions and 84 deletions

View File

@@ -248,3 +248,10 @@ void SPUFrameInfo::emitEpilogue(MachineFunction &MF,
}
}
}
void SPUFrameInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const {
// Initial state of the frame pointer is R1.
MachineLocation Dst(MachineLocation::VirtualFP);
MachineLocation Src(SPU::R1, 0);
Moves.push_back(MachineMove(0, Dst, Src));
}

View File

@@ -40,6 +40,9 @@ namespace llvm {
//! Prediate: Target has dedicated frame pointer
bool hasFP(const MachineFunction &MF) const;
//! Perform target-specific stack frame setup.
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
//! Return a function's saved spill slots
/*!
For CellSPU, a function's saved spill slots is just the link register.

View File

@@ -340,16 +340,6 @@ SPURegisterInfo::getFrameRegister(const MachineFunction &MF) const
return SPU::R1;
}
void
SPURegisterInfo::getInitialFrameState(std::vector<MachineMove> &Moves) const
{
// Initial state of the frame pointer is R1.
MachineLocation Dst(MachineLocation::VirtualFP);
MachineLocation Src(SPU::R1, 0);
Moves.push_back(MachineMove(0, Dst, Src));
}
int
SPURegisterInfo::getDwarfRegNum(unsigned RegNum, bool isEH) const {
// FIXME: Most probably dwarf numbers differs for Linux and Darwin

View File

@@ -71,8 +71,6 @@ namespace llvm {
unsigned getRARegister() const;
//! Get the stack frame register (SP, aka R1)
unsigned getFrameRegister(const MachineFunction &MF) const;
//! Perform target-specific stack frame setup.
void getInitialFrameState(std::vector<MachineMove> &Moves) const;
//------------------------------------------------------------------------
// New methods added: