LLVM API Documentation
00001 //===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file was developed by the LLVM research group and is distributed under 00006 // the University of Illinois Open Source License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file contains the X86 implementation of the MRegisterInfo class. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef X86REGISTERINFO_H 00015 #define X86REGISTERINFO_H 00016 00017 #include "llvm/Target/MRegisterInfo.h" 00018 00019 class llvm::Type; 00020 00021 #include "X86GenRegisterInfo.h.inc" 00022 00023 namespace llvm { 00024 00025 struct X86RegisterInfo : public X86GenRegisterInfo { 00026 X86RegisterInfo(); 00027 00028 /// Code Generation virtual methods... 00029 void storeRegToStackSlot(MachineBasicBlock &MBB, 00030 MachineBasicBlock::iterator MI, 00031 unsigned SrcReg, int FrameIndex, 00032 const TargetRegisterClass *RC) const; 00033 00034 void loadRegFromStackSlot(MachineBasicBlock &MBB, 00035 MachineBasicBlock::iterator MI, 00036 unsigned DestReg, int FrameIndex, 00037 const TargetRegisterClass *RC) const; 00038 00039 void copyRegToReg(MachineBasicBlock &MBB, 00040 MachineBasicBlock::iterator MI, 00041 unsigned DestReg, unsigned SrcReg, 00042 const TargetRegisterClass *RC) const; 00043 00044 /// foldMemoryOperand - If this target supports it, fold a load or store of 00045 /// the specified stack slot into the specified machine instruction for the 00046 /// specified operand. If this is possible, the target should perform the 00047 /// folding and return true, otherwise it should return false. If it folds 00048 /// the instruction, it is likely that the MachineInstruction the iterator 00049 /// references has been changed. 00050 virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, 00051 unsigned OpNum, 00052 int FrameIndex) const; 00053 00054 00055 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00056 MachineBasicBlock &MBB, 00057 MachineBasicBlock::iterator MI) const; 00058 00059 void eliminateFrameIndex(MachineBasicBlock::iterator MI) const; 00060 00061 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 00062 00063 void emitPrologue(MachineFunction &MF) const; 00064 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00065 00066 // Debug information queries. 00067 unsigned getRARegister() const; 00068 unsigned getFrameRegister(MachineFunction &MF) const; 00069 }; 00070 00071 } // End llvm namespace 00072 00073 #endif