LLVM
8.0.1
|
Argument handling is mostly uniform between the four places that make these decisions: function formal arguments, call instruction args, call instruction returns and function returns. More...
#include "llvm/CodeGen/GlobalISel/CallLowering.h"
Public Member Functions | |
ValueHandler (MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI, CCAssignFn *AssignFn) | |
virtual | ~ValueHandler ()=default |
virtual unsigned | getStackAddress (uint64_t Size, int64_t Offset, MachinePointerInfo &MPO)=0 |
Materialize a VReg containing the address of the specified stack-based object. More... | |
virtual void | assignValueToReg (unsigned ValVReg, unsigned PhysReg, 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. More... | |
virtual void | assignValueToAddress (unsigned ValVReg, unsigned Addr, uint64_t Size, MachinePointerInfo &MPO, CCValAssign &VA)=0 |
The specified value has been assigned to a stack location. More... | |
virtual unsigned | assignCustomValue (const ArgInfo &Arg, ArrayRef< CCValAssign > VAs) |
Handle custom values, which may be passed into one or more of VAs . More... | |
unsigned | extendRegister (unsigned ValReg, CCValAssign &VA) |
virtual bool | assignArg (unsigned ValNo, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, const ArgInfo &Info, CCState &State) |
Public Attributes | |
MachineIRBuilder & | MIRBuilder |
MachineRegisterInfo & | MRI |
CCAssignFn * | AssignFn |
Argument handling is mostly uniform between the four places that make these decisions: function formal arguments, call instruction args, call instruction returns and function returns.
However, once a decision has been made on where an arugment should go, exactly what happens can vary slightly. This class abstracts the differences.
Definition at line 62 of file CallLowering.h.
|
inline |
Definition at line 63 of file CallLowering.h.
References Size.
|
virtualdefault |
|
inlinevirtual |
Definition at line 103 of file CallLowering.h.
References llvm::CallLowering::ArgInfo::Flags.
Referenced by llvm::CallLowering::handleAssignments().
|
inlinevirtual |
Handle custom values, which may be passed into one or more of VAs
.
VAs
that have been assigned after the first one, and which should therefore be skipped from further processing. Definition at line 94 of file CallLowering.h.
References llvm_unreachable.
Referenced by llvm::CallLowering::handleAssignments().
|
pure virtual |
The specified value has been assigned to a stack location.
Load or store it there, with appropriate extension if necessary.
Referenced by llvm::CallLowering::handleAssignments().
|
pure virtual |
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.
Referenced by llvm::CallLowering::handleAssignments().
unsigned CallLowering::ValueHandler::extendRegister | ( | unsigned | ValReg, |
CCValAssign & | VA | ||
) |
Definition at line 158 of file CallLowering.cpp.
References llvm::CCValAssign::AExt, llvm::CCValAssign::BCvt, llvm::MachineIRBuilder::buildAnyExt(), llvm::MachineIRBuilder::buildSExt(), llvm::MachineIRBuilder::buildZExt(), llvm::CCValAssign::Full, llvm::CCValAssign::getLocInfo(), llvm::CCValAssign::getLocVT(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), llvm_unreachable, MRI, llvm::CCValAssign::SExt, and llvm::CCValAssign::ZExt.
|
pure virtual |
Materialize a VReg containing the address of the specified stack-based object.
This is either based on a FrameIndex or direct SP manipulation, depending on the context. MPO
should be initialized to an appropriate description of the address created.
Referenced by llvm::CallLowering::handleAssignments().
CCAssignFn* llvm::CallLowering::ValueHandler::AssignFn |
Definition at line 111 of file CallLowering.h.
MachineIRBuilder& llvm::CallLowering::ValueHandler::MIRBuilder |
Definition at line 109 of file CallLowering.h.
MachineRegisterInfo& llvm::CallLowering::ValueHandler::MRI |
Definition at line 110 of file CallLowering.h.