LLVM 20.0.0git
CSKYMachineFunctionInfo.h
Go to the documentation of this file.
1//=- CSKYMachineFunctionInfo.h - CSKY 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 CSKY-specific per-machine-function information.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
15
17
18namespace llvm {
19
21 Register GlobalBaseReg = 0;
22 bool SpillsCR = false;
23
24 int VarArgsFrameIndex = 0;
25 unsigned VarArgsSaveSize = 0;
26
27 int spillAreaSize = 0;
28
29 bool LRSpilled = false;
30
31 unsigned PICLabelUId = 0;
32
33public:
35
39 const override {
40 return DestMF.cloneInfo<CSKYMachineFunctionInfo>(*this);
41 }
42
43 Register getGlobalBaseReg() const { return GlobalBaseReg; }
44 void setGlobalBaseReg(Register Reg) { GlobalBaseReg = Reg; }
45
46 void setSpillsCR() { SpillsCR = true; }
47 bool isCRSpilled() const { return SpillsCR; }
48
49 void setVarArgsFrameIndex(int v) { VarArgsFrameIndex = v; }
50 int getVarArgsFrameIndex() { return VarArgsFrameIndex; }
51
52 unsigned getVarArgsSaveSize() const { return VarArgsSaveSize; }
53 void setVarArgsSaveSize(int Size) { VarArgsSaveSize = Size; }
54
55 bool isLRSpilled() const { return LRSpilled; }
56 void setLRIsSpilled(bool s) { LRSpilled = s; }
57
58 void setCalleeSaveAreaSize(int v) { spillAreaSize = v; }
59 int getCalleeSaveAreaSize() const { return spillAreaSize; }
60
61 unsigned createPICLabelUId() { return ++PICLabelUId; }
62 void initPICLabelUId(unsigned UId) { PICLabelUId = UId; }
63};
64
65} // namespace llvm
66
67#endif // LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
uint64_t Size
#define F(x, y, z)
Definition: MD5.cpp:55
unsigned Reg
Basic Register Allocator
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:66
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
CSKYMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
Ty * cloneInfo(const Ty &Old)
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
TargetSubtargetInfo - Generic base class for all target subtargets.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...