diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-03 22:45:18 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2011-06-03 22:45:18 +0000 |
commit | 7b5fdc7fbd925084a3d18ff078a280b319612ce2 (patch) | |
tree | 756c0de29bd6d28724f6299c2f7564ffc8df00e0 /lib/Target/Blackfin | |
parent | ec281c8934a8400ad0da100cd4afd8abcb913d09 (diff) | |
download | external_llvm-7b5fdc7fbd925084a3d18ff078a280b319612ce2.zip external_llvm-7b5fdc7fbd925084a3d18ff078a280b319612ce2.tar.gz external_llvm-7b5fdc7fbd925084a3d18ff078a280b319612ce2.tar.bz2 |
Blackfin always uses a reserved call frame.
Materializing the stack pointer update before a call requires a scratch
register that may not be available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132601 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Blackfin')
-rw-r--r-- | lib/Target/Blackfin/BlackfinFrameLowering.cpp | 6 | ||||
-rw-r--r-- | lib/Target/Blackfin/BlackfinFrameLowering.h | 1 | ||||
-rw-r--r-- | lib/Target/Blackfin/BlackfinRegisterInfo.h | 2 |
3 files changed, 7 insertions, 2 deletions
diff --git a/lib/Target/Blackfin/BlackfinFrameLowering.cpp b/lib/Target/Blackfin/BlackfinFrameLowering.cpp index 08bb952..0b0984d 100644 --- a/lib/Target/Blackfin/BlackfinFrameLowering.cpp +++ b/lib/Target/Blackfin/BlackfinFrameLowering.cpp @@ -31,6 +31,12 @@ bool BlackfinFrameLowering::hasFP(const MachineFunction &MF) const { MFI->adjustsStack() || MFI->hasVarSizedObjects(); } +// Always reserve a call frame. We dont have enough registers to adjust SP. +bool BlackfinFrameLowering:: +hasReservedCallFrame(const MachineFunction &MF) const { + return true; +} + // Emit a prologue that sets up a stack frame. // On function entry, R0-R2 and P0 may hold arguments. // R3, P1, and P2 may be used as scratch registers diff --git a/lib/Target/Blackfin/BlackfinFrameLowering.h b/lib/Target/Blackfin/BlackfinFrameLowering.h index 3d2ee25..726fa2c 100644 --- a/lib/Target/Blackfin/BlackfinFrameLowering.h +++ b/lib/Target/Blackfin/BlackfinFrameLowering.h @@ -36,6 +36,7 @@ public: void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; bool hasFP(const MachineFunction &MF) const; + bool hasReservedCallFrame(const MachineFunction &MF) const; void processFunctionBeforeCalleeSavedScan(MachineFunction &MF, RegScavenger *RS) const; diff --git a/lib/Target/Blackfin/BlackfinRegisterInfo.h b/lib/Target/Blackfin/BlackfinRegisterInfo.h index dc4a699..375d277 100644 --- a/lib/Target/Blackfin/BlackfinRegisterInfo.h +++ b/lib/Target/Blackfin/BlackfinRegisterInfo.h @@ -41,8 +41,6 @@ namespace llvm { return &BF::PRegClass; } - // bool hasReservedCallFrame(MachineFunction &MF) const; - bool requiresRegisterScavenging(const MachineFunction &MF) const; void eliminateCallFramePseudoInstr(MachineFunction &MF, |