40 lines · c
1//===-- BPFCallLowering.h - Call lowering for GlobalISel --------*- 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-exception6//7//===----------------------------------------------------------------------===//8///9/// \file10/// This file describes how to lower LLVM calls to machine code calls.11///12//===----------------------------------------------------------------------===//13 14#ifndef LLVM_LIB_TARGET_BPF_GISEL_BPFCALLLOWERING_H15#define LLVM_LIB_TARGET_BPF_GISEL_BPFCALLLOWERING_H16 17#include "BPFISelLowering.h"18#include "llvm/CodeGen/GlobalISel/CallLowering.h"19#include "llvm/IR/CallingConv.h"20 21namespace llvm {22 23class BPFTargetLowering;24 25class BPFCallLowering : public CallLowering {26public:27 BPFCallLowering(const BPFTargetLowering &TLI);28 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,29 ArrayRef<Register> VRegs, FunctionLoweringInfo &FLI,30 Register SwiftErrorVReg) const override;31 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,32 ArrayRef<ArrayRef<Register>> VRegs,33 FunctionLoweringInfo &FLI) const override;34 bool lowerCall(MachineIRBuilder &MIRBuilder,35 CallLoweringInfo &Info) const override;36};37} // namespace llvm38 39#endif40