Path: blob/main/contrib/llvm-project/llvm/lib/Target/BPF/GISel/BPFCallLowering.cpp
35294 views
//===-- BPFCallLowering.cpp - Call lowering for GlobalISel ------*- C++ -*-===//1//2// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.3// See https://llvm.org/LICENSE.txt for license information.4// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception5//6//===----------------------------------------------------------------------===//7///8/// \file9/// This file implements the lowering of LLVM calls to machine code calls for10/// GlobalISel.11///12//===----------------------------------------------------------------------===//1314#include "BPFCallLowering.h"15#include "llvm/CodeGen/GlobalISel/MachineIRBuilder.h"16#include "llvm/Support/Debug.h"1718#define DEBUG_TYPE "bpf-call-lowering"1920using namespace llvm;2122BPFCallLowering::BPFCallLowering(const BPFTargetLowering &TLI)23: CallLowering(&TLI) {}2425bool BPFCallLowering::lowerReturn(MachineIRBuilder &MIRBuilder,26const Value *Val, ArrayRef<Register> VRegs,27FunctionLoweringInfo &FLI,28Register SwiftErrorVReg) const {29if (!VRegs.empty())30return false;31MIRBuilder.buildInstr(BPF::RET);32return true;33}3435bool BPFCallLowering::lowerFormalArguments(MachineIRBuilder &MIRBuilder,36const Function &F,37ArrayRef<ArrayRef<Register>> VRegs,38FunctionLoweringInfo &FLI) const {39return VRegs.empty();40}4142bool BPFCallLowering::lowerCall(MachineIRBuilder &MIRBuilder,43CallLoweringInfo &Info) const {44return false;45}464748