1 //===- VEMachineFunctionInfo.h - VE Machine Function Info -------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 // This file declares VE specific per-machine-function information.
11 //===----------------------------------------------------------------------===//
12 #ifndef LLVM_LIB_TARGET_VE_VEMACHINEFUNCTIONINFO_H
13 #define LLVM_LIB_TARGET_VE_VEMACHINEFUNCTIONINFO_H
15 #include "llvm/CodeGen/MachineFunction.h"
19 class VEMachineFunctionInfo
: public MachineFunctionInfo
{
20 virtual void anchor();
23 Register GlobalBaseReg
;
25 /// VarArgsFrameOffset - Frame offset to start of varargs area.
26 int VarArgsFrameOffset
;
28 /// IsLeafProc - True if the function is a leaf procedure.
32 VEMachineFunctionInfo() : VarArgsFrameOffset(0), IsLeafProc(false) {}
33 VEMachineFunctionInfo(const Function
&F
, const TargetSubtargetInfo
*STI
)
34 : VarArgsFrameOffset(0), IsLeafProc(false) {}
37 clone(BumpPtrAllocator
&Allocator
, MachineFunction
&DestMF
,
38 const DenseMap
<MachineBasicBlock
*, MachineBasicBlock
*> &Src2DstMBB
)
41 Register
getGlobalBaseReg() const { return GlobalBaseReg
; }
42 void setGlobalBaseReg(Register Reg
) { GlobalBaseReg
= Reg
; }
44 int getVarArgsFrameOffset() const { return VarArgsFrameOffset
; }
45 void setVarArgsFrameOffset(int Offset
) { VarArgsFrameOffset
= Offset
; }
47 void setLeafProc(bool rhs
) { IsLeafProc
= rhs
; }
48 bool isLeafProc() const { return IsLeafProc
; }