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 const TargetRegisterClass* getRegClassForType(const Type* Ty) const; 00028 00029 /// Code Generation virtual methods... 00030 void storeRegToStackSlot(MachineBasicBlock &MBB, 00031 MachineBasicBlock::iterator MI, 00032 unsigned SrcReg, int FrameIndex) const; 00033 00034 void loadRegFromStackSlot(MachineBasicBlock &MBB, 00035 MachineBasicBlock::iterator MI, 00036 unsigned DestReg, int FrameIndex) const; 00037 00038 void copyRegToReg(MachineBasicBlock &MBB, 00039 MachineBasicBlock::iterator MI, 00040 unsigned DestReg, unsigned SrcReg, 00041 const TargetRegisterClass *RC) const; 00042 00043 /// foldMemoryOperand - If this target supports it, fold a load or store of 00044 /// the specified stack slot into the specified machine instruction for the 00045 /// specified operand. If this is possible, the target should perform the 00046 /// folding and return true, otherwise it should return false. If it folds 00047 /// the instruction, it is likely that the MachineInstruction the iterator 00048 /// references has been changed. 00049 virtual MachineInstr* foldMemoryOperand(MachineInstr* MI, 00050 unsigned OpNum, 00051 int FrameIndex) const; 00052 00053 00054 void eliminateCallFramePseudoInstr(MachineFunction &MF, 00055 MachineBasicBlock &MBB, 00056 MachineBasicBlock::iterator MI) const; 00057 00058 void eliminateFrameIndex(MachineBasicBlock::iterator MI) const; 00059 00060 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 00061 00062 void emitPrologue(MachineFunction &MF) const; 00063 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 00064 }; 00065 00066 } // End llvm namespace 00067 00068 #endif