mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-30 20:24:32 +00:00
Rename TargetFrameInfo into TargetFrameLowering. Also, put couple of FIXMEs and fixes here and there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -30,7 +30,7 @@
|
||||
#include "llvm/CodeGen/RegisterScavenging.h"
|
||||
#include "llvm/Target/TargetMachine.h"
|
||||
#include "llvm/Target/TargetRegisterInfo.h"
|
||||
#include "llvm/Target/TargetFrameInfo.h"
|
||||
#include "llvm/Target/TargetFrameLowering.h"
|
||||
#include "llvm/Target/TargetInstrInfo.h"
|
||||
#include "llvm/Support/CommandLine.h"
|
||||
#include "llvm/Support/Compiler.h"
|
||||
@ -66,7 +66,7 @@ FunctionPass *llvm::createPrologEpilogCodeInserter() { return new PEI(); }
|
||||
bool PEI::runOnMachineFunction(MachineFunction &Fn) {
|
||||
const Function* F = Fn.getFunction();
|
||||
const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
|
||||
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering *TFI = Fn.getTarget().getFrameLowering();
|
||||
|
||||
RS = TRI->requiresRegisterScavenging(Fn) ? new RegScavenger() : NULL;
|
||||
FrameIndexVirtualScavenging = TRI->requiresFrameIndexScavenging(Fn);
|
||||
@ -145,7 +145,7 @@ void PEI::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
/// pseudo instructions.
|
||||
void PEI::calculateCallsInformation(MachineFunction &Fn) {
|
||||
const TargetRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
|
||||
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering *TFI = Fn.getTarget().getFrameLowering();
|
||||
MachineFrameInfo *MFI = Fn.getFrameInfo();
|
||||
|
||||
unsigned MaxCallFrameSize = 0;
|
||||
@ -199,7 +199,7 @@ void PEI::calculateCallsInformation(MachineFunction &Fn) {
|
||||
/// registers.
|
||||
void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
|
||||
const TargetRegisterInfo *RegInfo = Fn.getTarget().getRegisterInfo();
|
||||
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering *TFI = Fn.getTarget().getFrameLowering();
|
||||
MachineFrameInfo *MFI = Fn.getFrameInfo();
|
||||
|
||||
// Get the callee saved register list...
|
||||
@ -238,7 +238,7 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
|
||||
return; // Early exit if no callee saved registers are modified!
|
||||
|
||||
unsigned NumFixedSpillSlots;
|
||||
const TargetFrameInfo::SpillSlot *FixedSpillSlots =
|
||||
const TargetFrameLowering::SpillSlot *FixedSpillSlots =
|
||||
TFI->getCalleeSavedSpillSlots(NumFixedSpillSlots);
|
||||
|
||||
// Now that we know which registers need to be saved and restored, allocate
|
||||
@ -256,7 +256,7 @@ void PEI::calculateCalleeSavedRegisters(MachineFunction &Fn) {
|
||||
|
||||
// Check to see if this physreg must be spilled to a particular stack slot
|
||||
// on this target.
|
||||
const TargetFrameInfo::SpillSlot *FixedSlot = FixedSpillSlots;
|
||||
const TargetFrameLowering::SpillSlot *FixedSlot = FixedSpillSlots;
|
||||
while (FixedSlot != FixedSpillSlots+NumFixedSpillSlots &&
|
||||
FixedSlot->Reg != Reg)
|
||||
++FixedSlot;
|
||||
@ -299,7 +299,7 @@ void PEI::insertCSRSpillsAndRestores(MachineFunction &Fn) {
|
||||
return;
|
||||
|
||||
const TargetInstrInfo &TII = *Fn.getTarget().getInstrInfo();
|
||||
const TargetFrameInfo *TFI = Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering *TFI = Fn.getTarget().getFrameLowering();
|
||||
const TargetRegisterInfo *TRI = Fn.getTarget().getRegisterInfo();
|
||||
MachineBasicBlock::iterator I;
|
||||
|
||||
@ -490,10 +490,10 @@ AdjustStackOffset(MachineFrameInfo *MFI, int FrameIdx,
|
||||
/// abstract stack objects.
|
||||
///
|
||||
void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
const TargetFrameInfo &TFI = *Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering &TFI = *Fn.getTarget().getFrameLowering();
|
||||
|
||||
bool StackGrowsDown =
|
||||
TFI.getStackGrowthDirection() == TargetFrameInfo::StackGrowsDown;
|
||||
TFI.getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
|
||||
|
||||
// Loop over all of the stack objects, assigning sequential addresses...
|
||||
MachineFrameInfo *MFI = Fn.getFrameInfo();
|
||||
@ -682,7 +682,7 @@ void PEI::calculateFrameObjectOffsets(MachineFunction &Fn) {
|
||||
/// prolog and epilog code to the function.
|
||||
///
|
||||
void PEI::insertPrologEpilogCode(MachineFunction &Fn) {
|
||||
const TargetFrameInfo &TFI = *Fn.getTarget().getFrameInfo();
|
||||
const TargetFrameLowering &TFI = *Fn.getTarget().getFrameLowering();
|
||||
|
||||
// Add prologue to the function...
|
||||
TFI.emitPrologue(Fn);
|
||||
@ -704,9 +704,9 @@ void PEI::replaceFrameIndices(MachineFunction &Fn) {
|
||||
const TargetMachine &TM = Fn.getTarget();
|
||||
assert(TM.getRegisterInfo() && "TM::getRegisterInfo() must be implemented!");
|
||||
const TargetRegisterInfo &TRI = *TM.getRegisterInfo();
|
||||
const TargetFrameInfo *TFI = TM.getFrameInfo();
|
||||
const TargetFrameLowering *TFI = TM.getFrameLowering();
|
||||
bool StackGrowsDown =
|
||||
TFI->getStackGrowthDirection() == TargetFrameInfo::StackGrowsDown;
|
||||
TFI->getStackGrowthDirection() == TargetFrameLowering::StackGrowsDown;
|
||||
int FrameSetupOpcode = TRI.getCallFrameSetupOpcode();
|
||||
int FrameDestroyOpcode = TRI.getCallFrameDestroyOpcode();
|
||||
|
||||
|
Reference in New Issue
Block a user