LLVM  14.0.0git
PPCCallLowering.h
Go to the documentation of this file.
1 //===-- PPCCallLowering.h - Call lowering for GlobalISel -------*- 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_POWERPC_GISEL_PPCCALLLOWERING_H
15 #define LLVM_LIB_TARGET_POWERPC_GISEL_PPCCALLLOWERING_H
16 
17 #include "PPCISelLowering.h"
19 #include "llvm/IR/CallingConv.h"
20 
21 namespace llvm {
22 
23 class PPCTargetLowering;
24 
25 class PPCCallLowering : public CallLowering {
26 public:
28 
29  bool lowerReturn(MachineIRBuilder &MIRBuilder, const Value *Val,
31  Register SwiftErrorVReg) const override;
32  bool lowerFormalArguments(MachineIRBuilder &MIRBuilder, const Function &F,
34  FunctionLoweringInfo &FLI) const override;
35  bool lowerCall(MachineIRBuilder &MIRBuilder,
36  CallLoweringInfo &Info) const override;
37 };
38 
40 public:
44 
46 
47 private:
48  void assignValueToReg(Register ValVReg, Register PhysReg,
49  CCValAssign &VA) override;
50 
51  void assignValueToAddress(Register ValVReg, Register Addr, LLT MemTy,
52  MachinePointerInfo &MPO, CCValAssign &VA) override;
53 
54  Register getStackAddress(uint64_t Size, int64_t Offset,
55  MachinePointerInfo &MPO,
56  ISD::ArgFlagsTy Flags) override;
57 
58  virtual void markPhysRegUsed(unsigned PhysReg) = 0;
59 };
60 
62 
63  void markPhysRegUsed(unsigned PhysReg) override;
64 
65 public:
68 };
69 
70 } // end namespace llvm
71 
72 #endif
llvm::Check::Size
@ Size
Definition: FileCheck.h:73
llvm
---------------------— PointerInfo ------------------------------------—
Definition: AllocatorList.h:23
CallLowering.h
llvm::MachineRegisterInfo
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
Definition: MachineRegisterInfo.h:52
llvm::Function
Definition: Function.h:61
llvm::PPCCallLowering::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: PPCCallLowering.cpp:45
Offset
uint64_t Offset
Definition: ELFObjHandler.cpp:81
llvm::PPCIncomingValueHandler
Definition: PPCCallLowering.h:39
llvm::PPCIncomingValueHandler::StackUsed
uint64_t StackUsed
Definition: PPCCallLowering.h:45
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::CCValAssign
CCValAssign - Represent assignment of one arg/retval to a location.
Definition: CallingConvLower.h:33
llvm::PPCIncomingValueHandler::PPCIncomingValueHandler
PPCIncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: PPCCallLowering.h:41
llvm::CallLowering::IncomingValueHandler::IncomingValueHandler
IncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: CallLowering.h:312
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:311
Info
Analysis containing CSE Info
Definition: CSEInfo.cpp:27
llvm::MachineIRBuilder
Helper class to build MachineInstr.
Definition: MachineIRBuilder.h:212
uint64_t
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:53
llvm::PPCTargetLowering
Definition: PPCISelLowering.h:726
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::PPCCallLowering::PPCCallLowering
PPCCallLowering(const PPCTargetLowering &TLI)
Definition: PPCCallLowering.cpp:29
llvm::PPCCallLowering::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: PPCCallLowering.cpp:32
llvm::Register
Wrapper class representing virtual and physical registers.
Definition: Register.h:19
CallingConv.h
llvm::PPCCallLowering::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: PPCCallLowering.cpp:50
llvm::CallLowering::ValueHandler::MRI
MachineRegisterInfo & MRI
Definition: CallLowering.h:227
llvm::CallLowering::CallLoweringInfo
Definition: CallLowering.h:101
llvm::CallLowering::ValueHandler::MIRBuilder
MachineIRBuilder & MIRBuilder
Definition: CallLowering.h:226
PPCISelLowering.h
llvm::PPCCallLowering
Definition: PPCCallLowering.h:25
llvm::CallLowering
Definition: CallLowering.h:43
llvm::Value
LLVM Value Representation.
Definition: Value.h:75
llvm::FormalArgHandler::FormalArgHandler
FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: PPCCallLowering.h:66
llvm::LLT
Definition: LowLevelTypeImpl.h:40