1 //===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
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.
8 //===----------------------------------------------------------------------===//
10 // This file contains the X86 implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef X86REGISTERINFO_H
15 #define X86REGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
21 #include "X86GenRegisterInfo.h.inc"
23 struct X86RegisterInfo : public X86GenRegisterInfo {
25 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
27 /// Code Generation virtual methods...
28 void storeRegToStackSlot(MachineBasicBlock &MBB,
29 MachineBasicBlock::iterator &MBBI,
30 unsigned SrcReg, int FrameIndex,
31 const TargetRegisterClass *RC) const;
33 void loadRegFromStackSlot(MachineBasicBlock &MBB,
34 MachineBasicBlock::iterator &MBBI,
35 unsigned DestReg, int FrameIndex,
36 const TargetRegisterClass *RC) const;
38 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
39 unsigned DestReg, unsigned SrcReg,
40 const TargetRegisterClass *RC) const;
42 void eliminateCallFramePseudoInstr(MachineFunction &MF,
43 MachineBasicBlock &MBB,
44 MachineBasicBlock::iterator &I) const;
46 void eliminateFrameIndex(MachineFunction &MF,
47 MachineBasicBlock::iterator &II) const;
49 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
51 void emitPrologue(MachineFunction &MF) const;
52 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;