1 //===-- RISCVCallLowering.h - 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 describes how to lower LLVM calls to machine code calls.
11 //
12 //===----------------------------------------------------------------------===//
13 
14 #ifndef LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
15 #define LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
16 
17 #include "llvm/CodeGen/CallingConvLower.h"
18 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
19 #include "llvm/CodeGen/ValueTypes.h"
20 
21 namespace llvm {
22 
23 class RISCVTargetLowering;
24 
25 class RISCVCallLowering : public CallLowering {
26 
27 public:
28   RISCVCallLowering(const RISCVTargetLowering &TLI);
29 
30   bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
31                    ArrayRef<Register> VRegs,
32                    FunctionLoweringInfo &FLI) const override;
33 
34   bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
35                             ArrayRef<ArrayRef<Register>> VRegs,
36                             FunctionLoweringInfo &FLI) const override;
37 
38   bool lowerCall(MachineIRBuilder &MIRBuilder,
39                  CallLoweringInfo &Info) const override;
40 };
41 
42 } // end namespace llvm
43 
44 #endif // LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
45