Path: blob/main/contrib/llvm-project/llvm/lib/Target/Sparc/SparcMachineFunctionInfo.h
35269 views
//===- SparcMachineFunctionInfo.h - Sparc 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 Sparc specific per-machine-function information.9//10//===----------------------------------------------------------------------===//11#ifndef LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H12#define LLVM_LIB_TARGET_SPARC_SPARCMACHINEFUNCTIONINFO_H1314#include "llvm/CodeGen/MachineFunction.h"1516namespace llvm {1718class SparcMachineFunctionInfo : public MachineFunctionInfo {19virtual void anchor();20private:21Register GlobalBaseReg;2223/// VarArgsFrameOffset - Frame offset to start of varargs area.24int VarArgsFrameOffset;2526/// SRetReturnReg - Holds the virtual register into which the sret27/// argument is passed.28Register SRetReturnReg;2930/// IsLeafProc - True if the function is a leaf procedure.31bool IsLeafProc;32public:33SparcMachineFunctionInfo()34: GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),35IsLeafProc(false) {}36SparcMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)37: GlobalBaseReg(0), VarArgsFrameOffset(0), SRetReturnReg(0),38IsLeafProc(false) {}3940MachineFunctionInfo *41clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,42const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)43const override;4445Register getGlobalBaseReg() const { return GlobalBaseReg; }46void setGlobalBaseReg(Register Reg) { GlobalBaseReg = Reg; }4748int getVarArgsFrameOffset() const { return VarArgsFrameOffset; }49void setVarArgsFrameOffset(int Offset) { VarArgsFrameOffset = Offset; }5051Register getSRetReturnReg() const { return SRetReturnReg; }52void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }5354void setLeafProc(bool rhs) { IsLeafProc = rhs; }55bool isLeafProc() const { return IsLeafProc; }56};57}5859#endif606162