[ORC] Add std::tuple support to SimplePackedSerialization.
[llvm-project.git] / llvm / lib / Target / RISCV / RISCVCallLowering.cpp
blobd265f3a12b7ff678a519d8cf0da4e99028d4f1e9
1 //===-- RISCVCallLowering.cpp - Call lowering -------------------*- 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 /// \file
10 /// This file implements the lowering of LLVM calls to machine code calls for
11 /// GlobalISel.
13 //===----------------------------------------------------------------------===//
15 #include "RISCVCallLowering.h"
16 #include "RISCVISelLowering.h"
17 #include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"
19 using namespace llvm;
21 RISCVCallLowering::RISCVCallLowering(const RISCVTargetLowering &TLI)
22 : CallLowering(&TLI) {}
24 bool RISCVCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,
25 const Value *Val, ArrayRef<Register> VRegs,
26 FunctionLoweringInfo &FLI) const {
28 MachineInstrBuilder Ret = MIRBuilder.buildInstrNoInsert(RISCV::PseudoRET);
30 if (Val != nullptr) {
31 return false;
33 MIRBuilder.insertInstr(Ret);
34 return true;
37 bool RISCVCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,
38 const Function &F,
39 ArrayRef<ArrayRef<Register>> VRegs,
40 FunctionLoweringInfo &FLI) const {
42 if (F.arg_empty())
43 return true;
45 return false;
48 bool RISCVCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,
49 CallLoweringInfo &Info) const {
50 return false;