Move isLoadFrom/StoreToStackSlot from MRegisterInfo to TargetInstrInfo,a far more...
[oota-llvm.git] / lib / Target / Alpha / AlphaRegisterInfo.h
1 //===- AlphaRegisterInfo.h - Alpha 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 Alpha implementation of the MRegisterInfo class.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef ALPHAREGISTERINFO_H
15 #define ALPHAREGISTERINFO_H
16
17 #include "llvm/Target/MRegisterInfo.h"
18 #include "AlphaGenRegisterInfo.h.inc"
19
20 namespace llvm {
21
22 class Type;
23
24 struct AlphaRegisterInfo : public AlphaGenRegisterInfo {
25   AlphaRegisterInfo();
26
27   /// Code Generation virtual methods...
28   void storeRegToStackSlot(MachineBasicBlock &MBB,
29                            MachineBasicBlock::iterator MBBI,
30                            unsigned SrcReg, int FrameIndex,
31                            const TargetRegisterClass *RC) const;
32
33   void loadRegFromStackSlot(MachineBasicBlock &MBB,
34                             MachineBasicBlock::iterator MBBI,
35                             unsigned DestReg, int FrameIndex,
36                             const TargetRegisterClass *RC) const;
37   
38   MachineInstr* foldMemoryOperand(MachineInstr *MI, unsigned OpNum, 
39                                   int FrameIndex) const;
40
41   void copyRegToReg(MachineBasicBlock &MBB, MachineBasicBlock::iterator MBBI,
42                     unsigned DestReg, unsigned SrcReg,
43                     const TargetRegisterClass *RC) const;
44
45   void eliminateCallFramePseudoInstr(MachineFunction &MF,
46                                      MachineBasicBlock &MBB,
47                                      MachineBasicBlock::iterator I) const;
48
49   void eliminateFrameIndex(MachineBasicBlock::iterator II) const;
50
51   //void processFunctionBeforeFrameFinalized(MachineFunction &MF) const;
52
53   void emitPrologue(MachineFunction &MF) const;
54   void emitEpilogue(MachineFunction &MF, MachineBasicBlock &MBB) const;
55
56   static std::string getPrettyName(unsigned reg);
57 };
58
59 } // end namespace llvm
60
61 #endif