1 //===-- SPUMachineFunctionInfo.h - Private data used for CellSPU --*- 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 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 19 namespace llvm { 20 21 /// SPUFunctionInfo - Cell SPU target-specific information for each 22 /// MachineFunction 23 class SPUFunctionInfo : public MachineFunctionInfo { 24 virtual void anchor(); 25 26 /// UsesLR - Indicates whether LR is used in the current function. 27 /// 28 bool UsesLR; 29 30 // VarArgsFrameIndex - FrameIndex for start of varargs area. 31 int VarArgsFrameIndex; 32 33 public: SPUFunctionInfo(MachineFunction & MF)34 SPUFunctionInfo(MachineFunction& MF) 35 : UsesLR(false), 36 VarArgsFrameIndex(0) 37 {} 38 setUsesLR(bool U)39 void setUsesLR(bool U) { UsesLR = U; } usesLR()40 bool usesLR() { return UsesLR; } 41 getVarArgsFrameIndex()42 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; } setVarArgsFrameIndex(int Index)43 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; } 44 }; 45 46 } // end of namespace llvm 47 48 49 #endif 50 51