LLVM 24.0.0git
SparcMachineFunctionInfo.h
Go to the documentation of this file.
1//===- SparcMachineFunctionInfo.h - Sparc 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 Sparc specific per-machine-function information.
10//
11//===----------------------------------------------------------------------===//
12#ifndef LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H
13#define LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H
14
16
17namespace llvm {
18
20 virtual void anchor();
21 private:
22 Register GlobalBaseReg;
23
24 /// VarArgsFrameOffset - Frame offset to start of varargs area.
25 int VarArgsFrameOffset;
26
27 /// SRetReturnReg - Holds the virtual register into which the sret
28 /// argument is passed.
29 Register SRetReturnReg;
30
31 /// IsLeafProc - True if the function is a leaf procedure.
32 bool IsLeafProc;
33
34 /// IsLeafProc - True if the function is larger than the coverage of `ba`
35 /// instruction.
36 bool IsLargeProc = false;
37
38 /// BranchRelaxationSpillFrameIndex - FrameIndex of the spill slot when
39 /// there is no scavenged register in insertIndirectBranch.
40 int BranchRelaxationSpillFrameIndex = -1;
41
42 public:
44 : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),
45 IsLeafProc(false) {}
47 : GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),
48 IsLeafProc(false) {}
49
53 const override;
54
55 Register getGlobalBaseReg() const { return GlobalBaseReg; }
56 void setGlobalBaseReg(Register Reg) { GlobalBaseReg = Reg; }
57
58 int getVarArgsFrameOffset() const { return VarArgsFrameOffset; }
59 void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; }
60
61 Register getSRetReturnReg() const { return SRetReturnReg; }
62 void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }
63
64 void setLeafProc(bool rhs) { IsLeafProc = rhs; }
65 bool isLeafProc() const { return IsLeafProc; }
66
67 void setLargeProc(bool rhs) { IsLargeProc = rhs; }
68 bool isLargeProc() const { return IsLargeProc; }
69
71 return BranchRelaxationSpillFrameIndex;
72 }
74 BranchRelaxationSpillFrameIndex = Index;
75 }
76 };
77}
78
79#endif
#define F(x, y, z)
Definition MD5.cpp:54
Register Reg
Basic Register Allocator
Wrapper class representing virtual and physical registers.
Definition Register.h:20
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
SparcMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
TargetSubtargetInfo - Generic base class for all target subtargets.
This is an optimization pass for GlobalISel generic memory operations.
@ Offset
Definition DWP.cpp:577
BumpPtrAllocatorImpl<> BumpPtrAllocator
The standard BumpPtrAllocator which just uses the default template parameters.
Definition Allocator.h:391
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...