LLVM 22.0.0git
RISCVCallLowering.h
Go to the documentation of this file.
1//===-- RISCVCallLowering.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_RISCV_RISCVCALLLOWERING_H
15#define LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
16
19
20namespace llvm {
21
25
27
28public:
30
31 bool lowerReturn(MachineIRBuilder &MIRBuiler, const Value *Val,
33 FunctionLoweringInfo &FLI) const override;
34
37 bool IsVarArg) 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
46private:
47 void saveVarArgRegisters(MachineIRBuilder &MIRBuilder,
49 IncomingValueAssigner &Assigner,
50 CCState &CCInfo) const;
51};
52
53} // end namespace llvm
54
55#endif // LLVM_LIB_TARGET_RISCV_RISCVCALLLOWERING_H
Analysis containing CSE Info
Definition CSEInfo.cpp:27
This file describes how to lower LLVM calls to machine code calls.
#define F(x, y, z)
Definition MD5.cpp:55
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition ArrayRef.h:41
CCState - This class holds information needed while lowering arguments and return values.
CallLowering(const TargetLowering *TLI)
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Helper class to build MachineInstr.
bool lowerReturn(MachineIRBuilder &MIRBuiler, 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...
bool canLowerReturn(MachineFunction &MF, CallingConv::ID CallConv, SmallVectorImpl< BaseArgInfo > &Outs, bool IsVarArg) const override
This hook must be implemented to check whether the return values described by Outs can fit into the r...
bool lowerCall(MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const override
This hook must be implemented to lower the given call instruction, including argument and return valu...
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,...
RISCVCallLowering(const RISCVTargetLowering &TLI)
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
LLVM Value Representation.
Definition Value.h:75
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
Definition CallingConv.h:24
This is an optimization pass for GlobalISel generic memory operations.
Base class for ValueHandlers used for arguments coming into the current function, or for return value...