LLVM API Documentation
00001 //====- AlphaMachineFuctionInfo.h - Alpha machine function info -*- C++ -*-===// 00002 // 00003 // The LLVM Compiler Infrastructure 00004 // 00005 // This file is distributed under the University of Illinois Open Source 00006 // License. See LICENSE.TXT for details. 00007 // 00008 //===----------------------------------------------------------------------===// 00009 // 00010 // This file declares Alpha-specific per-machine-function information. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef ALPHAMACHINEFUNCTIONINFO_H 00015 #define ALPHAMACHINEFUNCTIONINFO_H 00016 00017 #include "llvm/CodeGen/MachineFunction.h" 00018 00019 namespace llvm { 00020 00021 /// AlphaMachineFunctionInfo - This class is derived from MachineFunction 00022 /// private Alpha target-specific information for each MachineFunction. 00023 class AlphaMachineFunctionInfo : public MachineFunctionInfo { 00024 /// GlobalBaseReg - keeps track of the virtual register initialized for 00025 /// use as the global base register. This is used for PIC in some PIC 00026 /// relocation models. 00027 unsigned GlobalBaseReg; 00028 00029 /// GlobalRetAddr = keeps track of the virtual register initialized for 00030 /// the return address value. 00031 unsigned GlobalRetAddr; 00032 00033 public: 00034 AlphaMachineFunctionInfo() : GlobalBaseReg(0), GlobalRetAddr(0) {} 00035 00036 explicit AlphaMachineFunctionInfo(MachineFunction &MF) : GlobalBaseReg(0), 00037 GlobalRetAddr(0) {} 00038 00039 unsigned getGlobalBaseReg() const { return GlobalBaseReg; } 00040 void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; } 00041 00042 unsigned getGlobalRetAddr() const { return GlobalRetAddr; } 00043 void setGlobalRetAddr(unsigned Reg) { GlobalRetAddr = Reg; } 00044 }; 00045 00046 } // End llvm namespace 00047 00048 #endif