Path: blob/main/contrib/llvm-project/llvm/lib/Target/CSKY/CSKYMachineFunctionInfo.h
35266 views
//=- CSKYMachineFunctionInfo.h - CSKY 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 CSKY-specific per-machine-function information.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H13#define LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H1415#include "llvm/CodeGen/MachineFunction.h"1617namespace llvm {1819class CSKYMachineFunctionInfo : public MachineFunctionInfo {20Register GlobalBaseReg = 0;21bool SpillsCR = false;2223int VarArgsFrameIndex = 0;24unsigned VarArgsSaveSize = 0;2526int spillAreaSize = 0;2728bool LRSpilled = false;2930unsigned PICLabelUId = 0;3132public:33CSKYMachineFunctionInfo(const Function &F, const TargetSubtargetInfo *STI) {}3435MachineFunctionInfo *36clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,37const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)38const override {39return DestMF.cloneInfo<CSKYMachineFunctionInfo>(*this);40}4142Register getGlobalBaseReg() const { return GlobalBaseReg; }43void setGlobalBaseReg(Register Reg) { GlobalBaseReg = Reg; }4445void setSpillsCR() { SpillsCR = true; }46bool isCRSpilled() const { return SpillsCR; }4748void setVarArgsFrameIndex(int v) { VarArgsFrameIndex = v; }49int getVarArgsFrameIndex() { return VarArgsFrameIndex; }5051unsigned getVarArgsSaveSize() const { return VarArgsSaveSize; }52void setVarArgsSaveSize(int Size) { VarArgsSaveSize = Size; }5354bool isLRSpilled() const { return LRSpilled; }55void setLRIsSpilled(bool s) { LRSpilled = s; }5657void setCalleeSaveAreaSize(int v) { spillAreaSize = v; }58int getCalleeSaveAreaSize() const { return spillAreaSize; }5960unsigned createPICLabelUId() { return ++PICLabelUId; }61void initPICLabelUId(unsigned UId) { PICLabelUId = UId; }62};6364} // namespace llvm6566#endif // LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H676869