Path: blob/main/contrib/llvm-project/llvm/lib/Target/ARC/ARCMachineFunctionInfo.h
35267 views
//===- ARCMachineFunctionInfo.h - ARC 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 ARC-specific per-machine-function information.9//10//===----------------------------------------------------------------------===//1112#ifndef LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H13#define LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H1415#include "llvm/CodeGen/MachineFunction.h"16#include <vector>1718namespace llvm {1920/// ARCFunctionInfo - This class is derived from MachineFunction private21/// ARC target-specific information for each MachineFunction.22class ARCFunctionInfo : public MachineFunctionInfo {23virtual void anchor();24bool ReturnStackOffsetSet;25int VarArgsFrameIndex;26unsigned ReturnStackOffset;2728public:29explicit ARCFunctionInfo(const Function &F, const TargetSubtargetInfo *STI)30: ReturnStackOffsetSet(false), VarArgsFrameIndex(0),31ReturnStackOffset(-1U), MaxCallStackReq(0) {}32~ARCFunctionInfo() {}3334MachineFunctionInfo *35clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF,36const DenseMap<MachineBasicBlock *, MachineBasicBlock *> &Src2DstMBB)37const override;3839void setVarArgsFrameIndex(int off) { VarArgsFrameIndex = off; }40int getVarArgsFrameIndex() const { return VarArgsFrameIndex; }4142void setReturnStackOffset(unsigned value) {43assert(!ReturnStackOffsetSet && "Return stack offset set twice");44ReturnStackOffset = value;45ReturnStackOffsetSet = true;46}4748unsigned getReturnStackOffset() const {49assert(ReturnStackOffsetSet && "Return stack offset not set");50return ReturnStackOffset;51}5253unsigned MaxCallStackReq;54};5556} // end namespace llvm5758#endif // LLVM_LIB_TARGET_ARC_ARCMACHINEFUNCTIONINFO_H596061