Path: blob/main/contrib/llvm-project/llvm/lib/Target/Lanai/LanaiMachineFunctionInfo.h
35271 views
//===- LanaiMachineFuctionInfo.h - Lanai machine func 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 Lanai-specific per-machine-function information.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H13#define LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H1415#include "LanaiRegisterInfo.h"16#include "llvm/CodeGen/MachineFunction.h"17#include "llvm/CodeGen/MachineRegisterInfo.h"1819namespace llvm {2021// LanaiMachineFunctionInfo - This class is derived from MachineFunction and22// contains private Lanai target-specific information for each MachineFunction.23class LanaiMachineFunctionInfo : public MachineFunctionInfo {24virtual void anchor();2526// SRetReturnReg - Lanai ABI require that sret lowering includes27// returning the value of the returned struct in a register. This field28// holds the virtual register into which the sret argument is passed.29Register SRetReturnReg;3031// GlobalBaseReg - keeps track of the virtual register initialized for32// use as the global base register. This is used for PIC in some PIC33// relocation models.34Register GlobalBaseReg;3536// VarArgsFrameIndex - FrameIndex for start of varargs area.37int VarArgsFrameIndex;3839public:40LanaiMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)41: VarArgsFrameIndex(0) {}42MachineFunctionInfo *43clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,44const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)45const override;4647Register getSRetReturnReg() const { return SRetReturnReg; }48void setSRetReturnReg(Register Reg) { SRetReturnReg = Reg; }4950int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }51void setVarArgsFrameIndex(int Index) { VarArgsFrameIndex = Index; }52};5354} // namespace llvm5556#endif // LLVM_LIB_TARGET_LANAI_LANAIMACHINEFUNCTIONINFO_H575859