blob: 3ef3ccbcaaee2da579bb50cb1de05243bd0329a5 [file] [log] [blame]
Scott Michel564427e2007-12-05 01:24:05 +00001//===-- SPUMachineFunctionInfo.h - Private data used for CellSPU --*- C++ -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
Chris Lattner4ee451d2007-12-29 20:36:04 +00005// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
Scott Michel564427e2007-12-05 01:24:05 +00007//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the IBM Cell SPU specific subclass of MachineFunctionInfo.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef SPU_MACHINE_FUNCTION_INFO_H
15#define SPU_MACHINE_FUNCTION_INFO_H
16
17#include "llvm/CodeGen/MachineFunction.h"
18
19namespace llvm {
20
21/// SPUFunctionInfo - Cell SPU target-specific information for each
22/// MachineFunction
23class SPUFunctionInfo : public MachineFunctionInfo {
24private:
25 /// UsesLR - Indicates whether LR is used in the current function.
26 ///
27 bool UsesLR;
28
Dan Gohman1e93df62010-04-17 14:41:14 +000029 // VarArgsFrameIndex - FrameIndex for start of varargs area.
30 int VarArgsFrameIndex;
31
Scott Michel564427e2007-12-05 01:24:05 +000032public:
33 SPUFunctionInfo(MachineFunction& MF)
Dan Gohman1e93df62010-04-17 14:41:14 +000034 : UsesLR(false),
35 VarArgsFrameIndex(0)
Scott Michel564427e2007-12-05 01:24:05 +000036 {}
37
38 void setUsesLR(bool U) { UsesLR = U; }
39 bool usesLR() { return UsesLR; }
40
Dan Gohman1e93df62010-04-17 14:41:14 +000041 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
42 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
Scott Michel564427e2007-12-05 01:24:05 +000043};
44
45} // end of namespace llvm
46
47
48#endif
49