LLVM API Documentation

ARMBaseRegisterInfo.cpp File Reference

#include "ARM.h"
#include "ARMAddressingModes.h"
#include "ARMBaseInstrInfo.h"
#include "ARMBaseRegisterInfo.h"
#include "ARMInstrInfo.h"
#include "ARMMachineFunctionInfo.h"
#include "ARMSubtarget.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Function.h"
#include "llvm/LLVMContext.h"
#include "llvm/CodeGen/MachineConstantPool.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineLocation.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterScavenging.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/ADT/SmallVector.h"
#include "ARMGenRegisterInfo.inc"

Include dependency graph for ARMBaseRegisterInfo.cpp:

Go to the source code of this file.

Functions

static unsigned estimateStackSize (MachineFunction &MF, MachineFrameInfo *MFI)
 estimateStackSize - Estimate and return the size of the frame.
static void emitSPUpdate (bool isARM, MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, DebugLoc dl, const ARMBaseInstrInfo &TII, int NumBytes, ARMCC::CondCodes Pred=ARMCC::AL, unsigned PredReg=0)
static unsigned findScratchRegister (RegScavenger *RS, const TargetRegisterClass *RC, ARMFunctionInfo *AFI)
static void movePastCSLoadStoreOps (MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI, int Opc1, int Opc2, unsigned Area, const ARMSubtarget &STI)
static bool isCalleeSavedRegister (unsigned Reg, const unsigned *CSRegs)
static bool isCSRestore (MachineInstr *MI, const ARMBaseInstrInfo &TII, const unsigned *CSRegs)


Function Documentation

static void emitSPUpdate ( bool  isARM,
MachineBasicBlock &  MBB,
MachineBasicBlock::iterator &  MBBI,
DebugLoc  dl,
const ARMBaseInstrInfo &  TII,
int  NumBytes,
ARMCC::CondCodes  Pred = ARMCC::AL,
unsigned  PredReg = 0 
) [static]

static unsigned estimateStackSize ( MachineFunction &  MF,
MachineFrameInfo *  MFI 
) [static]

static unsigned findScratchRegister ( RegScavenger *  RS,
const TargetRegisterClass *  RC,
ARMFunctionInfo *  AFI 
) [static]

findScratchRegister - Find a 'free' ARM register. If register scavenger is not being used, R12 is available. Otherwise, try for a call-clobbered register first and then a spilled callee-saved register if that fails.

Definition at line 1007 of file ARMBaseRegisterInfo.cpp.

References llvm::RegScavenger::FindUnusedReg(), and llvm::ARMFunctionInfo::isThumb1OnlyFunction().

Referenced by llvm::PPCRegisterInfo::eliminateFrameIndex(), llvm::BlackfinRegisterInfo::eliminateFrameIndex(), llvm::ARMBaseRegisterInfo::eliminateFrameIndex(), llvm::PPCRegisterInfo::lowerCRSpilling(), and llvm::PPCRegisterInfo::lowerDynamicAlloc().

static bool isCalleeSavedRegister ( unsigned  Reg,
const unsigned *  CSRegs 
) [static]

Definition at line 1234 of file ARMBaseRegisterInfo.cpp.

Referenced by isCSRestore().

static bool isCSRestore ( MachineInstr *  MI,
const ARMBaseInstrInfo &  TII,
const unsigned *  CSRegs 
) [static]

static void movePastCSLoadStoreOps ( MachineBasicBlock &  MBB,
MachineBasicBlock::iterator &  MBBI,
int  Opc1,
int  Opc2,
unsigned  Area,
const ARMSubtarget &  STI 
) [static]

Move iterator pass the next bunch of callee save load / store ops for the particular spill area (1: integer area 1, 2: integer area 2, 3: fp area, 0: don't care).

Definition at line 1090 of file ARMBaseRegisterInfo.cpp.

References llvm::X86II::D8, llvm::X86II::D9, llvm::MachineBasicBlock::end(), and llvm::ARMSubtarget::isTargetDarwin().

Referenced by llvm::ARMBaseRegisterInfo::emitEpilogue(), and llvm::ARMBaseRegisterInfo::emitPrologue().