aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/CellSPU/SPUMachineFunction.h
blob: 3ef3ccbcaaee2da579bb50cb1de05243bd0329a5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
//===-- SPUMachineFunctionInfo.h - Private data used for CellSPU --*- C++ -*-=//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the IBM Cell SPU specific subclass of MachineFunctionInfo.
//
//===----------------------------------------------------------------------===//

#ifndef SPU_MACHINE_FUNCTION_INFO_H
#define SPU_MACHINE_FUNCTION_INFO_H

#include "llvm/CodeGen/MachineFunction.h"

namespace llvm {

/// SPUFunctionInfo - Cell SPU target-specific information for each
/// MachineFunction
class SPUFunctionInfo : public MachineFunctionInfo {
private:
  /// UsesLR - Indicates whether LR is used in the current function.
  ///
  bool UsesLR;

  // VarArgsFrameIndex - FrameIndex for start of varargs area.
  int VarArgsFrameIndex;

public:
  SPUFunctionInfo(MachineFunction& MF) 
  : UsesLR(false),
    VarArgsFrameIndex(0)
  {}

  void setUsesLR(bool U) { UsesLR = U; }
  bool usesLR()          { return UsesLR; }

  int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
  void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
};

} // end of namespace llvm


#endif