LLVM  14.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 
22 namespace llvm {
23 
24 class M68kTargetLowering;
25 
27  // TODO: We are only supporting return instruction with no value at this time
28  // point
29 
30 public:
32 
33  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
35  Register SwiftErrorVReg) const override;
36 
37  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
39  FunctionLoweringInfo &FLI) const override;
40 
41  bool lowerCall(MachineIRBuilder &MIRBuilder,
42  CallLoweringInfo &Info) const override;
43 
44  bool enableBigEndian() const override;
45 };
50 
52 
53 private:
54  void assignValueToReg(Register ValVReg, Register PhysReg,
55  CCValAssign VA) override;
56 
57  void assignValueToAddress(Register ValVReg, Register Addr, LLT MemTy,
58  MachinePointerInfo &MPO, CCValAssign &VA) override;
59 
60  Register getStackAddress(uint64_t Size, int64_t Offset,
61  MachinePointerInfo &MPO,
62  ISD::ArgFlagsTy Flags) override;
63 };
64 
68 };
69 
70 } // end namespace llvm
71 
72 #endif // LLVM_LIB_TARGET_M68K_GLSEL_M68KCALLLOWERING_H
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
ValueTypes.h
llvm
This file implements support for optimizing divisions by a constant.
Definition: AllocatorList.h:23
llvm::M68kIncomingValueHandler
Definition: M68kCallLowering.h:46
CallLowering.h
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition: MachineRegisterInfo.h:52
llvm::Function
Definition: Function.h:62
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::M68kCallLowering::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: M68kCallLowering.cpp:147
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::M68kCallLowering::enableBigEndian
bool enableBigEndian() const override
For targets which want to use big-endian can enable it with enableBigEndian() hook.
Definition: M68kCallLowering.cpp:152
llvm::CCValAssign
CCValAssign - Represent assignment of one arg/retval to a location.
Definition: CallingConvLower.h:33
llvm::CallLowering::IncomingValueHandler::IncomingValueHandler
IncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: CallLowering.h:315
llvm::FormalArgHandler
Definition: M68kCallLowering.h:65
llvm::CallLowering::IncomingValueHandler
Base class for ValueHandlers used for arguments coming into the current function, or for return value...
Definition: CallLowering.h:314
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::MachineIRBuilder
Helper class to build MachineInstr.
Definition: MachineIRBuilder.h:212
uint64_t
llvm::M68kIncomingValueHandler::M68kIncomingValueHandler
M68kIncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: M68kCallLowering.h:47
Addr
uint64_t Addr
Definition: ELFObjHandler.cpp:80
llvm::MachinePointerInfo
This class contains a discriminated union of information about pointers in memory operands,...
Definition: MachineMemOperand.h:38
llvm::FunctionLoweringInfo
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Definition: FunctionLoweringInfo.h:52
llvm::M68kCallLowering::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: M68kCallLowering.cpp:84
llvm::ArrayRef
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
Definition: APInt.h:32
llvm::ISD::ArgFlagsTy
Definition: TargetCallingConv.h:27
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
CallingConvLower.h
llvm::CallLowering::ValueHandler::MRI
MachineRegisterInfo & MRI
Definition: CallLowering.h:227
llvm::M68kTargetLowering
Definition: M68kISelLowering.h:116
llvm::M68kCallLowering::lowerReturn
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...
Definition: M68kCallLowering.cpp:55
llvm::CallLowering::CallLoweringInfo
Definition: CallLowering.h:101
llvm::CallLowering::ValueHandler::MIRBuilder
MachineIRBuilder & MIRBuilder
Definition: CallLowering.h:226
llvm::M68kCallLowering
Definition: M68kCallLowering.h:26
llvm::M68kCallLowering::M68kCallLowering
M68kCallLowering(const M68kTargetLowering &TLI)
Definition: M68kCallLowering.cpp:27
llvm::M68kIncomingValueHandler::StackUsed
uint64_t StackUsed
Definition: M68kCallLowering.h:51
llvm::CallLowering
Definition: CallLowering.h:43
llvm::Value
LLVM Value Representation.
Definition: Value.h:74
llvm::FormalArgHandler::FormalArgHandler
FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: M68kCallLowering.h:66
llvm::LLT
Definition: LowLevelTypeImpl.h:40