blob: b3e10176d2326a26279222d9135e060cb6720148 [file] [log] [blame]
Jim Laskey2f616bf2006-11-16 22:43:37 +00001//===-- PPCMachineFunctionInfo.h - Private data used for PowerPC --*- C++ -*-=//
2//
3// The LLVM Compiler Infrastructure
4//
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.
7//
8//===----------------------------------------------------------------------===//
9//
10// This file declares the PowerPC specific subclass of MachineFunctionInfo.
11//
12//===----------------------------------------------------------------------===//
13
14#ifndef PPC_MACHINE_FUNCTION_INFO_H
15#define PPC_MACHINE_FUNCTION_INFO_H
16
17#include "llvm/CodeGen/MachineFunction.h"
18
19namespace llvm {
20
21/// PPCFunctionInfo - This class is derived from MachineFunction private
22/// PowerPC target-specific information for each MachineFunction.
23class PPCFunctionInfo : public MachineFunctionInfo {
24private:
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;
29
30public:
31 PPCFunctionInfo(MachineFunction& MF)
32 : FramePointerSaveIndex(0)
33 {}
34
35 int getFramePointerSaveIndex() const { return FramePointerSaveIndex; }
36 void setFramePointerSaveIndex(int Idx) { FramePointerSaveIndex = Idx; }
37
38};
39
40} // end of namespace llvm
41
42
Reid Spencer24652d12006-11-25 05:41:02 +000043#endif