LLVM 20.0.0git
MSP430MachineFunctionInfo.h
Go to the documentation of this file.
1//=== MSP430MachineFunctionInfo.h - MSP430 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 MSP430-specific per-machine-function information.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
14#define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H
15
17
18namespace llvm {
19
20/// MSP430MachineFunctionInfo - This class is derived from MachineFunction and
21/// contains private MSP430 target-specific information for each MachineFunction.
23 virtual void anchor();
24
25 /// CalleeSavedFrameSize - Size of the callee-saved register portion of the
26 /// stack frame in bytes.
27 unsigned CalleeSavedFrameSize = 0;
28
29 /// ReturnAddrIndex - FrameIndex for return slot.
30 int ReturnAddrIndex = 0;
31
32 /// VarArgsFrameIndex - FrameIndex for start of varargs area.
33 int VarArgsFrameIndex = 0;
34
35 /// SRetReturnReg - Some subtargets require that sret lowering includes
36 /// returning the value of the returned struct in a register. This field
37 /// holds the virtual register into which the sret argument is passed.
38 Register SRetReturnReg;
39
40public:
42
44 : CalleeSavedFrameSize(0), ReturnAddrIndex(0), SRetReturnReg(0) {}
45
49 const override;
50
51 unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }
52 void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }
53
54 Register getSRetReturnReg() const { return SRetReturnReg; }
55 void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }
56
57 int getRAIndex() const { return ReturnAddrIndex; }
58 void setRAIndex(int Index) { ReturnAddrIndex = Index; }
59
60 int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}
61 void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }
62};
63
64} // End llvm namespace
65
66#endif
#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
MSP430MachineFunctionInfo - This class is derived from MachineFunction and contains private MSP430 ta...
MSP430MachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
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...