mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-10 06:25:01 +00:00
Remove the storage and use of the subtarget out of the sparc frame
lowering code. llvm-svn: 211809
This commit is contained in:
parent
14259e2914
commit
de87d01330
@ -14,6 +14,7 @@
|
||||
#include "SparcFrameLowering.h"
|
||||
#include "SparcInstrInfo.h"
|
||||
#include "SparcMachineFunctionInfo.h"
|
||||
#include "SparcSubtarget.h"
|
||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
||||
#include "llvm/CodeGen/MachineFunction.h"
|
||||
#include "llvm/CodeGen/MachineInstrBuilder.h"
|
||||
@ -32,6 +33,9 @@ DisableLeafProc("disable-sparc-leaf-proc",
|
||||
cl::desc("Disable Sparc leaf procedure optimization."),
|
||||
cl::Hidden);
|
||||
|
||||
SparcFrameLowering::SparcFrameLowering(const SparcSubtarget &ST)
|
||||
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown,
|
||||
ST.is64Bit() ? 16 : 8, 0, ST.is64Bit() ? 16 : 8) {}
|
||||
|
||||
void SparcFrameLowering::emitSPAdjustment(MachineFunction &MF,
|
||||
MachineBasicBlock &MBB,
|
||||
@ -99,7 +103,9 @@ void SparcFrameLowering::emitPrologue(MachineFunction &MF) const {
|
||||
SAVEri = SP::ADDri;
|
||||
SAVErr = SP::ADDrr;
|
||||
}
|
||||
NumBytes = - SubTarget.getAdjustedFrameSize(NumBytes);
|
||||
NumBytes =
|
||||
-MF.getTarget().getSubtarget<SparcSubtarget>().getAdjustedFrameSize(
|
||||
NumBytes);
|
||||
emitSPAdjustment(MF, MBB, MBBI, NumBytes, SAVErr, SAVEri);
|
||||
|
||||
MachineModuleInfo &MMI = MF.getMMI();
|
||||
@ -162,7 +168,8 @@ void SparcFrameLowering::emitEpilogue(MachineFunction &MF,
|
||||
if (NumBytes == 0)
|
||||
return;
|
||||
|
||||
NumBytes = SubTarget.getAdjustedFrameSize(NumBytes);
|
||||
NumBytes = MF.getTarget().getSubtarget<SparcSubtarget>().getAdjustedFrameSize(
|
||||
NumBytes);
|
||||
emitSPAdjustment(MF, MBB, MBBI, NumBytes, SP::ADDrr, SP::ADDri);
|
||||
}
|
||||
|
||||
|
@ -15,19 +15,14 @@
|
||||
#define SPARC_FRAMEINFO_H
|
||||
|
||||
#include "Sparc.h"
|
||||
#include "SparcSubtarget.h"
|
||||
#include "llvm/Target/TargetFrameLowering.h"
|
||||
|
||||
namespace llvm {
|
||||
class SparcSubtarget;
|
||||
|
||||
class SparcSubtarget;
|
||||
class SparcFrameLowering : public TargetFrameLowering {
|
||||
const SparcSubtarget &SubTarget;
|
||||
public:
|
||||
explicit SparcFrameLowering(const SparcSubtarget &ST)
|
||||
: TargetFrameLowering(TargetFrameLowering::StackGrowsDown,
|
||||
ST.is64Bit() ? 16 : 8, 0, ST.is64Bit() ? 16 : 8),
|
||||
SubTarget(ST) {}
|
||||
explicit SparcFrameLowering(const SparcSubtarget &ST);
|
||||
|
||||
/// emitProlog/emitEpilog - These methods insert prolog and epilog code into
|
||||
/// the function.
|
||||
|
Loading…
x
Reference in New Issue
Block a user