LLVM  15.0.0git
CSKYMachineFunctionInfo.h
Go to the documentation of this file.
1 //=- CSKYMachineFunctionInfo.h - CSKY machine function info -------*- C++ -*-=//
2 //
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
6 //
7 //===----------------------------------------------------------------------===//
8 //
9 // This file declares CSKY-specific per-machine-function information.
10 //
11 //===----------------------------------------------------------------------===//
12 
13 #ifndef LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
14 #define LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
15 
17 
18 namespace llvm {
19 
21  Register GlobalBaseReg = 0;
22  bool SpillsCR = false;
23 
24  int VarArgsFrameIndex = 0;
25  unsigned VarArgsSaveSize = 0;
26 
27  int spillAreaSize = 0;
28 
29  bool LRSpilled = false;
30 
31  unsigned PICLabelUId = 0;
32 
33 public:
35 
36  Register getGlobalBaseReg() const { return GlobalBaseReg; }
37  void setGlobalBaseReg(Register Reg) { GlobalBaseReg = Reg; }
38 
39  void setSpillsCR() { SpillsCR = true; }
40  bool isCRSpilled() const { return SpillsCR; }
41 
42  void setVarArgsFrameIndex(int v) { VarArgsFrameIndex = v; }
43  int getVarArgsFrameIndex() { return VarArgsFrameIndex; }
44 
45  unsigned getVarArgsSaveSize() const { return VarArgsSaveSize; }
46  void setVarArgsSaveSize(int Size) { VarArgsSaveSize = Size; }
47 
48  bool isLRSpilled() const { return LRSpilled; }
49  void setLRIsSpilled(bool s) { LRSpilled = s; }
50 
51  void setCalleeSaveAreaSize(int v) { spillAreaSize = v; }
52  int getCalleeSaveAreaSize() const { return spillAreaSize; }
53 
54  unsigned createPICLabelUId() { return ++PICLabelUId; }
55  void initPICLabelUId(unsigned UId) { PICLabelUId = UId; }
56 };
57 
58 } // namespace llvm
59 
60 #endif // LLVM_LIB_TARGET_CSKY_CSKYMACHINEFUNCTIONINFO_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:17
llvm::CSKYMachineFunctionInfo::setGlobalBaseReg
void setGlobalBaseReg(Register Reg)
Definition: CSKYMachineFunctionInfo.h:37
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
llvm::CSKYMachineFunctionInfo::setVarArgsSaveSize
void setVarArgsSaveSize(int Size)
Definition: CSKYMachineFunctionInfo.h:46
llvm::CSKYMachineFunctionInfo
Definition: CSKYMachineFunctionInfo.h:20
llvm::CSKYMachineFunctionInfo::isLRSpilled
bool isLRSpilled() const
Definition: CSKYMachineFunctionInfo.h:48
llvm::CSKYMachineFunctionInfo::getVarArgsSaveSize
unsigned getVarArgsSaveSize() const
Definition: CSKYMachineFunctionInfo.h:45
llvm::CSKYMachineFunctionInfo::setVarArgsFrameIndex
void setVarArgsFrameIndex(int v)
Definition: CSKYMachineFunctionInfo.h:42
llvm::CSKYMachineFunctionInfo::CSKYMachineFunctionInfo
CSKYMachineFunctionInfo(MachineFunction &)
Definition: CSKYMachineFunctionInfo.h:34
llvm::CSKYMachineFunctionInfo::getVarArgsFrameIndex
int getVarArgsFrameIndex()
Definition: CSKYMachineFunctionInfo.h:43
llvm::CSKYMachineFunctionInfo::isCRSpilled
bool isCRSpilled() const
Definition: CSKYMachineFunctionInfo.h:40
llvm::CSKYMachineFunctionInfo::setSpillsCR
void setSpillsCR()
Definition: CSKYMachineFunctionInfo.h:39
llvm::CSKYMachineFunctionInfo::setLRIsSpilled
void setLRIsSpilled(bool s)
Definition: CSKYMachineFunctionInfo.h:49
llvm::CSKYMachineFunctionInfo::initPICLabelUId
void initPICLabelUId(unsigned UId)
Definition: CSKYMachineFunctionInfo.h:55
s
multiplies can be turned into SHL s
Definition: README.txt:370
llvm::CSKYMachineFunctionInfo::getCalleeSaveAreaSize
int getCalleeSaveAreaSize() const
Definition: CSKYMachineFunctionInfo.h:52
llvm::CSKYMachineFunctionInfo::createPICLabelUId
unsigned createPICLabelUId()
Definition: CSKYMachineFunctionInfo.h:54
llvm::MachineFunction
Definition: MachineFunction.h:241
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::CSKYMachineFunctionInfo::getGlobalBaseReg
Register getGlobalBaseReg() const
Definition: CSKYMachineFunctionInfo.h:36
llvm::CSKYMachineFunctionInfo::setCalleeSaveAreaSize
void setCalleeSaveAreaSize(int v)
Definition: CSKYMachineFunctionInfo.h:51
MachineFunction.h
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95