LLVM API Documentation

SparcMachineFunctionInfo.h
Go to the documentation of this file.
00001 //===- SparcMachineFunctionInfo.h - Sparc 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  Sparc specific per-machine-function information.
00011 //
00012 //===----------------------------------------------------------------------===//
00013 #ifndef LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H
00014 #define LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H
00015 
00016 #include "llvm/CodeGen/MachineFunction.h"
00017 
00018 namespace llvm {
00019 
00020   class SparcMachineFunctionInfo : public MachineFunctionInfo {
00021     virtual void anchor();
00022   private:
00023     unsigned GlobalBaseReg;
00024 
00025     /// VarArgsFrameOffset - Frame offset to start of varargs area.
00026     int VarArgsFrameOffset;
00027 
00028     /// SRetReturnReg - Holds the virtual register into which the sret
00029     /// argument is passed.
00030     unsigned SRetReturnReg;
00031 
00032     /// IsLeafProc - True if the function is a leaf procedure.
00033     bool IsLeafProc;
00034   public:
00035     SparcMachineFunctionInfo()
00036       : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),
00037         IsLeafProc(false) {}
00038     explicit SparcMachineFunctionInfo(MachineFunction &MF)
00039       : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),
00040         IsLeafProc(false) {}
00041 
00042     unsigned getGlobalBaseReg() const { return GlobalBaseReg; }
00043     void setGlobalBaseReg(unsigned Reg) { GlobalBaseReg = Reg; }
00044 
00045     int getVarArgsFrameOffset() const { return VarArgsFrameOffset; }
00046     void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; }
00047 
00048     unsigned getSRetReturnReg() const { return SRetReturnReg; }
00049     void setSRetReturnReg(unsigned Reg) { SRetReturnReg = Reg; }
00050 
00051     void setLeafProc(bool rhs) { IsLeafProc = rhs; }
00052     bool isLeafProc() const { return IsLeafProc; }
00053   };
00054 }
00055 
00056 #endif