LLVM  4.0.0
Public Member Functions | Public Attributes | List of all members
llvm::CallLowering::ValueHandler Struct Referenceabstract

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 <CallLowering.h>

Inheritance diagram for llvm::CallLowering::ValueHandler:
[legend]
Collaboration diagram for llvm::CallLowering::ValueHandler:
[legend]

Public Member Functions

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...
 
unsigned extendRegister (unsigned ValReg, CCValAssign &VA)
 
 ValueHandler (MachineIRBuilder &MIRBuilder, MachineRegisterInfo &MRI)
 
virtual ~ValueHandler ()
 

Public Attributes

MachineIRBuilderMIRBuilder
 
MachineRegisterInfoMRI
 

Detailed Description

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 49 of file CallLowering.h.

Constructor & Destructor Documentation

llvm::CallLowering::ValueHandler::ValueHandler ( MachineIRBuilder MIRBuilder,
MachineRegisterInfo MRI 
)
inline

Definition at line 73 of file CallLowering.h.

virtual llvm::CallLowering::ValueHandler::~ValueHandler ( )
inlinevirtual

Definition at line 76 of file CallLowering.h.

Member Function Documentation

virtual void llvm::CallLowering::ValueHandler::assignValueToAddress ( unsigned  ValVReg,
unsigned  Addr,
uint64_t  Size,
MachinePointerInfo MPO,
CCValAssign VA 
)
pure virtual

The specified value has been assigned to a stack location.

Load or store it there, with appropriate extension if necessary.

Implemented in OutgoingArgHandler, and IncomingArgHandler.

Referenced by llvm::CallLowering::handleAssignments().

virtual void llvm::CallLowering::ValueHandler::assignValueToReg ( unsigned  ValVReg,
unsigned  PhysReg,
CCValAssign VA 
)
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.

Implemented in OutgoingArgHandler, and IncomingArgHandler.

Referenced by llvm::CallLowering::handleAssignments().

unsigned CallLowering::ValueHandler::extendRegister ( unsigned  ValReg,
CCValAssign VA 
)
virtual unsigned llvm::CallLowering::ValueHandler::getStackAddress ( uint64_t  Size,
int64_t  Offset,
MachinePointerInfo MPO 
)
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.

Implemented in OutgoingArgHandler, and IncomingArgHandler.

Referenced by llvm::CallLowering::handleAssignments().

Member Data Documentation

MachineIRBuilder& llvm::CallLowering::ValueHandler::MIRBuilder

Definition at line 78 of file CallLowering.h.

MachineRegisterInfo& llvm::CallLowering::ValueHandler::MRI

Definition at line 79 of file CallLowering.h.

Referenced by extendRegister().


The documentation for this struct was generated from the following files: