diff options
author | Ed Schouten <ed@FreeBSD.org> | 2009-06-03 21:10:15 +0000 |
---|---|---|
committer | Ed Schouten <ed@FreeBSD.org> | 2009-06-03 21:10:15 +0000 |
commit | 68eb509bdc5c7007520d5231cd92de28106236df (patch) | |
tree | db103e2a0755ab86f18c181a2d208a6a63284c97 /lib/Target/Alpha/AlphaMachineFunctionInfo.h | |
parent | 33a8e4360f5050416130517e5c7a1007d06aa90f (diff) |
Notes
Diffstat (limited to 'lib/Target/Alpha/AlphaMachineFunctionInfo.h')
-rw-r--r-- | lib/Target/Alpha/AlphaMachineFunctionInfo.h | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/Target/Alpha/AlphaMachineFunctionInfo.h b/lib/Target/Alpha/AlphaMachineFunctionInfo.h new file mode 100644 index 0000000000000..47de5dfad94d7 --- /dev/null +++ b/lib/Target/Alpha/AlphaMachineFunctionInfo.h @@ -0,0 +1,48 @@ +//====- AlphaMachineFuctionInfo.h - Alpha machine function info -*- 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 Alpha-specific per-machine-function information. +// +//===----------------------------------------------------------------------===// + +#ifndef ALPHAMACHINEFUNCTIONINFO_H +#define ALPHAMACHINEFUNCTIONINFO_H + +#include "llvm/CodeGen/MachineFunction.h" + +namespace llvm { + +/// AlphaMachineFunctionInfo - This class is derived from MachineFunction +/// private Alpha target-specific information for each MachineFunction. +class AlphaMachineFunctionInfo : public MachineFunctionInfo { + /// GlobalBaseReg - keeps track of the virtual register initialized for + /// use as the global base register. This is used for PIC in some PIC + /// relocation models. + unsigned GlobalBaseReg; + + /// GlobalRetAddr = keeps track of the virtual register initialized for + /// the return address value. + unsigned GlobalRetAddr; + +public: + AlphaMachineFunctionInfo() : GlobalBaseReg(0), GlobalRetAddr(0) {} + + AlphaMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0), + GlobalRetAddr(0) {} + + unsigned getGlobalBaseReg() const { return GlobalBaseReg; } + void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } + + unsigned getGlobalRetAddr() const { return GlobalRetAddr; } + void setGlobalRetAddr(unsigned Reg) { GlobalRetAddr = Reg; } +}; + +} // End llvm namespace + +#endif |