LLVM  8.0.1
Public Member Functions | Static Public Member Functions | List of all members
llvm::PPCRegisterInfo Class Reference

#include "Target/PowerPC/PPCRegisterInfo.h"

Inheritance diagram for llvm::PPCRegisterInfo:
Inheritance graph
[legend]
Collaboration diagram for llvm::PPCRegisterInfo:
Collaboration graph
[legend]

Public Member Functions

 PPCRegisterInfo (const PPCTargetMachine &TM)
 
const TargetRegisterClassgetPointerRegClass (const MachineFunction &MF, unsigned Kind=0) const override
 getPointerRegClass - Return the register class to use to hold pointers. More...
 
unsigned getRegPressureLimit (const TargetRegisterClass *RC, MachineFunction &MF) const override
 
const TargetRegisterClassgetLargestLegalSuperClass (const TargetRegisterClass *RC, const MachineFunction &MF) const override
 
const MCPhysReggetCalleeSavedRegs (const MachineFunction *MF) const override
 Code Generation virtual methods... More...
 
const MCPhysReggetCalleeSavedRegsViaCopy (const MachineFunction *MF) const
 
const uint32_tgetCallPreservedMask (const MachineFunction &MF, CallingConv::ID CC) const override
 
const uint32_tgetNoPreservedMask () const override
 
void adjustStackMapLiveOutMask (uint32_t *Mask) const override
 
BitVector getReservedRegs (const MachineFunction &MF) const override
 
bool isCallerPreservedPhysReg (unsigned PhysReg, const MachineFunction &MF) const override
 
bool requiresRegisterScavenging (const MachineFunction &MF) const override
 We require the register scavenger. More...
 
bool requiresFrameIndexScavenging (const MachineFunction &MF) const override
 
bool trackLivenessAfterRegAlloc (const MachineFunction &MF) const override
 
bool requiresVirtualBaseRegisters (const MachineFunction &MF) const override
 
void lowerDynamicAlloc (MachineBasicBlock::iterator II) const
 lowerDynamicAlloc - Generate the code for allocating an object in the current frame. More...
 
void lowerDynamicAreaOffset (MachineBasicBlock::iterator II) const
 
