|
LLVM
4.0.0
|
#include "PPCFrameLowering.h"#include "PPCInstrBuilder.h"#include "PPCInstrInfo.h"#include "PPCMachineFunctionInfo.h"#include "PPCSubtarget.h"#include "PPCTargetMachine.h"#include "llvm/CodeGen/MachineFrameInfo.h"#include "llvm/CodeGen/MachineFunction.h"#include "llvm/CodeGen/MachineInstrBuilder.h"#include "llvm/CodeGen/MachineModuleInfo.h"#include "llvm/CodeGen/MachineRegisterInfo.h"#include "llvm/CodeGen/RegisterScavenging.h"#include "llvm/IR/Function.h"#include "llvm/Target/TargetOptions.h"Go to the source code of this file.
Functions | |
| static unsigned | computeReturnSaveOffset (const PPCSubtarget &STI) |
| static unsigned | computeTOCSaveOffset (const PPCSubtarget &STI) |
| static unsigned | computeFramePointerSaveOffset (const PPCSubtarget &STI) |
| static unsigned | computeLinkageSize (const PPCSubtarget &STI) |
| static unsigned | computeBasePointerSaveOffset (const PPCSubtarget &STI) |
| static void | RemoveVRSaveCode (MachineInstr &MI) |
| RemoveVRSaveCode - We have found that this function does not need any code to manipulate the VRSAVE register, even though it uses vector registers. More... | |
| static void | HandleVRSaveUpdate (MachineInstr &MI, const TargetInstrInfo &TII) |
| static bool | spillsCR (const MachineFunction &MF) |
| static bool | spillsVRSAVE (const MachineFunction &MF) |
| static bool | hasSpills (const MachineFunction &MF) |
| static bool | hasNonRISpills (const MachineFunction &MF) |
| static bool | MustSaveLR (const MachineFunction &MF, unsigned LR) |
| MustSaveLR - Return true if this function requires that we save the LR register onto the stack in the prolog and restore it in the epilog of the function. More... | |
| static void | restoreCRs (bool isPPC64, bool is31, bool CR2Spilled, bool CR3Spilled, bool CR4Spilled, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, const std::vector< CalleeSavedInfo > &CSI, unsigned CSIIndex) |
Variables | |
| static const MCPhysReg | VRRegNo [] |
| VRRegNo - Map from a numbered VR register to its enum value. More... | |
|
static |
Definition at line 72 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::getTargetMachine(), llvm::PPCSubtarget::isDarwinABI(), llvm::TargetMachine::isPositionIndependent(), and llvm::PPCSubtarget::isPPC64().
|
static |
Definition at line 51 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isDarwinABI(), and llvm::PPCSubtarget::isPPC64().
|
static |
Definition at line 64 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isDarwinABI(), llvm::PPCSubtarget::isELFv2ABI(), and llvm::PPCSubtarget::isPPC64().
|
static |
Definition at line 40 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isDarwinABI(), and llvm::PPCSubtarget::isPPC64().
|
static |
Definition at line 47 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isELFv2ABI().
|
static |
Definition at line 302 of file PPCFrameLowering.cpp.
References llvm::MachineInstrBuilder::addImm(), llvm::MachineBasicBlock::back(), llvm::MachineFunction::begin(), llvm::BuildMI(), E, llvm::MachineFunction::end(), llvm::MachineInstr::eraseFromParent(), llvm::MCInstrInfo::get(), llvm::MachineInstr::getDebugLoc(), llvm::MCRegisterInfo::getEncodingValue(), llvm::MachineInstr::getNumOperands(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MachineFunction::getSubtarget(), I, i, llvm::MachineRegisterInfo::isPhysRegModified(), llvm::MachineOperand::isReg(), llvm::MachineBasicBlock::isReturnBlock(), llvm::RegState::Kill, llvm::MachineRegisterInfo::livein_begin(), llvm::MachineRegisterInfo::livein_end(), MBB, MI, MRI, RemoveVRSaveCode(), llvm::MipsISD::Ret, and VRRegNo.
Referenced by llvm::PPCFrameLowering::emitPrologue().
|
static |
Definition at line 401 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::hasNonRISpills().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot().
|
static |
Definition at line 396 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::hasSpills().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot().
|
static |
MustSaveLR - Return true if this function requires that we save the LR register onto the stack in the prolog and restore it in the epilog of the function.
Definition at line 409 of file PPCFrameLowering.cpp.
References llvm::MachineRegisterInfo::def_begin(), llvm::MachineRegisterInfo::def_end(), llvm::MachineFunction::getInfo(), llvm::MachineFunction::getRegInfo(), and llvm::PPCFunctionInfo::isLRStoreRequired().
Referenced by llvm::PPCFrameLowering::determineCalleeSaves(), llvm::PPCFrameLowering::determineFrameLayout(), llvm::PPCFrameLowering::emitEpilogue(), and llvm::PPCFrameLowering::emitPrologue().
|
static |
RemoveVRSaveCode - We have found that this function does not need any code to manipulate the VRSAVE register, even though it uses vector registers.
This can happen when the only registers used are known to be live in or out of the function. Remove all of the VRSAVE related code from the function. FIXME: The removal of the code results in a compile failure at -O0 when the function contains a function call, as the GPR containing original VRSAVE contents is spilled and reloaded around the call. Without the prolog code, the spill instruction refers to an undefined register. This code needs to account for all uses of that GPR.
Definition at line 256 of file PPCFrameLowering.cpp.
References assert(), llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), E, llvm::MachineBasicBlock::end(), llvm::MachineFunction::end(), llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getParent(), llvm::MachineBasicBlock::getParent(), I, and MI.
Referenced by HandleVRSaveUpdate().
|
static |
Definition at line 2000 of file PPCFrameLowering.cpp.
References llvm::addFrameReference(), llvm::BuildMI(), llvm::getKillRegState(), llvm::MachineBasicBlock::getParent(), llvm::MachineFunction::getSubtarget(), and llvm::MachineBasicBlock::insert().
Referenced by llvm::PPCFrameLowering::restoreCalleeSavedRegisters().
|
static |
Definition at line 386 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::isCRSpilled().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), and llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized().
|
static |
Definition at line 391 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::isVRSAVESpilled().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot().
VRRegNo - Map from a numbered VR register to its enum value.
Definition at line 33 of file PPCFrameLowering.cpp.
Referenced by HandleVRSaveUpdate().
1.8.6