LLVM API Documentation

PPCRegisterInfo.cpp File Reference

#include "PPC.h"
#include "PPCInstrBuilder.h"
#include "PPCRegisterInfo.h"
#include "PPCSubtarget.h"
#include "llvm/Constants.h"
#include "llvm/Type.h"
#include "llvm/CodeGen/ValueTypes.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
#include "llvm/CodeGen/MachineDebugInfo.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineFrameInfo.h"
#include "llvm/CodeGen/MachineLocation.h"
#include "llvm/CodeGen/SelectionDAGNodes.h"
#include "llvm/Target/TargetFrameInfo.h"
#include "llvm/Target/TargetInstrInfo.h"
#include "llvm/Target/TargetMachine.h"
#include "llvm/Target/TargetOptions.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/ADT/STLExtras.h"
#include <cstdlib>
#include <iostream>
#include "PPCGenRegisterInfo.inc"

Include dependency graph for PPCRegisterInfo.cpp:

Go to the source code of this file.

Defines

#define DEBUG_TYPE   "reginfo"

Functions

static bool hasFP (const MachineFunction &MF)
static void RemoveVRSaveCode (MachineInstr *MI)
static void HandleVRSaveUpdate (MachineInstr *MI, const bool *UsedRegs)

Variables

static const unsigned short VRRegNo []


Define Documentation

#define DEBUG_TYPE   "reginfo"

Definition at line 14 of file PPCRegisterInfo.cpp.


Function Documentation

static void HandleVRSaveUpdate ( MachineInstr MI,
const bool *  UsedRegs 
) [static]

Definition at line 540 of file PPCRegisterInfo.cpp.

References llvm::MachineInstrBuilder::addImm(), llvm::BuildMI(), E, llvm::MachineInstr::eraseFromParent(), llvm::MachineInstr::getOperand(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineOperand::getReg(), llvm::PPCRegisterInfo::getRegisterNumbering(), llvm::MachineFunction::livein_begin(), llvm::MachineFunction::livein_end(), llvm::MachineFunction::liveout_begin(), llvm::MachineFunction::liveout_end(), MF, MI, RemoveVRSaveCode(), and VRRegNo.

Referenced by llvm::PPCRegisterInfo::emitPrologue().

static bool hasFP ( const MachineFunction MF  )  [static]

Definition at line 371 of file PPCRegisterInfo.cpp.

References llvm::TargetMachine::getFrameInfo(), llvm::MachineFunction::getFrameInfo(), llvm::TargetFrameInfo::getStackAlignment(), llvm::MachineFunction::getTarget(), llvm::MachineFrameInfo::hasVarSizedObjects(), MF, and llvm::NoFramePointerElim.

static void RemoveVRSaveCode ( MachineInstr MI  )  [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.

Definition at line 493 of file PPCRegisterInfo.cpp.

References llvm::MachineBasicBlock::begin(), llvm::MachineFunction::begin(), E, llvm::MachineFunction::end(), llvm::MachineBasicBlock::end(), llvm::MachineInstr::eraseFromParent(), llvm::TargetMachine::getInstrInfo(), llvm::MachineBasicBlock::getParent(), llvm::MachineInstr::getParent(), llvm::MachineFunction::getTarget(), llvm::TargetInstrInfo::isReturn(), MF, MI, and TII.

Referenced by HandleVRSaveUpdate().


Variable Documentation

const unsigned short VRRegNo[] [static]

Initial value:

 {
 PPC::V0 , PPC::V1 , PPC::V2 , PPC::V3 , PPC::V4 , PPC::V5 , PPC::V6 , PPC::V7 ,
 PPC::V8 , PPC::V9 , PPC::V10, PPC::V11, PPC::V12, PPC::V13, PPC::V14, PPC::V15,
 PPC::V16, PPC::V17, PPC::V18, PPC::V19, PPC::V20, PPC::V21, PPC::V22, PPC::V23,
 PPC::V24, PPC::V25, PPC::V26, PPC::V27, PPC::V28, PPC::V29, PPC::V30, PPC::V31
}
VRRegNo - Map from a numbered VR register to its enum value.

Definition at line 482 of file PPCRegisterInfo.cpp.

Referenced by HandleVRSaveUpdate().