1*1c3f7f17SFangrui Song //===- llvm/lib/Target/X86/X86CallLowering.h - Call lowering ----*- C++ -*-===// 2*1c3f7f17SFangrui Song // 3*1c3f7f17SFangrui Song // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4*1c3f7f17SFangrui Song // See https://llvm.org/LICENSE.txt for license information. 5*1c3f7f17SFangrui Song // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6*1c3f7f17SFangrui Song // 7*1c3f7f17SFangrui Song //===----------------------------------------------------------------------===// 8*1c3f7f17SFangrui Song // 9*1c3f7f17SFangrui Song /// \file 10*1c3f7f17SFangrui Song /// This file describes how to lower LLVM calls to machine code calls. 11*1c3f7f17SFangrui Song // 12*1c3f7f17SFangrui Song //===----------------------------------------------------------------------===// 13*1c3f7f17SFangrui Song 14*1c3f7f17SFangrui Song #ifndef LLVM_LIB_TARGET_X86_X86CALLLOWERING_H 15*1c3f7f17SFangrui Song #define LLVM_LIB_TARGET_X86_X86CALLLOWERING_H 16*1c3f7f17SFangrui Song 17*1c3f7f17SFangrui Song #include "llvm/CodeGen/GlobalISel/CallLowering.h" 18*1c3f7f17SFangrui Song #include <functional> 19*1c3f7f17SFangrui Song 20*1c3f7f17SFangrui Song namespace llvm { 21*1c3f7f17SFangrui Song 22*1c3f7f17SFangrui Song template <typename T> class ArrayRef; 23*1c3f7f17SFangrui Song class X86TargetLowering; 24*1c3f7f17SFangrui Song 25*1c3f7f17SFangrui Song class X86CallLowering : public CallLowering { 26*1c3f7f17SFangrui Song public: 27*1c3f7f17SFangrui Song X86CallLowering(const X86TargetLowering &TLI); 28*1c3f7f17SFangrui Song 29*1c3f7f17SFangrui Song bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, 30*1c3f7f17SFangrui Song ArrayRef<Register> VRegs, 31*1c3f7f17SFangrui Song FunctionLoweringInfo &FLI) const override; 32*1c3f7f17SFangrui Song 33*1c3f7f17SFangrui Song bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, 34*1c3f7f17SFangrui Song ArrayRef<ArrayRef<Register>> VRegs, 35*1c3f7f17SFangrui Song FunctionLoweringInfo &FLI) const override; 36*1c3f7f17SFangrui Song 37*1c3f7f17SFangrui Song bool lowerCall(MachineIRBuilder &MIRBuilder, 38*1c3f7f17SFangrui Song CallLoweringInfo &Info) const override; 39*1c3f7f17SFangrui Song 40*1c3f7f17SFangrui Song bool canLowerReturn(MachineFunction &MF, CallingConv::ID CallConv, 41*1c3f7f17SFangrui Song SmallVectorImpl<BaseArgInfo> &Outs, 42*1c3f7f17SFangrui Song bool IsVarArg) const override; 43*1c3f7f17SFangrui Song }; 44*1c3f7f17SFangrui Song 45*1c3f7f17SFangrui Song } // end namespace llvm 46*1c3f7f17SFangrui Song 47*1c3f7f17SFangrui Song #endif // LLVM_LIB_TARGET_X86_X86CALLLOWERING_H 48