Chris Lattner | ea7fd96 | 2009-09-15 18:03:13 +0000 | [diff] [blame] | 1 | //===- SparcMachineFunctionInfo.h - Sparc 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 Sparc specific per-machine-function information. |
| 11 | // |
| 12 | //===----------------------------------------------------------------------===// |
| 13 | #ifndef SPARCMACHINEFUNCTIONINFO_H |
| 14 | #define SPARCMACHINEFUNCTIONINFO_H |
| 15 | |
| 16 | #include "llvm/CodeGen/MachineFunction.h" |
| 17 | |
| 18 | namespace llvm { |
| 19 | |
| 20 | class SparcMachineFunctionInfo : public MachineFunctionInfo { |
| 21 | private: |
| 22 | unsigned GlobalBaseReg; |
| 23 | public: |
| 24 | SparcMachineFunctionInfo() : GlobalBaseReg(0) {} |
Dan Gohman | ce931c6 | 2010-03-01 17:56:46 +0000 | [diff] [blame] | 25 | explicit SparcMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0) {} |
Chris Lattner | ea7fd96 | 2009-09-15 18:03:13 +0000 | [diff] [blame] | 26 | |
| 27 | unsigned getGlobalBaseReg() const { return GlobalBaseReg; } |
| 28 | void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } |
| 29 | }; |
| 30 | } |
| 31 | |
| 32 | #endif |