LLVM  16.0.0git
RISCVMachineFunctionInfo.cpp
Go to the documentation of this file.
1 //=- RISCVMachineFunctionInfo.cpp - RISCV 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 RISCV-specific per-machine-function information.
10 //
11 //===----------------------------------------------------------------------===//
12 
14 
15 using namespace llvm;
16 
19  : VarArgsFrameIndex(MFI.getVarArgsFrameIndex()),
20  VarArgsSaveSize(MFI.getVarArgsSaveSize()) {}
21 
25  const {
26  return DestMF.cloneInfo<RISCVMachineFunctionInfo>(*this);
27 }
28 
31 }
32 
34  const yaml::RISCVMachineFunctionInfo &YamlMFI) {
37 }
38 
40  SExt32Registers.push_back(Reg);
41 }
42 
44  return is_contained(SExt32Registers, Reg);
45 }
llvm::RISCVMachineFunctionInfo::clone
MachineFunctionInfo * clone(BumpPtrAllocator &Allocator, MachineFunction &DestMF, const DenseMap< MachineBasicBlock *, MachineBasicBlock * > &Src2DstMBB) const override
Make a functionally equivalent copy of this MachineFunctionInfo in MF.
Definition: RISCVMachineFunctionInfo.cpp:22
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
llvm::X86Disassembler::Reg
Reg
All possible values of the reg field in the ModR/M byte.
Definition: X86DisassemblerDecoder.h:462
YamlIO
IO & YamlIO
Definition: ELFYAML.cpp:1250
llvm::yaml::MappingTraits
Definition: ModuleSummaryIndex.h:53
llvm::yaml::RISCVMachineFunctionInfo::VarArgsFrameIndex
int VarArgsFrameIndex
Definition: RISCVMachineFunctionInfo.h:27
llvm::yaml::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo
RISCVMachineFunctionInfo()=default
llvm::yaml::RISCVMachineFunctionInfo::VarArgsSaveSize
int VarArgsSaveSize
Definition: RISCVMachineFunctionInfo.h:28
llvm::BumpPtrAllocatorImpl
Allocate memory in an ever growing pool, as if by bump-pointer.
Definition: Allocator.h:63
llvm::DenseMap
Definition: DenseMap.h:714
llvm::RISCVMachineFunctionInfo
RISCVMachineFunctionInfo - This class is derived from MachineFunctionInfo and contains private RISCV-...
Definition: RISCVMachineFunctionInfo.h:47
llvm::is_contained
bool is_contained(R &&Range, const E &Element)
Wrapper function around std::find to detect if an element exists in a container.
Definition: STLExtras.h:1868
llvm::MachineFunction
Definition: MachineFunction.h:257
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
llvm::MachineFunction::cloneInfo
Ty * cloneInfo(const Ty &Old)
Definition: MachineFunction.h:766
llvm::yaml::RISCVMachineFunctionInfo
Definition: RISCVMachineFunctionInfo.h:26
llvm::RISCVMachineFunctionInfo::isSExt32Register
bool isSExt32Register(Register Reg) const
Definition: RISCVMachineFunctionInfo.cpp:43
llvm::yaml::RISCVMachineFunctionInfo::mappingImpl
void mappingImpl(yaml::IO &YamlIO) override
Definition: RISCVMachineFunctionInfo.cpp:29
Allocator
Basic Register Allocator
Definition: RegAllocBasic.cpp:143
llvm::RISCVMachineFunctionInfo::initializeBaseYamlFields
void initializeBaseYamlFields(const yaml::RISCVMachineFunctionInfo &YamlMFI)
Definition: RISCVMachineFunctionInfo.cpp:33
RISCVMachineFunctionInfo.h
llvm::RISCVMachineFunctionInfo::addSExt32Register
void addSExt32Register(Register Reg)
Definition: RISCVMachineFunctionInfo.cpp:39
llvm::MachineFunctionInfo
MachineFunctionInfo - This class can be derived from and used by targets to hold private target-speci...
Definition: MachineFunction.h:95