RISCVMachineFunctionInfo has some fields like VarArgsFrameIndex and VarArgsSaveSize are calculated at ISel lowering stage, those info are not contained in MIR files, that cause test cases rely on those field can't not reproduce correctly by MIR dump files. This patch adding the MIR read/write for those fields. Reviewed By: frasercrmck Differential Revision: https://reviews.llvm.org/D123178
31 lines
1.1 KiB
C++
31 lines
1.1 KiB
C++
//=- RISCVMachineFunctionInfo.cpp - RISCV machine function info ---*- C++ -*-=//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file declares RISCV-specific per-machine-function information.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "RISCVMachineFunctionInfo.h"
|
|
|
|
using namespace llvm;
|
|
|
|
yaml::RISCVMachineFunctionInfo::RISCVMachineFunctionInfo(
|
|
const llvm::RISCVMachineFunctionInfo &MFI)
|
|
: VarArgsFrameIndex(MFI.getVarArgsFrameIndex()),
|
|
VarArgsSaveSize(MFI.getVarArgsSaveSize()) {}
|
|
|
|
void yaml::RISCVMachineFunctionInfo::mappingImpl(yaml::IO &YamlIO) {
|
|
MappingTraits<RISCVMachineFunctionInfo>::mapping(YamlIO, *this);
|
|
}
|
|
|
|
void RISCVMachineFunctionInfo::initializeBaseYamlFields(
|
|
const yaml::RISCVMachineFunctionInfo &YamlMFI) {
|
|
VarArgsFrameIndex = YamlMFI.VarArgsFrameIndex;
|
|
VarArgsSaveSize = YamlMFI.VarArgsSaveSize;
|
|
}
|