LLVM 19.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
21namespace llvm {
22
23class PPCTargetLowering;
24
26public:
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
40public:
44
46
47private:
48 void assignValueToReg(Register ValVReg, Register PhysReg,
49 const CCValAssign &VA) override;
50
51 void assignValueToAddress(Register ValVReg, Register Addr, LLT MemTy,
52 const MachinePointerInfo &MPO,
53 const CCValAssign &VA) override;
54
55 Register getStackAddress(uint64_t Size, int64_t Offset,
57 ISD::ArgFlagsTy Flags) override;
58
59 virtual void markPhysRegUsed(unsigned PhysReg) = 0;
60};
61
63
64 void markPhysRegUsed(unsigned PhysReg) override;
65
66public:
69};
70
71} // end namespace llvm
72
73#endif
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.
FormalArgHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
FunctionLoweringInfo - This contains information that is global to a function that is used when lower...
Helper class to build MachineInstr.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
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 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,...
PPCIncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
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:456
Base class for ValueHandlers used for arguments coming into the current function, or for return value...
Definition: CallLowering.h:323
IncomingValueHandler(MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
Definition: CallLowering.h:324
MachineRegisterInfo & MRI
Definition: CallLowering.h:236
This class contains a discriminated union of information about pointers in memory operands,...