LLVM 20.0.0git
|
Base class for ValueHandlers used for arguments coming into the current function, or for return values received from a call. More...
#include "llvm/CodeGen/GlobalISel/CallLowering.h"
Public Member Functions | |
IncomingValueHandler (MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI) | |
Register | buildExtensionHint (const CCValAssign &VA, Register SrcReg, LLT NarrowTy) |
Insert G_ASSERT_ZEXT/G_ASSERT_SEXT or other hint instruction based on VA , returning the new register if a hint was inserted. | |
void | assignValueToReg (Register ValVReg, Register PhysReg, const CCValAssign &VA) override |
Provides a default implementation for argument handling. | |
Public Member Functions inherited from llvm::CallLowering::ValueHandler | |
ValueHandler (bool IsIncoming, MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI) | |
virtual | ~ValueHandler ()=default |
bool | isIncomingArgumentHandler () const |
Returns true if the handler is dealing with incoming arguments, i.e. | |
virtual Register | getStackAddress (uint64_t MemSize, int64_t Offset, MachinePointerInfo &MPO, ISD::ArgFlagsTy Flags)=0 |
Materialize a VReg containing the address of the specified stack-based object. | |
virtual LLT | getStackValueStoreType (const DataLayout &DL, const CCValAssign &VA, ISD::ArgFlagsTy Flags) const |
Return the in-memory size to write for the argument at VA . | |
virtual void | assignValueToReg (Register ValVReg, Register PhysReg, const CCValAssign &VA)=0 |
The specified value has been assigned to a physical register, handle the appropriate COPY (either to or from) and mark any relevant uses/defines as needed. | |
virtual void | assignValueToAddress (Register ValVReg, Register Addr, LLT MemTy, const MachinePointerInfo &MPO, const CCValAssign &VA)=0 |
The specified value has been assigned to a stack location. | |
virtual void | assignValueToAddress (const ArgInfo &Arg, unsigned ValRegIndex, Register Addr, LLT MemTy, const MachinePointerInfo &MPO, const CCValAssign &VA) |
An overload which takes an ArgInfo if additional information about the arg is needed. | |
virtual unsigned | assignCustomValue (ArgInfo &Arg, ArrayRef< CCValAssign > VAs, std::function< void()> *Thunk=nullptr) |
Handle custom values, which may be passed into one or more of VAs . | |
void | copyArgumentMemory (const ArgInfo &Arg, Register DstPtr, Register SrcPtr, const MachinePointerInfo &DstPtrInfo, Align DstAlign, const MachinePointerInfo &SrcPtrInfo, Align SrcAlign, uint64_t MemSize, CCValAssign &VA) const |
Do a memory copy of MemSize bytes from SrcPtr to DstPtr . | |
Register | extendRegister (Register ValReg, const CCValAssign &VA, unsigned MaxSizeBits=0) |
Extend a register to the location type given in VA, capped at extending to at most MaxSize bits. | |
Additional Inherited Members | |
Public Attributes inherited from llvm::CallLowering::ValueHandler | |
MachineIRBuilder & | MIRBuilder |
MachineRegisterInfo & | MRI |
const bool | IsIncomingArgumentHandler |
Base class for ValueHandlers used for arguments coming into the current function, or for return values received from a call.
Definition at line 331 of file CallLowering.h.
|
inline |
Definition at line 332 of file CallLowering.h.
|
overridevirtual |
Provides a default implementation for argument handling.
Implements llvm::CallLowering::ValueHandler.
Definition at line 1383 of file CallLowering.cpp.
References llvm::MachineIRBuilder::buildCopy(), llvm::MachineIRBuilder::buildTrunc(), llvm::CCValAssign::getLocVT(), isCopyCompatibleType(), and MRI.
Register CallLowering::IncomingValueHandler::buildExtensionHint | ( | const CCValAssign & | VA, |
Register | SrcReg, | ||
LLT | NarrowTy | ||
) |
Insert G_ASSERT_ZEXT/G_ASSERT_SEXT or other hint instruction based on VA
, returning the new register if a hint was inserted.
Definition at line 1342 of file CallLowering.cpp.
References llvm::MachineIRBuilder::buildAssertSExt(), llvm::MachineIRBuilder::buildAssertZExt(), llvm::CCValAssign::getLocInfo(), llvm::MachineInstrBuilder::getReg(), llvm::LLT::getScalarSizeInBits(), MRI, llvm::CCValAssign::SExt, and llvm::CCValAssign::ZExt.