LLVM  17.0.0git
ARCMachineFunctionInfo.h
Go to the documentation of this file.
1 //===- ARCMachineFunctionInfo.h - ARC machine function info -----*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares ARC-specific per-machine-function information.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
15 
17 #include <vector>
18 
19 namespace llvm {
20 
21 /// ARCFunctionInfo - This class is derived from MachineFunction private
22 /// ARC target-specific information for each MachineFunction.
24  virtual void anchor();
25  bool ReturnStackOffsetSet;
26  int VarArgsFrameIndex;
27  unsigned ReturnStackOffset;
28 
29 public:
30  explicit ARCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
31  : ReturnStackOffsetSet(false), VarArgsFrameIndex(0),
32  ReturnStackOffset(-1U), MaxCallStackReq(0) {}
34 
38  const override;
39 
40  void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
41  int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
42 
43  void setReturnStackOffset(unsigned value) {
44  assert(!ReturnStackOffsetSet && "Return stack offset set twice");
45  ReturnStackOffset = value;
46  ReturnStackOffsetSet = true;
47  }
48 
49  unsigned getReturnStackOffset() const {
50  assert(ReturnStackOffsetSet && "Return stack offset not set");
51  return ReturnStackOffset;
52  }
53 
54  unsigned MaxCallStackReq;
55 };
56 
57 } // end namespace llvm
58 
59 #endif // LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::Function
Definition: Function.h:59
llvm::ARCFunctionInfo::clone
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Definition: ARCMachineFunctionInfo.cpp:16
llvm::ARCFunctionInfo::ARCFunctionInfo
ARCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
Definition: ARCMachineFunctionInfo.h:30
F
#define F(x, y, z)
Definition: MD5.cpp:55
false
Definition: StackSlotColoring.cpp:141
llvm::ARCFunctionInfo::getVarArgsFrameIndex
int getVarArgsFrameIndex() const
Definition: ARCMachineFunctionInfo.h:41
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:63
llvm::DenseMap
Definition: DenseMap.h:714
llvm::ARCFunctionInfo::MaxCallStackReq
unsigned MaxCallStackReq
Definition: ARCMachineFunctionInfo.h:54
assert
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
llvm::MachineFunction
Definition: MachineFunction.h:258
llvm::ARCFunctionInfo::getReturnStackOffset
unsigned getReturnStackOffset() const
Definition: ARCMachineFunctionInfo.h:49
llvm::TargetSubtargetInfo
TargetSubtargetInfo - Generic base class for all target subtargets.
Definition: TargetSubtargetInfo.h:62
llvm::ARCFunctionInfo::~ARCFunctionInfo
~ARCFunctionInfo()
Definition: ARCMachineFunctionInfo.h:33
Allocator
Basic Register Allocator
Definition: RegAllocBasic.cpp:143
llvm::ARCFunctionInfo::setVarArgsFrameIndex
void setVarArgsFrameIndex(int off)
Definition: ARCMachineFunctionInfo.h:40
MachineFunction.h
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95
llvm::ARCFunctionInfo
ARCFunctionInfo - This class is derived from MachineFunction private ARC target-specific information ...
Definition: ARCMachineFunctionInfo.h:23
llvm::ARCFunctionInfo::setReturnStackOffset
void setReturnStackOffset(unsigned value)
Definition: ARCMachineFunctionInfo.h:43