X86RegisterInfo.h revision c0b9dc5be79f009d260edb5cd5e1d8346587aaa2
1//===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file was developed by the LLVM research group and is distributed under 6// the University of Illinois Open Source License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9// 10// This file contains the X86 implementation of the MRegisterInfo class. 11// 12//===----------------------------------------------------------------------===// 13 14#ifndef X86REGISTERINFO_H 15#define X86REGISTERINFO_H 16 17#include "llvm/Target/MRegisterInfo.h" 18 19class llvm::Type; 20 21#include "X86GenRegisterInfo.h.inc" 22 23namespace llvm { 24 25struct X86RegisterInfo : public X86GenRegisterInfo { 26 X86RegisterInfo(); 27 const TargetRegisterClass* getRegClassForType(const Type* Ty) const; 28 29 /// Code Generation virtual methods... 30 int storeRegToStackSlot(MachineBasicBlock &MBB, 31 MachineInstr* MI, 32 unsigned SrcReg, int FrameIndex, 33 const TargetRegisterClass *RC) const; 34 35 int loadRegFromStackSlot(MachineBasicBlock &MBB, 36 MachineInstr* MI, 37 unsigned DestReg, int FrameIndex, 38 const TargetRegisterClass *RC) const; 39 40 int copyRegToReg(MachineBasicBlock &MBB, 41 MachineInstr* MI, 42 unsigned DestReg, unsigned SrcReg, 43 const TargetRegisterClass *RC) const; 44 45 int eliminateCallFramePseudoInstr(MachineFunction &MF, 46 MachineBasicBlock &MBB, 47 MachineInstr* MI) const; 48 49 int eliminateFrameIndex(MachineFunction &MF, 50 MachineInstr* MI) const; 51 52 int processFunctionBeforeFrameFinalized(MachineFunction &MF) const; 53 54 int emitPrologue(MachineFunction &MF) const; 55 int emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const; 56}; 57 58} // End llvm namespace 59 60#endif 61