mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-28 23:38:59 +00:00
Rename function. It's determining which callee-save registers to save.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30616 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
16113431e8
commit
692d4e0823
@ -43,11 +43,11 @@ namespace {
|
|||||||
Fn.getFrameInfo()->setMachineDebugInfo(DI);
|
Fn.getFrameInfo()->setMachineDebugInfo(DI);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Scan the function for modified caller saved registers and insert spill
|
// Scan the function for modified callee saved registers and insert spill
|
||||||
// code for any caller saved registers that are modified. Also calculate
|
// code for any callee saved registers that are modified. Also calculate
|
||||||
// the MaxCallFrameSize and HasCalls variables for the function's frame
|
// the MaxCallFrameSize and HasCalls variables for the function's frame
|
||||||
// information and eliminates call frame pseudo instructions.
|
// information and eliminates call frame pseudo instructions.
|
||||||
calculateCallerSavedRegisters(Fn);
|
calculateCalleeSavedRegisters(Fn);
|
||||||
|
|
||||||
// Add the code to save and restore the caller saved registers
|
// Add the code to save and restore the caller saved registers
|
||||||
saveCallerSavedRegisters(Fn);
|
saveCallerSavedRegisters(Fn);
|
||||||
@ -61,7 +61,7 @@ namespace {
|
|||||||
|
|
||||||
// Add prolog and epilog code to the function. This function is required
|
// Add prolog and epilog code to the function. This function is required
|
||||||
// to align the stack frame as necessary for any stack variables or
|
// to align the stack frame as necessary for any stack variables or
|
||||||
// called functions. Because of this, calculateCallerSavedRegisters
|
// called functions. Because of this, calculateCalleeSavedRegisters
|
||||||
// must be called before this function in order to set the HasCalls
|
// must be called before this function in order to set the HasCalls
|
||||||
// and MaxCallFrameSize variables.
|
// and MaxCallFrameSize variables.
|
||||||
insertPrologEpilogCode(Fn);
|
insertPrologEpilogCode(Fn);
|
||||||
@ -75,7 +75,7 @@ namespace {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void calculateCallerSavedRegisters(MachineFunction &Fn);
|
void calculateCalleeSavedRegisters(MachineFunction &Fn);
|
||||||
void saveCallerSavedRegisters(MachineFunction &Fn);
|
void saveCallerSavedRegisters(MachineFunction &Fn);
|
||||||
void calculateFrameObjectOffsets(MachineFunction &Fn);
|
void calculateFrameObjectOffsets(MachineFunction &Fn);
|
||||||
void replaceFrameIndices(MachineFunction &Fn);
|
void replaceFrameIndices(MachineFunction &Fn);
|
||||||
@ -90,12 +90,12 @@ namespace {
|
|||||||
FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI(); }
|
FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI(); }
|
||||||
|
|
||||||
|
|
||||||
/// calculateCallerSavedRegisters - Scan the function for modified caller saved
|
/// calculateCalleeSavedRegisters - Scan the function for modified caller saved
|
||||||
/// registers. Also calculate the MaxCallFrameSize and HasCalls variables for
|
/// registers. Also calculate the MaxCallFrameSize and HasCalls variables for
|
||||||
/// the function's frame information and eliminates call frame pseudo
|
/// the function's frame information and eliminates call frame pseudo
|
||||||
/// instructions.
|
/// instructions.
|
||||||
///
|
///
|
||||||
void PEI::calculateCallerSavedRegisters(MachineFunction &Fn) {
|
void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
|
||||||
const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
|
const MRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
|
||||||
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user