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 "llvm/CodeGen/MachineFunction.h"
21 /// Contains AVR-specific information for each MachineFunction.
22 class AVRMachineFunctionInfo : public MachineFunctionInfo {
23 /// Indicates if a register has been spilled by the register
27 /// Indicates if there are any fixed size allocas present.
28 /// Note that if there are only variable sized allocas this is set to false.
31 /// Indicates if arguments passed using the stack are being
32 /// used inside the function.
35 /// Size of the callee-saved register portion of the
36 /// stack frame in bytes.
37 unsigned CalleeSavedFrameSize;
39 /// FrameIndex for start of varargs area.
40 int VarArgsFrameIndex;
43 AVRMachineFunctionInfo()
44 : HasSpills(false), HasAllocas(false), HasStackArgs(false),
45 CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
47 explicit AVRMachineFunctionInfo(MachineFunction &MF)
48 : HasSpills(false), HasAllocas(false), HasStackArgs(false),
49 CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
51 bool getHasSpills() const { return HasSpills; }
52 void setHasSpills(bool B) { HasSpills = B; }
54 bool getHasAllocas() const { return HasAllocas; }
55 void setHasAllocas(bool B) { HasAllocas = B; }
57 bool getHasStackArgs() const { return HasStackArgs; }
58 void setHasStackArgs(bool B) { HasStackArgs = B; }
60 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
61 void setCalleeSavedFrameSize(unsigned Bytes) { CalleeSavedFrameSize = Bytes; }
63 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
64 void setVarArgsFrameIndex(int Idx) { VarArgsFrameIndex = Idx; }
67 } // end llvm namespace
69 #endif // LLVM_AVR_MACHINE_FUNCTION_INFO_H