LLVM 20.0.0git
M68kCallLowering.h
Go to the documentation of this file.
1//===-- M68kCallLowering.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 implements the lowering of LLVM calls to machine code calls for
11/// GlobalISel.
12//
13//===----------------------------------------------------------------------===//
14
15#ifndef LLVM_LIB_TARGET_M68K_GLSEL_M68KCALLLOWERING_H
16#define LLVM_LIB_TARGET_M68K_GLSEL_M68KCALLLOWERING_H
17
21
22namespace llvm {
23
24class M68kTargetLowering;
25class MachineInstrBuilder;
26
28 // TODO: We are only supporting return instruction with no value at this time
29 // point
30
31public:
33
34 bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
36 Register SwiftErrorVReg) const override;
37
38 bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
40 FunctionLoweringInfo &FLI) const override;
41
42 bool lowerCall(MachineIRBuilder &MIRBuilder,
43 CallLoweringInfo &Info) const override;
44
45 bool enableBigEndian() const override;
46};
51
53
54private:
55 void assignValueToReg(Register ValVReg, Register PhysReg,
56 const CCValAssign &VA) override;
57
58 void assignValueToAddress(Register ValVReg, Register Addr, LLT MemTy,
59 const MachinePointerInfo &MPO,
60 const CCValAssign &VA) override;
61
62 Register getStackAddress(uint64_t Size, int64_t Offset,
64 ISD::ArgFlagsTy Flags) override;
65};
66} // end namespace llvm
67
68#endif // LLVM_LIB_TARGET_M68K_GLSEL_M68KCALLLOWERING_H
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
This file describes how to lower LLVM calls to machine code calls.
uint64_t Addr
uint64_t Size
#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
CCValAssign - Represent assignment of one arg/retval to a location.
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
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,...
bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI, Register SwiftErrorVReg) const override
This hook must be implemented to lower outgoing return values, described by Val, into the specified v...
bool enableBigEndian() const override
For targets which want to use big-endian can enable it with enableBigEndian() hook.
Helper class to build MachineInstr.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
LLVM Value Representation.
Definition: Value.h:74
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
@ Offset
Definition: DWP.cpp:480
Base class for ValueHandlers used for arguments coming into the current function, or for return value...
Definition: CallLowering.h:331
IncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: CallLowering.h:332
MachineRegisterInfo & MRI
Definition: CallLowering.h:244
M68kIncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
This class contains a discriminated union of information about pointers in memory operands,...