1 //===- AlphaRegisterInfo.h - Alpha 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 Alpha implementation of the MRegisterInfo class.
12 //===----------------------------------------------------------------------===//
14 #ifndef ALPHAREGISTERINFO_H
15 #define ALPHAREGISTERINFO_H
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "AlphaGenRegisterInfo.h.inc"
24 struct AlphaRegisterInfo : public AlphaGenRegisterInfo {
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 virtual unsigned isLoadFromStackSlot(MachineInstr *MI, int &FrameIndex) const;
40 MachineInstr* foldMemoryOperand(MachineInstr *MI, unsigned OpNum,
41 int FrameIndex) const;
43 void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
44 unsigned DestReg, unsigned SrcReg,
45 const TargetRegisterClass *RC) const;
47 void eliminateCallFramePseudoInstr(MachineFunction &MF,
48 MachineBasicBlock &MBB,
49 MachineBasicBlock::iterator I) const;
51 void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
53 //void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
55 void emitPrologue(MachineFunction &MF) const;
56 void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
58 static std::string getPrettyName(unsigned reg);
61 } // end namespace llvm