mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
XCore target: Refactor LR handling
We also narrow the liveness of FP & LR during the prologue to reflect the actual usage of the registers. I have been unable to construct a test to prove the previous live range was too large. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@198611 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -27,8 +27,9 @@ class Function;
|
||||
/// XCore target-specific information for each MachineFunction.
|
||||
class XCoreFunctionInfo : public MachineFunctionInfo {
|
||||
virtual void anchor();
|
||||
bool UsesLR;
|
||||
bool LRSpillSlotSet;
|
||||
int LRSpillSlot;
|
||||
bool FPSpillSlotSet;
|
||||
int FPSpillSlot;
|
||||
int VarArgsFrameIndex;
|
||||
mutable int CachedEStackSize;
|
||||
@@ -36,15 +37,17 @@ class XCoreFunctionInfo : public MachineFunctionInfo {
|
||||
|
||||
public:
|
||||
XCoreFunctionInfo() :
|
||||
UsesLR(false),
|
||||
LRSpillSlotSet(false),
|
||||
LRSpillSlot(0),
|
||||
FPSpillSlotSet(false),
|
||||
FPSpillSlot(0),
|
||||
VarArgsFrameIndex(0),
|
||||
CachedEStackSize(-1) {}
|
||||
|
||||
explicit XCoreFunctionInfo(MachineFunction &MF) :
|
||||
UsesLR(false),
|
||||
LRSpillSlotSet(false),
|
||||
LRSpillSlot(0),
|
||||
FPSpillSlotSet(false),
|
||||
FPSpillSlot(0),
|
||||
VarArgsFrameIndex(0),
|
||||
CachedEStackSize(-1) {}
|
||||
@@ -53,16 +56,21 @@ public:
|
||||
|
||||
void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
|
||||
int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
|
||||
|
||||
void setUsesLR(bool val) { UsesLR = val; }
|
||||
bool getUsesLR() const { return UsesLR; }
|
||||
|
||||
void setLRSpillSlot(int off) { LRSpillSlot = off; }
|
||||
int getLRSpillSlot() const { return LRSpillSlot; }
|
||||
|
||||
void setFPSpillSlot(int off) { FPSpillSlot = off; }
|
||||
int getFPSpillSlot() const { return FPSpillSlot; }
|
||||
|
||||
|
||||
int createLRSpillSlot(MachineFunction &MF);
|
||||
bool hasLRSpillSlot() { return LRSpillSlotSet; }
|
||||
int getLRSpillSlot() const {
|
||||
assert(LRSpillSlotSet && "LR Spill slot no set");
|
||||
return LRSpillSlot;
|
||||
}
|
||||
|
||||
int createFPSpillSlot(MachineFunction &MF);
|
||||
bool hasFPSpillSlot() { return FPSpillSlotSet; }
|
||||
int getFPSpillSlot() const {
|
||||
assert(FPSpillSlotSet && "FP Spill slot no set");
|
||||
return FPSpillSlot;
|
||||
}
|
||||
|
||||
bool isLargeFrame(const MachineFunction &MF) const;
|
||||
|
||||
std::vector<std::pair<MCSymbol*, CalleeSavedInfo> > &getSpillLabels() {
|
||||
|
Reference in New Issue
Block a user