LLVM API Documentation

llvm::PPCRegisterInfo Class Reference

#include <PPCRegisterInfo.h>

Inheritance diagram for llvm::PPCRegisterInfo:

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

Collaboration graph
[legend]

List of all members.

Public Member Functions

 PPCRegisterInfo (const PPCSubtarget &SubTarget, const TargetInstrInfo &tii)
const unsignedgetCalleeSavedRegs (const MachineFunction *MF=0) const
 Code Generation virtual methods...
const TargetRegisterClass *const * getCalleeSavedRegClasses (const MachineFunction *MF=0) const
BitVector getReservedRegs (const MachineFunction &MF) const
bool targetHandlesStackFrameRounding () const
bool requiresRegisterScavenging (const MachineFunction &MF) const
bool hasFP (const MachineFunction &MF) const
void eliminateCallFramePseudoInstr (MachineFunction &MF, MachineBasicBlock &MBB, MachineBasicBlock::iterator I) const
void lowerDynamicAlloc (MachineBasicBlock::iterator II, int SPAdj, RegScavenger *RS) const
void lowerCRSpilling (MachineBasicBlock::iterator II, unsigned FrameIndex, int SPAdj, RegScavenger *RS) const
void eliminateFrameIndex (MachineBasicBlock::iterator II, int SPAdj, RegScavenger *RS=NULL) const
void determineFrameLayout (MachineFunction &MF) const
void processFunctionBeforeCalleeSavedScan (MachineFunction &MF, RegScavenger *RS=NULL) const
void emitPrologue (MachineFunction &MF) const
void emitEpilogue (MachineFunction &MF, MachineBasicBlock &MBB) const
unsigned getRARegister () const
unsigned getFrameRegister (MachineFunction &MF) const
void getInitialFrameState (std::vector< MachineMove > &Moves) const
unsigned getEHExceptionRegister () const
unsigned getEHHandlerRegister () const
int getDwarfRegNum (unsigned RegNum, bool isEH) const

Static Public Member Functions

static unsigned getRegisterNumbering (unsigned RegEnum)


Detailed Description

Definition at line 27 of file PPCRegisterInfo.h.


Constructor & Destructor Documentation

PPCRegisterInfo::PPCRegisterInfo ( const PPCSubtarget SubTarget,
const TargetInstrInfo tii 
)

Definition at line 119 of file PPCRegisterInfo.cpp.

References llvm::PPCISD::STD_32.


Member Function Documentation

unsigned PPCRegisterInfo::getRegisterNumbering ( unsigned  RegEnum  )  [static]

getRegisterNumbering - Given the enum value for some register, e.g. PPC::F14, return the number that it corresponds to (e.g. 14).

getRegisterNumbering - Given the enum value for some register, e.g. PPC::F14, return the number that it corresponds to (e.g. 14).

Definition at line 77 of file PPCRegisterInfo.cpp.

References llvm::cerr(), V0, and V1.

Referenced by HandleVRSaveUpdate(), and lowerCRSpilling().

const unsigned * PPCRegisterInfo::getCalleeSavedRegs ( const MachineFunction MF = 0  )  const

Code Generation virtual methods...

Definition at line 141 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isMachoABI(), and llvm::PPCSubtarget::isPPC64().

const TargetRegisterClass *const * PPCRegisterInfo::getCalleeSavedRegClasses ( const MachineFunction MF = 0  )  const

BitVector PPCRegisterInfo::getReservedRegs ( const MachineFunction MF  )  const

bool llvm::PPCRegisterInfo::targetHandlesStackFrameRounding (  )  const [inline]

targetHandlesStackFrameRounding - Returns true if the target is responsible for rounding up the stack frame (probably at emitPrologue time).

Definition at line 49 of file PPCRegisterInfo.h.

bool PPCRegisterInfo::requiresRegisterScavenging ( const MachineFunction MF  )  const

requiresRegisterScavenging - We require a register scavenger. FIXME (64-bit): Should be inlined.

Definition at line 71 of file PPCRegisterInfo.cpp.

References EnableRegisterScavenging.

bool PPCRegisterInfo::hasFP ( const MachineFunction MF  )  const

void PPCRegisterInfo::eliminateCallFramePseudoInstr ( MachineFunction MF,
MachineBasicBlock MBB,
MachineBasicBlock::iterator  I 
) const

void PPCRegisterInfo::lowerDynamicAlloc ( MachineBasicBlock::iterator  II,
int  SPAdj,
RegScavenger RS 
) const

void PPCRegisterInfo::lowerCRSpilling ( MachineBasicBlock::iterator  II,
unsigned  FrameIndex,
int  SPAdj,
RegScavenger RS 
) const

lowerCRSpilling - Generate the code for spilling a CR register. Instead of reserving a whole register (R0), we scrounge for one here. This generates code like this:

mfcr rA ; Move the conditional register into GPR rA. rlwinm rA, rA, SB, 0, 31 ; Shift the bits left so they are in CR0's slot. stw rA, FI ; Store rA to the frame.

Definition at line 577 of file PPCRegisterInfo.cpp.

References llvm::addFrameReference(), llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), llvm::MachineBasicBlock::erase(), findScratchRegister(), llvm::TargetInstrInfo::get(), llvm::MachineOperand::getImm(), llvm::MachineInstr::getOperand(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), getRegisterNumbering(), llvm::MachineOperand::isKill(), llvm::PPCSubtarget::isPPC64(), MBB, llvm::PPCISD::MFCR, MI, and Reg.

Referenced by eliminateFrameIndex().

void PPCRegisterInfo::eliminateFrameIndex ( MachineBasicBlock::iterator  II,
int  SPAdj,
RegScavenger RS = NULL 
) const

void PPCRegisterInfo::determineFrameLayout ( MachineFunction MF  )  const

void PPCRegisterInfo::processFunctionBeforeCalleeSavedScan ( MachineFunction MF,
RegScavenger RS = NULL 
) const

void PPCRegisterInfo::emitPrologue ( MachineFunction MF  )  const

void PPCRegisterInfo::emitEpilogue ( MachineFunction MF,
MachineBasicBlock MBB 
) const

unsigned PPCRegisterInfo::getRARegister (  )  const

Definition at line 1395 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

Referenced by processFunctionBeforeCalleeSavedScan().

unsigned PPCRegisterInfo::getFrameRegister ( MachineFunction MF  )  const

Definition at line 1399 of file PPCRegisterInfo.cpp.

References hasFP(), and llvm::PPCSubtarget::isPPC64().

void PPCRegisterInfo::getInitialFrameState ( std::vector< MachineMove > &  Moves  )  const

Definition at line 1406 of file PPCRegisterInfo.cpp.

References Src, and llvm::MachineLocation::VirtualFP.

unsigned PPCRegisterInfo::getEHExceptionRegister (  )  const

Definition at line 1414 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

unsigned PPCRegisterInfo::getEHHandlerRegister (  )  const

Definition at line 1418 of file PPCRegisterInfo.cpp.

References llvm::PPCSubtarget::isPPC64().

int PPCRegisterInfo::getDwarfRegNum ( unsigned  RegNum,
bool  isEH 
) const

Definition at line 1422 of file PPCRegisterInfo.cpp.


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.