LLVM  8.0.1
ARCMachineFunctionInfo.h
Go to the documentation of this file.
1 //===- ARCMachineFunctionInfo.h - ARC 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 ARC-specific per-machine-function information.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
15 #define LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
16 
18 #include <vector>
19 
20 namespace llvm {
21 
22 /// ARCFunctionInfo - This class is derived from MachineFunction private
23 /// ARC target-specific information for each MachineFunction.
25  virtual void anchor();
26  bool ReturnStackOffsetSet;
27  int VarArgsFrameIndex;
28  unsigned ReturnStackOffset;
29 
30 public:
32  : ReturnStackOffsetSet(false), VarArgsFrameIndex(0),
33  ReturnStackOffset(-1U), MaxCallStackReq(0) {}
34 
36  : ReturnStackOffsetSet(false), VarArgsFrameIndex(0),
37  ReturnStackOffset(-1U), MaxCallStackReq(0) {
38  // Functions are 4-byte (2**2) aligned.
39  MF.setAlignment(2);
40  }
41 
43 
44  void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
45  int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
46 
47  void setReturnStackOffset(unsigned value) {
48  assert(!ReturnStackOffsetSet && "Return stack offset set twice");
49  ReturnStackOffset = value;
50  ReturnStackOffsetSet = true;
51  }
52 
53  unsigned getReturnStackOffset() const {
54  assert(ReturnStackOffsetSet && "Return stack offset not set");
55  return ReturnStackOffset;
56  }
57 
58  unsigned MaxCallStackReq;
59 };
60 
61 } // end namespace llvm
62 
63 #endif // LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
ARCFunctionInfo - This class is derived from MachineFunction private ARC target-specific information ...
This class represents lattice values for constants.
Definition: AllocatorList.h:24
ARCFunctionInfo(MachineFunction &MF)
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
void setReturnStackOffset(unsigned value)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
unsigned getReturnStackOffset() const
void setAlignment(unsigned A)
setAlignment - Set the alignment (log2, not bytes) of the function.