LLVM API Documentation
00001 //==- SystemZMachineFuctionInfo.h - SystemZ 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 #ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H 00011 #define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H 00012 00013 #include "llvm/CodeGen/MachineFunction.h" 00014 00015 namespace llvm { 00016 00017 class SystemZMachineFunctionInfo : public MachineFunctionInfo { 00018 virtual void anchor(); 00019 unsigned LowSavedGPR; 00020 unsigned HighSavedGPR; 00021 unsigned VarArgsFirstGPR; 00022 unsigned VarArgsFirstFPR; 00023 unsigned VarArgsFrameIndex; 00024 unsigned RegSaveFrameIndex; 00025 bool ManipulatesSP; 00026 00027 public: 00028 explicit SystemZMachineFunctionInfo(MachineFunction &MF) 00029 : LowSavedGPR(0), HighSavedGPR(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0), 00030 VarArgsFrameIndex(0), RegSaveFrameIndex(0), ManipulatesSP(false) {} 00031 00032 // Get and set the first call-saved GPR that should be saved and restored 00033 // by this function. This is 0 if no GPRs need to be saved or restored. 00034 unsigned getLowSavedGPR() const { return LowSavedGPR; } 00035 void setLowSavedGPR(unsigned Reg) { LowSavedGPR = Reg; } 00036 00037 // Get and set the last call-saved GPR that should be saved and restored 00038 // by this function. 00039 unsigned getHighSavedGPR() const { return HighSavedGPR; } 00040 void setHighSavedGPR(unsigned Reg) { HighSavedGPR = Reg; } 00041 00042 // Get and set the number of fixed (as opposed to variable) arguments 00043 // that are passed in GPRs to this function. 00044 unsigned getVarArgsFirstGPR() const { return VarArgsFirstGPR; } 00045 void setVarArgsFirstGPR(unsigned GPR) { VarArgsFirstGPR = GPR; } 00046 00047 // Likewise FPRs. 00048 unsigned getVarArgsFirstFPR() const { return VarArgsFirstFPR; } 00049 void setVarArgsFirstFPR(unsigned FPR) { VarArgsFirstFPR = FPR; } 00050 00051 // Get and set the frame index of the first stack vararg. 00052 unsigned getVarArgsFrameIndex() const { return VarArgsFrameIndex; } 00053 void setVarArgsFrameIndex(unsigned FI) { VarArgsFrameIndex = FI; } 00054 00055 // Get and set the frame index of the register save area 00056 // (i.e. the incoming stack pointer). 00057 unsigned getRegSaveFrameIndex() const { return RegSaveFrameIndex; } 00058 void setRegSaveFrameIndex(unsigned FI) { RegSaveFrameIndex = FI; } 00059 00060 // Get and set whether the function directly manipulates the stack pointer, 00061 // e.g. through STACKSAVE or STACKRESTORE. 00062 bool getManipulatesSP() const { return ManipulatesSP; } 00063 void setManipulatesSP(bool MSP) { ManipulatesSP = MSP; } 00064 }; 00065 00066 } // end namespace llvm 00067 00068 #endif