Anton Korobeynikov | 32b7d5b | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 1 | //==- SystemZMachineFuctionInfo.h - SystemZ machine function info -*- C++ -*-=// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is distributed under the University of Illinois Open Source |
| 6 | // License. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | // |
| 10 | // This file declares SystemZ-specific per-machine-function information. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | |
| 14 | #ifndef SYSTEMZMACHINEFUNCTIONINFO_H |
| 15 | #define SYSTEMZMACHINEFUNCTIONINFO_H |
| 16 | |
| 17 | #include "llvm/CodeGen/MachineFunction.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | |
| 21 | /// SystemZMachineFunctionInfo - This class is derived from MachineFunction and |
| 22 | /// contains private SystemZ target-specific information for each MachineFunction. |
| 23 | class SystemZMachineFunctionInfo : public MachineFunctionInfo { |
| 24 | /// CalleeSavedFrameSize - Size of the callee-saved register portion of the |
| 25 | /// stack frame in bytes. |
| 26 | unsigned CalleeSavedFrameSize; |
| 27 | |
Anton Korobeynikov | 188e6d1 | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 28 | /// LowReg - Low register of range of callee-saved registers to store. |
| 29 | unsigned LowReg; |
| 30 | |
| 31 | /// HighReg - High register of range of callee-saved registers to store. |
| 32 | unsigned HighReg; |
Anton Korobeynikov | 32b7d5b | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 33 | public: |
| 34 | SystemZMachineFunctionInfo() : CalleeSavedFrameSize(0) {} |
| 35 | |
| 36 | SystemZMachineFunctionInfo(MachineFunction &MF) : CalleeSavedFrameSize(0) {} |
| 37 | |
| 38 | unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; } |
| 39 | void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; } |
Anton Korobeynikov | 188e6d1 | 2009-07-16 13:51:12 +0000 | [diff] [blame] | 40 | |
| 41 | unsigned getLowReg() const { return LowReg; } |
| 42 | void setLowReg(unsigned Reg) { LowReg = Reg; } |
| 43 | |
| 44 | unsigned getHighReg() const { return HighReg; } |
| 45 | void setHighReg(unsigned Reg) { HighReg = Reg; } |
Anton Korobeynikov | 32b7d5b | 2009-07-16 13:27:25 +0000 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | } // End llvm namespace |
| 49 | |
| 50 | #endif |