LLVM  8.0.1
AVRMachineFunctionInfo.h
Go to the documentation of this file.
1 //===-- AVRMachineFuctionInfo.h - AVR 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 AVR-specific per-machine-function information.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_AVR_MACHINE_FUNCTION_INFO_H
15 #define LLVM_AVR_MACHINE_FUNCTION_INFO_H
16 
18 
19 namespace llvm {
20 
21 /// Contains AVR-specific information for each MachineFunction.
23  /// Indicates if a register has been spilled by the register
24  /// allocator.
25  bool HasSpills;
26 
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.
29  bool HasAllocas;
30 
31  /// Indicates if arguments passed using the stack are being
32  /// used inside the function.
33  bool HasStackArgs;
34 
35  /// Size of the callee-saved register portion of the
36  /// stack frame in bytes.
37  unsigned CalleeSavedFrameSize;
38 
39  /// FrameIndex for start of varargs area.
40  int VarArgsFrameIndex;
41 
42 public:
44  : HasSpills(false), HasAllocas(false), HasStackArgs(false),
45  CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
46 
48  : HasSpills(false), HasAllocas(false), HasStackArgs(false),
49  CalleeSavedFrameSize(0), VarArgsFrameIndex(0) {}
50 
51  bool getHasSpills() const { return HasSpills; }
52  void setHasSpills(bool B) { HasSpills = B; }
53 
54  bool getHasAllocas() const { return HasAllocas; }
55  void setHasAllocas(bool B) { HasAllocas = B; }
56 
57  bool getHasStackArgs() const { return HasStackArgs; }
58  void setHasStackArgs(bool B) { HasStackArgs = B; }
59 
60  unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
61  void setCalleeSavedFrameSize(unsigned Bytes) { CalleeSavedFrameSize = Bytes; }
62 
63  int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
64  void setVarArgsFrameIndex(int Idx) { VarArgsFrameIndex = Idx; }
65 };
66 
67 } // end llvm namespace
68 
69 #endif // LLVM_AVR_MACHINE_FUNCTION_INFO_H
This class represents lattice values for constants.
Definition: AllocatorList.h:24
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
Contains AVR-specific information for each MachineFunction.
void setCalleeSavedFrameSize(unsigned Bytes)
AVRMachineFunctionInfo(MachineFunction &MF)