LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::CallLowering::ValueAssigner Struct Reference

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"

Inheritance diagram for llvm::CallLowering::ValueAssigner:
Inheritance graph
[legend]

Public Member Functions

 ValueAssigner (bool IsIncoming, CCAssignFn *AssignFn_, CCAssignFn *AssignFnVarArg_=nullptr)
 
virtual ~ValueAssigner ()=default
 
bool isIncomingArgumentHandler () const
 Returns true if the handler is dealing with incoming arguments, i.e.
 
virtual bool assignArg (unsigned ValNo, EVT OrigVT, MVT ValVT, MVT LocVT, CCValAssign::LocInfo LocInfo, const ArgInfo &Info, ISD::ArgFlagsTy Flags, CCState &State)
 Wrap call to (typically tablegenerated CCAssignFn).
 
CCAssignFngetAssignFn (bool IsVarArg) const
 Select the appropriate assignment function depending on whether this is a variadic call.
 

Public Attributes

CCAssignFnAssignFn
 Assignment function to use for a general call.
 
CCAssignFnAssignFnVarArg
 Assignment function to use for a variadic call.
 
uint64_t StackSize = 0
 The size of the currently allocated portion of the stack.
 

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 argument should go, exactly what happens can vary slightly. This class abstracts the differences.

ValueAssigner should not depend on any specific function state, and only determine the types and locations for arguments.

Definition at line 175 of file CallLowering.h.

Constructor & Destructor Documentation

◆ ValueAssigner()

llvm::CallLowering::ValueAssigner::ValueAssigner ( bool  IsIncoming,
CCAssignFn AssignFn_,
CCAssignFn AssignFnVarArg_ = nullptr 
)
inline

Definition at line 176 of file CallLowering.h.

References AssignFn, and AssignFnVarArg.

◆ ~ValueAssigner()

virtual llvm::CallLowering::ValueAssigner::~ValueAssigner ( )
virtualdefault

Member Function Documentation

◆ assignArg()

virtual bool llvm::CallLowering::ValueAssigner::assignArg ( unsigned  ValNo,
EVT  OrigVT,
MVT  ValVT,
MVT  LocVT,
CCValAssign::LocInfo  LocInfo,
const ArgInfo Info,
ISD::ArgFlagsTy  Flags,
CCState State 
)
inlinevirtual

Wrap call to (typically tablegenerated CCAssignFn).

This may be overridden to track additional state information as arguments are assigned or apply target specific hacks around the legacy infrastructure.

Definition at line 199 of file CallLowering.h.

References getAssignFn(), llvm::CCState::getStackSize(), llvm::CCState::isVarArg(), and StackSize.

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

◆ getAssignFn()

CCAssignFn * llvm::CallLowering::ValueAssigner::getAssignFn ( bool  IsVarArg) const
inline

Select the appropriate assignment function depending on whether this is a variadic call.

Definition at line 221 of file CallLowering.h.

References AssignFn, and AssignFnVarArg.

Referenced by assignArg().

◆ isIncomingArgumentHandler()

bool llvm::CallLowering::ValueAssigner::isIncomingArgumentHandler ( ) const
inline

Returns true if the handler is dealing with incoming arguments, i.e.

those that move values from some physical location to vregs.

Definition at line 191 of file CallLowering.h.

Member Data Documentation

◆ AssignFn

CCAssignFn* llvm::CallLowering::ValueAssigner::AssignFn

Assignment function to use for a general call.

Definition at line 210 of file CallLowering.h.

Referenced by getAssignFn(), and ValueAssigner().

◆ AssignFnVarArg

CCAssignFn* llvm::CallLowering::ValueAssigner::AssignFnVarArg

Assignment function to use for a variadic call.

This is usually the same as AssignFn on most targets.

Definition at line 214 of file CallLowering.h.

Referenced by getAssignFn(), and ValueAssigner().

◆ StackSize

uint64_t llvm::CallLowering::ValueAssigner::StackSize = 0

The size of the currently allocated portion of the stack.

Definition at line 217 of file CallLowering.h.

Referenced by assignArg(), llvm::ARMCallLowering::lowerCall(), llvm::M68kCallLowering::lowerCall(), and llvm::AMDGPUCallLowering::lowerFormalArguments().


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