1 //====- PIC16MachineFuctionInfo.h - PIC16 machine function info -*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // This file declares PIC16-specific per-machine-function information.
12 //===----------------------------------------------------------------------===//
14 #ifndef PIC16MACHINEFUNCTIONINFO_H
15 #define PIC16MACHINEFUNCTIONINFO_H
17 #include "llvm/CodeGen/MachineFunction.h"
21 /// PIC16MachineFunctionInfo - This class is derived from MachineFunction
22 /// private PIC16 target-specific information for each MachineFunction.
23 class PIC16MachineFunctionInfo : public MachineFunctionInfo {
24 // The frameindexes generated for spill/reload are stack based.
25 // This maps maintain zero based indexes for these FIs.
26 std::map<unsigned, unsigned> FiTmpOffsetMap;
29 // These are the frames for return value and argument passing
30 // These FrameIndices will be expanded to foo.frame external symbol
31 // and all others will be expanded to foo.tmp external symbol.
32 unsigned ReservedFrameCount;
35 PIC16MachineFunctionInfo()
36 : TmpSize(0), ReservedFrameCount(0) {}
38 explicit PIC16MachineFunctionInfo(MachineFunction &MF)
39 : TmpSize(0), ReservedFrameCount(0) {}
41 std::map<unsigned, unsigned> &getFiTmpOffsetMap() { return FiTmpOffsetMap; }
43 unsigned getTmpSize() const { return TmpSize; }
44 void setTmpSize(unsigned Size) { TmpSize = Size; }
46 unsigned getReservedFrameCount() const { return ReservedFrameCount; }
47 void setReservedFrameCount(unsigned Count) { ReservedFrameCount = Count; }
50 } // End llvm namespace