Movatterモバイル変換


[0]ホーム

URL:


LLVM 20.0.0git
SystemZMachineFunctionInfo.h
Go to the documentation of this file.
1//=== SystemZMachineFunctionInfo.h - SystemZ 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#ifndef LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H
10#define LLVM_LIB_TARGET_SYSTEMZ_SYSTEMZMACHINEFUNCTIONINFO_H
11
12#include "llvm/CodeGen/MachineFunction.h"
13
14namespacellvm {
15
16namespaceSystemZ {
17// A struct to hold the low and high GPR registers to be saved/restored as
18// well as the offset into the register save area of the low register.
19structGPRRegs {
20unsignedLowGPR = 0;
21unsignedHighGPR = 0;
22unsignedGPROffset = 0;
23GPRRegs() =default;
24 };
25}
26
27classSystemZMachineFunctionInfo :publicMachineFunctionInfo {
28virtualvoid anchor();
29
30 /// Size of expected parameter area for current function. (Fixed args only).
31unsigned SizeOfFnParams;
32
33SystemZ::GPRRegs SpillGPRRegs;
34SystemZ::GPRRegs RestoreGPRRegs;
35Register VarArgsFirstGPR;
36Register VarArgsFirstFPR;
37unsigned VarArgsFrameIndex;
38unsigned RegSaveFrameIndex;
39int FramePointerSaveIndex;
40unsigned NumLocalDynamics;
41 /// z/OS XPLINK ABI: incoming ADA virtual register.
42Register VRegADA;
43
44public:
45SystemZMachineFunctionInfo(constFunction &F,constTargetSubtargetInfo *STI)
46 : SizeOfFnParams(0), VarArgsFirstGPR(0), VarArgsFirstFPR(0),
47 VarArgsFrameIndex(0), RegSaveFrameIndex(0), FramePointerSaveIndex(0),
48 NumLocalDynamics(0) {}
49
50MachineFunctionInfo *
51clone(BumpPtrAllocator &Allocator,MachineFunction &DestMF,
52constDenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)
53const override;
54
55// z/OS: Get and set the size of the expected parameter area for the
56// current function. (ie. Size of param area in caller).
57unsignedgetSizeOfFnParams() const{return SizeOfFnParams; }
58voidsetSizeOfFnParams(unsignedSize) { SizeOfFnParams =Size; }
59
60// Get and set the first and last call-saved GPR that should be saved by
61// this function and the SP offset for the STMG. These are 0 if no GPRs
62// need to be saved or restored.
63SystemZ::GPRRegsgetSpillGPRRegs() const{return SpillGPRRegs; }
64voidsetSpillGPRRegs(RegisterLow,RegisterHigh,unsigned Offs) {
65 SpillGPRRegs.LowGPR =Low;
66 SpillGPRRegs.HighGPR =High;
67 SpillGPRRegs.GPROffset = Offs;
68 }
69
70// Get and set the first and last call-saved GPR that should be restored by
71// this function and the SP offset for the LMG. These are 0 if no GPRs
72// need to be saved or restored.
73SystemZ::GPRRegsgetRestoreGPRRegs() const{return RestoreGPRRegs; }
74voidsetRestoreGPRRegs(RegisterLow,RegisterHigh,unsigned Offs) {
75 RestoreGPRRegs.LowGPR =Low;
76 RestoreGPRRegs.HighGPR =High;
77 RestoreGPRRegs.GPROffset = Offs;
78 }
79
80// Get and set the number of fixed (as opposed to variable) arguments
81// that are passed in GPRs to this function.
82RegistergetVarArgsFirstGPR() const{return VarArgsFirstGPR; }
83voidsetVarArgsFirstGPR(Register GPR) { VarArgsFirstGPR = GPR; }
84
85// Likewise FPRs.
86RegistergetVarArgsFirstFPR() const{return VarArgsFirstFPR; }
87voidsetVarArgsFirstFPR(RegisterFPR) { VarArgsFirstFPR =FPR; }
88
89// Get and set the frame index of the first stack vararg.
90unsignedgetVarArgsFrameIndex() const{return VarArgsFrameIndex; }
91voidsetVarArgsFrameIndex(unsigned FI) { VarArgsFrameIndex = FI; }
92
93// Get and set the frame index of the register save area
94// (i.e. the incoming stack pointer).
95unsignedgetRegSaveFrameIndex() const{return RegSaveFrameIndex; }
96voidsetRegSaveFrameIndex(unsigned FI) { RegSaveFrameIndex = FI; }
97
98// Get and set the frame index of where the old frame pointer is stored.
99intgetFramePointerSaveIndex() const{return FramePointerSaveIndex; }
100voidsetFramePointerSaveIndex(intIdx) { FramePointerSaveIndex =Idx; }
101
102// Count number of local-dynamic TLS symbols used.
103unsignedgetNumLocalDynamicTLSAccesses() const{return NumLocalDynamics; }
104voidincNumLocalDynamicTLSAccesses() { ++NumLocalDynamics; }
105
106// Get and set the function's incoming special XPLINK ABI defined ADA
107// register.
108RegistergetADAVirtualRegister() const{return VRegADA; }
109voidsetADAVirtualRegister(RegisterReg) { VRegADA =Reg; }
110};
111
112}// end namespace llvm
113
114#endif
Idx
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
Definition:DeadArgumentElimination.cpp:353
Size
uint64_t Size
Definition:ELFObjHandler.cpp:81
F
#define F(x, y, z)
Definition:MD5.cpp:55
MachineFunction.h
Reg
unsigned Reg
Definition:MachineSink.cpp:2028
High
uint64_t High
Definition:NVVMIntrRange.cpp:51
FPR
static const MCPhysReg FPR[]
FPR - The set of FP registers that should be allocated for arguments on Darwin and AIX.
Definition:PPCISelLowering.cpp:4113
Allocator
Basic Register Allocator
Definition:RegAllocBasic.cpp:146
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition:Allocator.h:66
llvm::DenseMap
Definition:DenseMap.h:727
llvm::Function
Definition:Function.h:63
llvm::MachineFunction
Definition:MachineFunction.h:267
llvm::Register
Wrapper class representing virtual and physical registers.
Definition:Register.h:19
llvm::SystemZMachineFunctionInfo
Definition:SystemZMachineFunctionInfo.h:27
llvm::SystemZMachineFunctionInfo::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:SystemZMachineFunctionInfo.cpp:17
llvm::SystemZMachineFunctionInfo::getVarArgsFrameIndex
unsigned getVarArgsFrameIndex() const
Definition:SystemZMachineFunctionInfo.h:90
llvm::SystemZMachineFunctionInfo::setVarArgsFrameIndex
void setVarArgsFrameIndex(unsigned FI)
Definition:SystemZMachineFunctionInfo.h:91
llvm::SystemZMachineFunctionInfo::setRegSaveFrameIndex
void setRegSaveFrameIndex(unsigned FI)
Definition:SystemZMachineFunctionInfo.h:96
llvm::SystemZMachineFunctionInfo::incNumLocalDynamicTLSAccesses
void incNumLocalDynamicTLSAccesses()
Definition:SystemZMachineFunctionInfo.h:104
llvm::SystemZMachineFunctionInfo::getVarArgsFirstGPR
Register getVarArgsFirstGPR() const
Definition:SystemZMachineFunctionInfo.h:82
llvm::SystemZMachineFunctionInfo::getFramePointerSaveIndex
int getFramePointerSaveIndex() const
Definition:SystemZMachineFunctionInfo.h:99
llvm::SystemZMachineFunctionInfo::getRestoreGPRRegs
SystemZ::GPRRegs getRestoreGPRRegs() const
Definition:SystemZMachineFunctionInfo.h:73
llvm::SystemZMachineFunctionInfo::SystemZMachineFunctionInfo
SystemZMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
Definition:SystemZMachineFunctionInfo.h:45
llvm::SystemZMachineFunctionInfo::setADAVirtualRegister
void setADAVirtualRegister(Register Reg)
Definition:SystemZMachineFunctionInfo.h:109
llvm::SystemZMachineFunctionInfo::setRestoreGPRRegs
void setRestoreGPRRegs(Register Low, Register High, unsigned Offs)
Definition:SystemZMachineFunctionInfo.h:74
llvm::SystemZMachineFunctionInfo::setVarArgsFirstGPR
void setVarArgsFirstGPR(Register GPR)
Definition:SystemZMachineFunctionInfo.h:83
llvm::SystemZMachineFunctionInfo::setFramePointerSaveIndex
void setFramePointerSaveIndex(int Idx)
Definition:SystemZMachineFunctionInfo.h:100
llvm::SystemZMachineFunctionInfo::getADAVirtualRegister
Register getADAVirtualRegister() const
Definition:SystemZMachineFunctionInfo.h:108
llvm::SystemZMachineFunctionInfo::setSizeOfFnParams
void setSizeOfFnParams(unsigned Size)
Definition:SystemZMachineFunctionInfo.h:58
llvm::SystemZMachineFunctionInfo::getSpillGPRRegs
SystemZ::GPRRegs getSpillGPRRegs() const
Definition:SystemZMachineFunctionInfo.h:63
llvm::SystemZMachineFunctionInfo::setVarArgsFirstFPR
void setVarArgsFirstFPR(Register FPR)
Definition:SystemZMachineFunctionInfo.h:87
llvm::SystemZMachineFunctionInfo::setSpillGPRRegs
void setSpillGPRRegs(Register Low, Register High, unsigned Offs)
Definition:SystemZMachineFunctionInfo.h:64
llvm::SystemZMachineFunctionInfo::getRegSaveFrameIndex
unsigned getRegSaveFrameIndex() const
Definition:SystemZMachineFunctionInfo.h:95
llvm::SystemZMachineFunctionInfo::getNumLocalDynamicTLSAccesses
unsigned getNumLocalDynamicTLSAccesses() const
Definition:SystemZMachineFunctionInfo.h:103
llvm::SystemZMachineFunctionInfo::getSizeOfFnParams
unsigned getSizeOfFnParams() const
Definition:SystemZMachineFunctionInfo.h:57
llvm::SystemZMachineFunctionInfo::getVarArgsFirstFPR
Register getVarArgsFirstFPR() const
Definition:SystemZMachineFunctionInfo.h:86
llvm::TargetSubtargetInfo
TargetSubtargetInfo - Generic base class for all target subtargets.
Definition:TargetSubtargetInfo.h:63
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition:AddressRanges.h:18
llvm::ThreadPriority::Low
@ Low
Lower the current thread's priority such that it does not affect foreground tasks significantly.
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition:MachineFunction.h:104
llvm::SystemZ::GPRRegs
Definition:SystemZMachineFunctionInfo.h:19
llvm::SystemZ::GPRRegs::LowGPR
unsigned LowGPR
Definition:SystemZMachineFunctionInfo.h:20
llvm::SystemZ::GPRRegs::GPRRegs
GPRRegs()=default
llvm::SystemZ::GPRRegs::HighGPR
unsigned HighGPR
Definition:SystemZMachineFunctionInfo.h:21
llvm::SystemZ::GPRRegs::GPROffset
unsigned GPROffset
Definition:SystemZMachineFunctionInfo.h:22

Generated on Sun Jul 20 2025 12:41:04 for LLVM by doxygen 1.9.6
[8]ページ先頭

©2009-2025 Movatter.jp