void lowerCRSpilling (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 lowerCRSpilling - Generate the code for spilling a CR register. More...
 
void lowerCRRestore (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 
void lowerCRBitSpilling (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 
void lowerCRBitRestore (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 
void lowerVRSAVESpilling (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 
void lowerVRSAVERestore (MachineBasicBlock::iterator II, unsigned FrameIndex) const
 
bool hasReservedSpillSlot (const MachineFunction &MF, unsigned Reg, int &FrameIdx) const override
 
void eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, unsigned FIOperandNum, RegScavenger *RS=nullptr) const override
 
bool needsFrameBaseReg (MachineInstr *MI, int64_t Offset) const override
 Returns true if the instruction's frame index reference would be better served by a base register other than FP or SP. More...
 
void materializeFrameBaseRegister (MachineBasicBlock *MBB, unsigned BaseReg, int FrameIdx, int64_t Offset) const override
 Insert defining instruction(s) for BaseReg to be a pointer to FrameIdx at the beginning of the basic block. More...
 
void resolveFrameIndex (MachineInstr &MI, unsigned BaseReg, int64_t Offset) const override
 
bool isFrameOffsetLegal (const MachineInstr *MI, unsigned BaseReg, int64_t Offset) const override
 
unsigned getFrameRegister (const MachineFunction &MF) const override
 
unsigned getBaseRegister (const MachineFunction &MF) const
 
bool hasBasePointer (const MachineFunction &MF) const
 

Static Public Member Functions

static const charstripRegisterPrefix (const char *RegName)
 stripRegisterPrefix - This method strips the character prefix from a register name so that only the number is left. More...
 

Detailed Description

Definition at line 57 of file PPCRegisterInfo.h.

Constructor & Destructor Documentation

◆ PPCRegisterInfo()

PPCRegisterInfo::PPCRegisterInfo ( const PPCTargetMachine TM)

Definition at line 74 of file PPCRegisterInfo.cpp.

References llvm::ARM_MB::LD.

Member Function Documentation

◆ adjustStackMapLiveOutMask()

void PPCRegisterInfo::adjustStackMapLiveOutMask ( uint32_t Mask) const
override

Definition at line 243 of file PPCRegisterInfo.cpp.

References llvm::NVPTX::PTXCvtMode::RM.

◆ eliminateFrameIndex()

void PPCRegisterInfo::eliminateFrameIndex ( MachineBasicBlock::iterator  II,
int  SPAdj,
unsigned  FIOperandNum,
RegScavenger RS = nullptr 
) const
override

Definition at line 871 of file PPCRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), assert(), llvm::BuildMI(), llvm::MachineOperand::ChangeToImmediate(), llvm::MachineOperand::ChangeToRegister(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::MachineRegisterInfo::createVirtualRegister(), llvm::PPCISD::DYNALLOC, llvm::PPCISD::DYNAREAOFFSET, llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::ISD::FrameIndex, llvm::DebugLoc::get(), getBaseRegister(), llvm::MachineInstr::getDebugLoc(), llvm::MachineFunction::getFrameInfo(), llvm::PPCFunctionInfo::getFramePointerSaveIndex(), getFrameRegister(), llvm::MachineFunction::getFunction(), llvm::MachineOperand::getImm(), llvm::MachineOperand::getIndex(), llvm::MachineFunction::getInfo(), llvm::PPCSubtarget::getInstrInfo(), llvm::MachineFrameInfo::getObjectOffset(), getOffsetONFromFION(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::MachineFunction::getRegInfo(), llvm::MachineFrameInfo::getStackSize(), llvm::MachineFunction::getSubtarget(), hasBasePointer(), llvm::Function::hasFnAttribute(), llvm::ISD::INLINEASM, is64Bit(), llvm::MachineInstr::isInlineAsm(), llvm::isInt< 16 >(), llvm::PPCTargetMachine::isPPC64(), llvm::RegState::Kill, lowerCRBitRestore(), lowerCRBitSpilling(), lowerCRRestore(), lowerCRSpilling(), lowerDynamicAlloc(), lowerDynamicAreaOffset(), lowerVRSAVERestore(), lowerVRSAVESpilling(), MI, llvm::Attribute::Naked, offsetMinAlign(), llvm::MachineInstr::setDesc(), and TII.

Referenced by requiresVirtualBaseRegisters().

◆ getBaseRegister()

unsigned PPCRegisterInfo::getBaseRegister ( const MachineFunction MF) const

◆ getCalleeSavedRegs()

const MCPhysReg * PPCRegisterInfo::getCalleeSavedRegs ( const MachineFunction MF) const
override

◆ getCalleeSavedRegsViaCopy()

const MCPhysReg * PPCRegisterInfo::getCalleeSavedRegsViaCopy ( const MachineFunction MF) const

◆ getCallPreservedMask()

const uint32_t * PPCRegisterInfo::getCallPreservedMask ( const MachineFunction MF,
CallingConv::ID  CC 
) const
override

◆ getFrameRegister()

unsigned PPCRegisterInfo::getFrameRegister ( const MachineFunction MF) const
override

◆ getLargestLegalSuperClass()

const TargetRegisterClass * PPCRegisterInfo::getLargestLegalSuperClass ( const TargetRegisterClass RC,
const MachineFunction MF 
) const
override

◆ getNoPreservedMask()

const uint32_t * PPCRegisterInfo::getNoPreservedMask ( ) const
override

Definition at line 239 of file PPCRegisterInfo.cpp.

Referenced by llvm::PPCTargetLowering::emitEHSjLjSetJmp().

◆ getPointerRegClass()

const TargetRegisterClass * PPCRegisterInfo::getPointerRegClass ( const MachineFunction MF,
unsigned  Kind = 0 
) const
override

getPointerRegClass - Return the register class to use to hold pointers.

This is used for addressing modes.

Definition at line 120 of file PPCRegisterInfo.cpp.

References llvm::PPCTargetMachine::isPPC64().

◆ getRegPressureLimit()

unsigned PPCRegisterInfo::getRegPressureLimit ( const TargetRegisterClass RC,
MachineFunction MF 
) const
override

◆ getReservedRegs()

BitVector PPCRegisterInfo::getReservedRegs ( const MachineFunction MF) const
override

◆ hasBasePointer()

bool PPCRegisterInfo::hasBasePointer ( const MachineFunction MF) const

◆ hasReservedSpillSlot()

bool PPCRegisterInfo::hasReservedSpillSlot ( const MachineFunction MF,
unsigned  Reg,
int &  FrameIdx 
) const
override

◆ isCallerPreservedPhysReg()

bool PPCRegisterInfo::isCallerPreservedPhysReg ( unsigned  PhysReg,
const MachineFunction MF 
) const
override

◆ isFrameOffsetLegal()

bool PPCRegisterInfo::isFrameOffsetLegal ( const MachineInstr MI,
unsigned  BaseReg,
int64_t  Offset 
) const
override

◆ lowerCRBitRestore()

void PPCRegisterInfo::lowerCRBitRestore ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ lowerCRBitSpilling()

void PPCRegisterInfo::lowerCRBitSpilling ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ lowerCRRestore()

void PPCRegisterInfo::lowerCRRestore ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ lowerCRSpilling()

void PPCRegisterInfo::lowerCRSpilling ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ lowerDynamicAlloc()

void PPCRegisterInfo::lowerDynamicAlloc ( MachineBasicBlock::iterator  II) const

◆ lowerDynamicAreaOffset()

void PPCRegisterInfo::lowerDynamicAreaOffset ( MachineBasicBlock::iterator  II) const

◆ lowerVRSAVERestore()

void PPCRegisterInfo::lowerVRSAVERestore ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ lowerVRSAVESpilling()

void PPCRegisterInfo::lowerVRSAVESpilling ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex 
) const

◆ materializeFrameBaseRegister()

void PPCRegisterInfo::materializeFrameBaseRegister ( MachineBasicBlock MBB,
unsigned  BaseReg,
int  FrameIdx,
int64_t  Offset 
) const
override

◆ needsFrameBaseReg()

bool PPCRegisterInfo::needsFrameBaseReg ( MachineInstr MI,
int64_t  Offset 
) const
override

Returns true if the instruction's frame index reference would be better served by a base register other than FP or SP.

Used by LocalStackFrameAllocation to determine which frame index references it should create new base registers for.

Definition at line 1059 of file PPCRegisterInfo.cpp.

References assert(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::count(), llvm::PPCFrameLowering::determineFrameLayout(), getBaseRegister(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), isFrameOffsetLegal(), and materializeFrameBaseRegister().

Referenced by hasBasePointer(), and requiresVirtualBaseRegisters().

◆ requiresFrameIndexScavenging()

bool llvm::PPCRegisterInfo::requiresFrameIndexScavenging ( const MachineFunction MF) const
inlineoverride

Definition at line 93 of file PPCRegisterInfo.h.

◆ requiresRegisterScavenging()

bool llvm::PPCRegisterInfo::requiresRegisterScavenging ( const MachineFunction MF) const
inlineoverride

We require the register scavenger.

Definition at line 89 of file PPCRegisterInfo.h.

◆ requiresVirtualBaseRegisters()

bool llvm::PPCRegisterInfo::requiresVirtualBaseRegisters ( const MachineFunction MF) const
inlineoverride

◆ resolveFrameIndex()

void PPCRegisterInfo::resolveFrameIndex ( MachineInstr MI,
unsigned  BaseReg,
int64_t  Offset 
) const
override

◆ stripRegisterPrefix()

static const char* llvm::PPCRegisterInfo::stripRegisterPrefix ( const char RegName)
inlinestatic

stripRegisterPrefix - This method strips the character prefix from a register name so that only the number is left.

Used by for linux asm.

Definition at line 145 of file PPCRegisterInfo.h.

Referenced by llvm::PPCInstPrinter::printOperand().

◆ trackLivenessAfterRegAlloc()

bool llvm::PPCRegisterInfo::trackLivenessAfterRegAlloc ( const MachineFunction MF) const
inlineoverride

Definition at line 97 of file PPCRegisterInfo.h.


The documentation for this class was generated from the following files: