1 //===- X86RegisterInfo.h - X86 Register Information Impl --------*- C++ -*-===//
3 // This file contains the X86 implementation of the MRegisterInfo class.
5 //===----------------------------------------------------------------------===//
7 #ifndef X86REGISTERINFO_H
8 #define X86REGISTERINFO_H
10 #include "llvm/Target/MRegisterInfo.h"
14 struct X86RegisterInfo : public MRegisterInfo {
17 const unsigned* getCalleeSaveRegs() const;
19 /// Returns register class appropriate for input SSA register
21 const TargetRegisterClass *getClassForReg(unsigned Reg) const;
22 const TargetRegisterClass* getRegClassForType(const Type* Ty) const;
24 /// Code Generation virtual methods...
25 void storeRegToStackSlot(MachineBasicBlock &MBB,
26 MachineBasicBlock::iterator &MBBI,
27 unsigned SrcReg, int FrameIndex,
28 const TargetRegisterClass *RC) const;
30 void loadRegFromStackSlot(MachineBasicBlock &MBB,
31 MachineBasicBlock::iterator &MBBI,
32 unsigned DestReg, int FrameIndex,
33 const TargetRegisterClass *RC) const;
35 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator &MBBI,
36 unsigned DestReg, unsigned SrcReg,
37 const TargetRegisterClass *RC) const;
39 void eliminateCallFramePseudoInstr(MachineFunction &MF,
40 MachineBasicBlock &MBB,
41 MachineBasicBlock::iterator &I) const;
43 void eliminateFrameIndex(MachineFunction &MF,
44 MachineBasicBlock::iterator &II) const;
46 void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
48 void emitPrologue(MachineFunction &MF) const;
49 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;