Path: blob/main/contrib/llvm-project/llvm/lib/Target/MSP430/MSP430MachineFunctionInfo.h
35266 views
//=== MSP430MachineFunctionInfo.h - MSP430 machine function info -*- C++ -*-==//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7//8// This file declares MSP430-specific per-machine-function information.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H13#define LLVM_LIB_TARGET_MSP430_MSP430MACHINEFUNCTIONINFO_H1415#include "llvm/CodeGen/MachineFunction.h"1617namespace llvm {1819/// MSP430MachineFunctionInfo - This class is derived from MachineFunction and20/// contains private MSP430 target-specific information for each MachineFunction.21class MSP430MachineFunctionInfo : public MachineFunctionInfo {22virtual void anchor();2324/// CalleeSavedFrameSize - Size of the callee-saved register portion of the25/// stack frame in bytes.26unsigned CalleeSavedFrameSize = 0;2728/// ReturnAddrIndex - FrameIndex for return slot.29int ReturnAddrIndex = 0;3031/// VarArgsFrameIndex - FrameIndex for start of varargs area.32int VarArgsFrameIndex = 0;3334/// SRetReturnReg - Some subtargets require that sret lowering includes35/// returning the value of the returned struct in a register. This field36/// holds the virtual register into which the sret argument is passed.37Register SRetReturnReg;3839public:40MSP430MachineFunctionInfo() = default;4142MSP430MachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)43: CalleeSavedFrameSize(0), ReturnAddrIndex(0), SRetReturnReg(0) {}4445MachineFunctionInfo *46clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,47const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)48const override;4950unsigned getCalleeSavedFrameSize() const { return CalleeSavedFrameSize; }51void setCalleeSavedFrameSize(unsigned bytes) { CalleeSavedFrameSize = bytes; }5253Register getSRetReturnReg() const { return SRetReturnReg; }54void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }5556int getRAIndex() const { return ReturnAddrIndex; }57void setRAIndex(int Index) { ReturnAddrIndex = Index; }5859int getVarArgsFrameIndex() const { return VarArgsFrameIndex;}60void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }61};6263} // End llvm namespace6465#endif666768