Change allowsUnalignedMemoryAccesses to take type argument since some targets
[llvm/avr.git] / lib / Target / XCore / XCoreMachineFunctionInfo.h
blob124a011f3cb83f96df4a6ba884f0673e0f9315c8
1 //====- XCoreMachineFuctionInfo.h - XCore machine function info -*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file declares XCore-specific per-machine-function information.
12 //===----------------------------------------------------------------------===//
14 #ifndef XCOREMACHINEFUNCTIONINFO_H
15 #define XCOREMACHINEFUNCTIONINFO_H
17 #include "llvm/CodeGen/MachineFunction.h"
18 #include "llvm/CodeGen/MachineFrameInfo.h"
19 #include <vector>
21 namespace llvm {
23 // Forward declarations
24 class Function;
26 /// XCoreFunctionInfo - This class is derived from MachineFunction private
27 /// XCore target-specific information for each MachineFunction.
28 class XCoreFunctionInfo : public MachineFunctionInfo {
29 private:
30 bool UsesLR;
31 int LRSpillSlot;
32 int FPSpillSlot;
33 int VarArgsFrameIndex;
34 std::vector<std::pair<unsigned, CalleeSavedInfo> > SpillLabels;
36 public:
37 XCoreFunctionInfo() :
38 UsesLR(false),
39 LRSpillSlot(0),
40 FPSpillSlot(0),
41 VarArgsFrameIndex(0) {}
43 explicit XCoreFunctionInfo(MachineFunction &MF) :
44 UsesLR(false),
45 LRSpillSlot(0),
46 FPSpillSlot(0),
47 VarArgsFrameIndex(0) {}
49 ~XCoreFunctionInfo() {}
51 void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
52 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
54 void setUsesLR(bool val) { UsesLR = val; }
55 bool getUsesLR() const { return UsesLR; }
57 void setLRSpillSlot(int off) { LRSpillSlot = off; }
58 int getLRSpillSlot() const { return LRSpillSlot; }
60 void setFPSpillSlot(int off) { FPSpillSlot = off; }
61 int getFPSpillSlot() const { return FPSpillSlot; }
63 std::vector<std::pair<unsigned, CalleeSavedInfo> >&getSpillLabels() {
64 return SpillLabels;
67 } // End llvm namespace
69 #endif // XCOREMACHINEFUNCTIONINFO_H