summaryrefslogtreecommitdiffstats
path: root/lib/Target/Alpha/AlphaMachineFunctionInfo.h
diff options
context:
space:
mode:
authored <ed@FreeBSD.org>2009-06-03 21:10:15 +0000
committered <ed@FreeBSD.org>2009-06-03 21:10:15 +0000
commit1941b8772a36a33c7b86cb67163cd735b3d57221 (patch)
treedb103e2a0755ab86f18c181a2d208a6a63284c97 /lib/Target/Alpha/AlphaMachineFunctionInfo.h
parent036fdcfb2d357cecb320b5a6fd05f4859a63aeba (diff)
downloadFreeBSD-src-1941b8772a36a33c7b86cb67163cd735b3d57221.zip
FreeBSD-src-1941b8772a36a33c7b86cb67163cd735b3d57221.tar.gz
Import LLVM, at r72805, which fixes PR4315 and PR4316.
Normally I'm not updating sources this often, but I want to get rid of this breakage, because right now I can't offer a proper source snapshot yet.
Diffstat (limited to 'lib/Target/Alpha/AlphaMachineFunctionInfo.h')
-rw-r--r--lib/Target/Alpha/AlphaMachineFunctionInfo.h48
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 0000000..47de5df
--- /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
OpenPOWER on IntegriCloud