1//===- llvm/lib/Target/X86/X86CallLowering.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_X86_X86CALLLOWERING_H
15#define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
16
17#include "llvm/CodeGen/GlobalISel/CallLowering.h"
18#include <functional>
19
20namespace llvm {
21
22template <typename T> class ArrayRef;
23class X86TargetLowering;
24
25class X86CallLowering : public CallLowering {
26public:
27 X86CallLowering(const X86TargetLowering &TLI);
28
29 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
30 ArrayRef<Register> VRegs,
31 FunctionLoweringInfo &FLI) const override;
32
33 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
34 ArrayRef<ArrayRef<Register>> VRegs,
35 FunctionLoweringInfo &FLI) const override;
36
37 bool lowerCall(MachineIRBuilder &MIRBuilder,
38 CallLoweringInfo &Info) const override;
39
40 bool canLowerReturn(MachineFunction &MF, CallingConv::ID CallConv,
41 SmallVectorImpl<BaseArgInfo> &Outs,
42 bool IsVarArg) const override;
43};
44
45} // end namespace llvm
46
47#endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H
48