LLVM 22.0.0git
|
#include "PPCFrameLowering.h"
#include "MCTargetDesc/PPCPredicates.h"
#include "PPCInstrBuilder.h"
#include "PPCInstrInfo.h"
#include "PPCMachineFunctionInfo.h"
#include "PPCSubtarget.h"
#include "PPCTargetMachine.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/CodeGen/LivePhysRegs.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.
Macros | |
#define | DEBUG_TYPE "framelowering" |
#define | CALLEE_SAVED_FPRS |
#define | CALLEE_SAVED_GPRS32 |
#define | CALLEE_SAVED_GPRS64 |
#define | CALLEE_SAVED_VRS |
Functions | |
STATISTIC (NumPESpillVSR, "Number of spills to vector in prologue") | |
STATISTIC (NumPEReloadVSR, "Number of reloads from vector in epilogue") | |
STATISTIC (NumPrologProbed, "Number of prologues probed") | |
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 unsigned | computeCRSaveOffset (const PPCSubtarget &STI) |
static bool | spillsCR (const MachineFunction &MF) |
static bool | hasSpills (const MachineFunction &MF) |
static bool | hasNonRISpills (const MachineFunction &MF) |
static bool | MustSaveLR (const MachineFunction &MF, MCRegister 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. | |
static void | restoreCRs (bool is31, bool CR2Spilled, bool CR3Spilled, bool CR4Spilled, MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, ArrayRef< CalleeSavedInfo > CSI, unsigned CSIIndex) |
static bool | isCalleeSavedCR (unsigned Reg) |
Variables | |
static cl::opt< bool > | EnablePEVectorSpills ("ppc-enable-pe-vector-spills", cl::desc("Enable spills in prologue to vector registers."), cl::init(false), cl::Hidden) |
#define CALLEE_SAVED_FPRS |
Referenced by llvm::PPCFrameLowering::getCalleeSavedSpillSlots().
#define CALLEE_SAVED_GPRS32 |
Referenced by llvm::PPCFrameLowering::getCalleeSavedSpillSlots().
#define CALLEE_SAVED_GPRS64 |
Referenced by llvm::PPCFrameLowering::getCalleeSavedSpillSlots().
#define CALLEE_SAVED_VRS |
Referenced by llvm::PPCFrameLowering::getCalleeSavedSpillSlots().
#define DEBUG_TYPE "framelowering" |
Definition at line 33 of file PPCFrameLowering.cpp.
|
static |
Definition at line 69 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::getTargetMachine(), llvm::PPCSubtarget::is32BitELFABI(), and llvm::TargetMachine::isPositionIndependent().
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 78 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isAIXABI().
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 56 of file PPCFrameLowering.cpp.
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 61 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isAIXABI(), and llvm::PPCSubtarget::isELFv2ABI().
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 43 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isAIXABI().
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 50 of file PPCFrameLowering.cpp.
References llvm::PPCSubtarget::isAIXABI(), and llvm::PPCSubtarget::isELFv2ABI().
Referenced by llvm::PPCFrameLowering::PPCFrameLowering().
|
static |
Definition at line 262 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::hasNonRISpills().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot().
|
static |
Definition at line 257 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::hasSpills().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot().
Definition at line 2602 of file PPCFrameLowering.cpp.
References Reg.
Referenced by llvm::PPCFrameLowering::restoreCalleeSavedRegisters().
|
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 270 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 |
Definition at line 2534 of file PPCFrameLowering.cpp.
References llvm::addFrameReference(), llvm::MachineInstrBuilder::addReg(), llvm::BuildMI(), DL, llvm::getKillRegState(), llvm::MachineFunction::getSubtarget(), MBB, MI, and TII.
Referenced by llvm::PPCFrameLowering::restoreCalleeSavedRegisters().
|
static |
Definition at line 252 of file PPCFrameLowering.cpp.
References llvm::MachineFunction::getInfo(), and llvm::PPCFunctionInfo::isCRSpilled().
Referenced by llvm::PPCFrameLowering::addScavengingSpillSlot(), and llvm::PPCFrameLowering::processFunctionBeforeFrameFinalized().
STATISTIC | ( | NumPEReloadVSR | , |
"Number of reloads from vector in epilogue" | ) |
STATISTIC | ( | NumPESpillVSR | , |
"Number of spills to vector in prologue" | ) |
STATISTIC | ( | NumPrologProbed | , |
"Number of prologues probed" | ) |
|
static |
Referenced by llvm::PPCFrameLowering::assignCalleeSavedSpillSlots().