1//===- llvm/lib/Target/ARM/ARMCallLowering.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_ARM_ARMCALLLOWERING_H
15#define LLVM_LIB_TARGET_ARM_ARMCALLLOWERING_H
16
17#include "llvm/ADT/ArrayRef.h"
18#include "llvm/CodeGen/GlobalISel/CallLowering.h"
19#include "llvm/IR/CallingConv.h"
20#include <cstdint>
21#include <functional>
22
23namespace llvm {
24
25class ARMTargetLowering;
26class MachineInstrBuilder;
27class MachineIRBuilder;
28class Value;
29
30class ARMCallLowering : public CallLowering {
31public:
32 ARMCallLowering(const ARMTargetLowering &TLI);
33
34 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
35 ArrayRef<Register> VRegs,
36 FunctionLoweringInfo &FLI) const override;
37
38 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
39 ArrayRef<ArrayRef<Register>> VRegs,
40 FunctionLoweringInfo &FLI) const override;
41
42 bool lowerCall(MachineIRBuilder &MIRBuilder,
43 CallLoweringInfo &Info) const override;
44
45private:
46 bool lowerReturnVal(MachineIRBuilder &MIRBuilder, const Value *Val,
47 ArrayRef<Register> VRegs,
48 MachineInstrBuilder &Ret) const;
49};
50
51} // end namespace llvm
52
53#endif // LLVM_LIB_TARGET_ARM_ARMCALLLOWERING_H
54

source code of llvm/lib/Target/ARM/ARMCallLowering.h