1 //===-- PPCMachineFunctionInfo.h - Private data used for PowerPC --*- C++ -*-=//
3 // The LLVM Compiler Infrastructure
5 // This file was developed by James M. Laskey and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares the PowerPC specific subclass of MachineFunctionInfo.
12 //===----------------------------------------------------------------------===//
14 #ifndef PPC_MACHINE_FUNCTION_INFO_H
15 #define PPC_MACHINE_FUNCTION_INFO_H
17 #include "llvm/CodeGen/MachineFunction.h"
21 /// PPCFunctionInfo - This class is derived from MachineFunction private
22 /// PowerPC target-specific information for each MachineFunction.
23 class PPCFunctionInfo : public MachineFunctionInfo {
25 /// FramePointerSaveIndex - Frame index of where the old frame pointer is
26 /// stored. Also used as an anchor for instructions that need to be altered
27 /// when using frame pointers (dyna_add, dyna_sub.)
28 int FramePointerSaveIndex;
30 /// UsesLR - Indicates whether LR is used in the current function.
35 PPCFunctionInfo(MachineFunction& MF)
36 : FramePointerSaveIndex(0)
39 int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
40 void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
42 void setUsesLR(bool U) { UsesLR = U; }
43 bool usesLR() { return UsesLR; }
47 } // end of namespace llvm