/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h
Line | Count | Source (jump to first uncovered line) |
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 LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H |
14 | | #define LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H |
15 | | |
16 | | #include "llvm/CodeGen/MachineFunction.h" |
17 | | |
18 | | namespace llvm { |
19 | | |
20 | | class SparcMachineFunctionInfo : public MachineFunctionInfo { |
21 | | virtual void anchor(); |
22 | | private: |
23 | | unsigned GlobalBaseReg; |
24 | | |
25 | | /// VarArgsFrameOffset - Frame offset to start of varargs area. |
26 | | int VarArgsFrameOffset; |
27 | | |
28 | | /// SRetReturnReg - Holds the virtual register into which the sret |
29 | | /// argument is passed. |
30 | | unsigned SRetReturnReg; |
31 | | |
32 | | /// IsLeafProc - True if the function is a leaf procedure. |
33 | | bool IsLeafProc; |
34 | | public: |
35 | | SparcMachineFunctionInfo() |
36 | | : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0), |
37 | 0 | IsLeafProc(false) {} |
38 | | explicit SparcMachineFunctionInfo(MachineFunction &MF) |
39 | | : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0), |
40 | 645 | IsLeafProc(false) {} |
41 | | |
42 | 41 | unsigned getGlobalBaseReg() const { return GlobalBaseReg; } |
43 | 31 | void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } |
44 | | |
45 | 2 | int getVarArgsFrameOffset() const { return VarArgsFrameOffset; } |
46 | 2 | void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; } |
47 | | |
48 | 52 | unsigned getSRetReturnReg() const { return SRetReturnReg; } |
49 | 26 | void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; } |
50 | | |
51 | 273 | void setLeafProc(bool rhs) { IsLeafProc = rhs; } |
52 | 2.76k | bool isLeafProc() const { return IsLeafProc; } |
53 | | }; |
54 | | } |
55 | | |
56 | | #endif |