LLVM 22.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
18namespace llvm {
19
20/// ARCFunctionInfo - This class is derived from MachineFunction private
21/// ARC target-specific information for each MachineFunction.
23 virtual void anchor();
24 bool ReturnStackOffsetSet;
25 int VarArgsFrameIndex;
26 unsigned ReturnStackOffset;
27
28public:
29 explicit ARCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
30 : ReturnStackOffsetSet(false), VarArgsFrameIndex(0),
31 ReturnStackOffset(-1U), MaxCallStackReq(0) {}
33
37 const override;
38
39 void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }
40 int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }
41
42 void setReturnStackOffset(unsigned value) {
43 assert(!ReturnStackOffsetSet && "Return stack offset set twice");
44 ReturnStackOffset = value;
45 ReturnStackOffsetSet = true;
46 }
47
48 unsigned getReturnStackOffset() const {
49 assert(ReturnStackOffsetSet && "Return stack offset not set");
50 return ReturnStackOffset;
51 }
52
54};
55
56} // end namespace llvm
57
58#endif // LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
#define F(x, y, z)
Definition MD5.cpp:55
Basic Register Allocator
void setReturnStackOffset(unsigned value)
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
ARCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
unsigned getReturnStackOffset() const
TargetSubtargetInfo - Generic base class for all target subtargets.
This is an optimization pass for GlobalISel generic memory operations.
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:383
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...