1 //===-- RISCVCallLowering.h - Call lowering ---------------------*- C++ -*-===//
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
7 //===----------------------------------------------------------------------===//
10 /// This file describes how to lower LLVM calls to machine code calls.
12 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
15 #define LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
17 #include "llvm/CodeGen/CallingConvLower.h"
18 #include "llvm/CodeGen/GlobalISel/CallLowering.h"
19 #include "llvm/CodeGen/ValueTypes.h"
23 class RISCVTargetLowering
;
25 class RISCVCallLowering
: public CallLowering
{
28 RISCVCallLowering(const RISCVTargetLowering
&TLI
);
30 bool lowerReturn(MachineIRBuilder
&MIRBuiler
, const Value
*Val
,
31 ArrayRef
<Register
> VRegs
) const override
;
33 bool lowerFormalArguments(MachineIRBuilder
&MIRBuilder
, const Function
&F
,
34 ArrayRef
<ArrayRef
<Register
>> VRegs
) const override
;
36 bool lowerCall(MachineIRBuilder
&MIRBuilder
,
37 CallLoweringInfo
&Info
) const override
;
40 } // end namespace llvm
42 #endif // LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H