LLVM  13.0.0git
ARMCallLowering.h
Go to the documentation of this file.
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"
19 #include "llvm/IR/CallingConv.h"
20 #include <cstdint>
21 #include <functional>
22 
23 namespace llvm {
24 
25 class ARMTargetLowering;
26 class MachineFunction;
27 class MachineInstrBuilder;
28 class MachineIRBuilder;
29 class Value;
30 
31 class ARMCallLowering : public CallLowering {
32 public:
34 
35  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
36  ArrayRef<Register> VRegs,
37  FunctionLoweringInfo &FLI) const override;
38 
39  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
41  FunctionLoweringInfo &FLI) const override;
42 
43  bool lowerCall(MachineIRBuilder &MIRBuilder,
44  CallLoweringInfo &Info) const override;
45 
46 private:
47  bool lowerReturnVal(MachineIRBuilder &MIRBuilder, const Value *Val,
48  ArrayRef<Register> VRegs,
49  MachineInstrBuilder &Ret) const;
50 };
51 
52 } // end namespace llvm
53 
54 #endif // LLVM_LIB_TARGET_ARM_ARMCALLLOWERING_H
llvm
Definition: AllocatorList.h:23
CallLowering.h
llvm::Function
Definition: Function.h:61
llvm::ARMTargetLowering
Definition: ARMISelLowering.h:381
llvm::MipsISD::Ret
@ Ret
Definition: MipsISelLowering.h:116
F
#define F(x, y, z)
Definition: MD5.cpp:56
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::ARMCallLowering::lowerFormalArguments
bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< ArrayRef< Register >> VRegs, FunctionLoweringInfo &FLI) const override
This hook must be implemented to lower the incoming (formal) arguments, described by VRegs,...
Definition: ARMCallLowering.cpp:361
llvm::MachineIRBuilder
Helper class to build MachineInstr.
Definition: MachineIRBuilder.h:220
llvm::MachineInstrBuilder
Definition: MachineInstrBuilder.h:69
ArrayRef.h
llvm::FunctionLoweringInfo
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Definition: FunctionLoweringInfo.h:53
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ARMCallLowering::lowerCall
bool lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const override
This hook must be implemented to lower the given call instruction, including argument and return valu...
Definition: ARMCallLowering.cpp:452
CallingConv.h
llvm::TargetStackID::Value
Value
Definition: TargetFrameLowering.h:27
llvm::CallLowering::CallLoweringInfo
Definition: CallLowering.h:95
llvm::ARMCallLowering
Definition: ARMCallLowering.h:31
llvm::ARMCallLowering::lowerReturn
bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI) const override
This hook behaves as the extended lowerReturn function, but for targets that do not support swifterro...
Definition: ARMCallLowering.cpp:209
llvm::CallLowering
Definition: CallLowering.h:43
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::ARMCallLowering::ARMCallLowering
ARMCallLowering(const ARMTargetLowering &TLI)
Definition: ARMCallLowering.cpp:52