1 //===-- AVRMachineFuctionInfo.h - AVR 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 AVR-specific per-machine-function information.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_AVR_MACHINE_FUNCTION_INFO_H
15 #define LLVM_AVR_MACHINE_FUNCTION_INFO_H
17 #include "AVRConfig.h"
19 #include "llvm/CodeGen/MachineFunction.h"
24 * Contains AVR-specific information for each MachineFunction.
26 class AVRMachineFunctionInfo : public MachineFunctionInfo {
27 /// Indicates if a register has been spilled by the register
31 /// Indicates if there are any fixed size allocas present.
32 /// Note that if there are only variable sized allocas this is set to false.
35 /// Indicates if arguments passed using the stack are being
36 /// used inside the function.
39 /// Size of the callee-saved register portion of the
40 /// stack frame in bytes.
41 unsigned CalleeSavedFrameSize;
43 /// FrameIndex for start of varargs area.
44 int VarArgsFrameIndex;
47 AVRMachineFunctionInfo()
48 : HasSpills(false), HasAllocas(false), HasStackArgs(false),
49 CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
51 explicit AVRMachineFunctionInfo(MachineFunction &MF)
52 : HasSpills(false), HasAllocas(false), HasStackArgs(false),
53 CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
55 bool getHasSpills() const { return HasSpills; }
56 void setHasSpills(bool B) { HasSpills = B; }
58 bool getHasAllocas() const { return HasAllocas; }
59 void setHasAllocas(bool B) { HasAllocas = B; }
61 bool getHasStackArgs() const { return HasStackArgs; }
62 void setHasStackArgs(bool B) { HasStackArgs = B; }
64 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
65 void setCalleeSavedFrameSize(unsigned Bytes) { CalleeSavedFrameSize = Bytes; }
67 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
68 void setVarArgsFrameIndex(int Idx) { VarArgsFrameIndex = Idx; }
71 } // end llvm namespace
73 #endif // LLVM_AVR_MACHINE_FUNCTION_INFO_H