LLVM API Documentation
00001 //====- XCoreMachineFuctionInfo.h - XCore 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 XCore-specific per-machine-function information. 00011 // 00012 //===----------------------------------------------------------------------===// 00013 00014 #ifndef XCOREMACHINEFUNCTIONINFO_H 00015 #define XCOREMACHINEFUNCTIONINFO_H 00016 00017 #include "llvm/CodeGen/MachineFunction.h" 00018 #include "llvm/CodeGen/MachineFrameInfo.h" 00019 #include <vector> 00020 00021 namespace llvm { 00022 00023 // Forward declarations 00024 class Function; 00025 00026 /// XCoreFunctionInfo - This class is derived from MachineFunction private 00027 /// XCore target-specific information for each MachineFunction. 00028 class XCoreFunctionInfo : public MachineFunctionInfo { 00029 private: 00030 bool UsesLR; 00031 int LRSpillSlot; 00032 int FPSpillSlot; 00033 int VarArgsFrameIndex; 00034 std::vector<std::pair<unsigned, CalleeSavedInfo> > SpillLabels; 00035 00036 public: 00037 XCoreFunctionInfo() : 00038 UsesLR(false), 00039 LRSpillSlot(0), 00040 FPSpillSlot(0), 00041 VarArgsFrameIndex(0) {} 00042 00043 XCoreFunctionInfo(MachineFunction &MF) : 00044 UsesLR(false), 00045 LRSpillSlot(0), 00046 FPSpillSlot(0), 00047 VarArgsFrameIndex(0) {} 00048 00049 ~XCoreFunctionInfo() {} 00050 00051 void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; } 00052 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; } 00053 00054 void setUsesLR(bool val) { UsesLR = val; } 00055 bool getUsesLR() const { return UsesLR; } 00056 00057 void setLRSpillSlot(int off) { LRSpillSlot = off; } 00058 int getLRSpillSlot() const { return LRSpillSlot; } 00059 00060 void setFPSpillSlot(int off) { FPSpillSlot = off; } 00061 int getFPSpillSlot() const { return FPSpillSlot; } 00062 00063 std::vector<std::pair<unsigned, CalleeSavedInfo> >&getSpillLabels() { 00064 return SpillLabels; 00065 } 00066 }; 00067 } // End llvm namespace 00068 00069 #endif // XCOREMACHINEFUNCTIONINFO_H