blob: e34c1312810c203decd22aa6b23f5247fe5e7e7d [file] [log] [blame]
Chris Lattnerea7fd962009-09-15 18:03:13 +00001//===- 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
18namespace llvm {
19
20 class SparcMachineFunctionInfo : public MachineFunctionInfo {
21 private:
22 unsigned GlobalBaseReg;
Dan Gohman1e93df62010-04-17 14:41:14 +000023
24 /// VarArgsFrameOffset - Frame offset to start of varargs area.
25 int VarArgsFrameOffset;
26
Chris Lattnerea7fd962009-09-15 18:03:13 +000027 public:
Dan Gohman1e93df62010-04-17 14:41:14 +000028 SparcMachineFunctionInfo() : GlobalBaseReg(0), VarArgsFrameOffset(0) {}
29 explicit SparcMachineFunctionInfo(MachineFunction &MF)
30 : GlobalBaseReg(0), VarArgsFrameOffset(0) {}
Chris Lattnerea7fd962009-09-15 18:03:13 +000031
32 unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
33 void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
Dan Gohman1e93df62010-04-17 14:41:14 +000034
35 int getVarArgsFrameOffset() const { return VarArgsFrameOffset; }
36 void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; }
Chris Lattnerea7fd962009-09-15 18:03:13 +000037 };
38}
39
40#endif