LLVM  13.0.0git
Classes | Public Member Functions | Protected Member Functions | List of all members
llvm::CallLowering Class Reference

#include "llvm/CodeGen/GlobalISel/CallLowering.h"

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

Classes

struct  ArgInfo
 
struct  BaseArgInfo
 
struct  CallLoweringInfo
 
struct  IncomingValueAssigner
 
struct  IncomingValueHandler
 Base class for ValueHandlers used for arguments coming into the current function, or for return values received from a call. More...
 
struct  OutgoingValueAssigner
 
struct  OutgoingValueHandler
 Base class for ValueHandlers used for arguments passed to a function call, or for return values. More...
 
struct  ValueAssigner
 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...
 
struct  ValueHandler
 

Public Member Functions

 CallLowering (const TargetLowering *TLI)
 
virtual ~CallLowering ()=default
 
virtual bool supportSwiftError () const
 
void insertSRetLoads (MachineIRBuilder &MIRBuilder, Type *RetTy, ArrayRef< Register > VRegs, Register DemoteReg, int FI) const
 Load the returned value from the stack into virtual registers in VRegs. More...
 
void insertSRetStores (MachineIRBuilder &MIRBuilder, Type *RetTy, ArrayRef< Register > VRegs, Register DemoteReg) const
 Store the return value given by VRegs into stack starting at the offset specified in DemoteReg. More...
 
void insertSRetIncomingArgument (const Function &F, SmallVectorImpl< ArgInfo > &SplitArgs, Register &DemoteReg, MachineRegisterInfo &MRI, const DataLayout &DL) const
 Insert the hidden sret ArgInfo to the beginning of SplitArgs. More...
 
void insertSRetOutgoingArgument (MachineIRBuilder &MIRBuilder, const CallBase &CB, CallLoweringInfo &Info) const
 For the call-base described by CB, insert the hidden sret ArgInfo to the OrigArgs field of Info. More...
 
bool checkReturn (CCState &CCInfo, SmallVectorImpl< BaseArgInfo > &Outs, CCAssignFn *Fn) const
 
void getReturnInfo (CallingConv::ID CallConv, Type *RetTy, AttributeList Attrs, SmallVectorImpl< BaseArgInfo > &Outs, const DataLayout &DL) const
 Get the type and the ArgFlags for the split components of RetTy as returned by ComputeValueVTs. More...
 
bool checkReturnTypeForCallConv (MachineFunction &MF) const
 Toplevel function to check the return type based on the target calling convention. More...
 
virtual bool canLowerReturn (MachineFunction &MF, CallingConv::ID CallConv, SmallVectorImpl< BaseArgInfo > &Outs, bool IsVarArg) const
 This hook must be implemented to check whether the return values described by Outs can fit into the return registers. More...
 
virtual bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI, Register SwiftErrorVReg) const
 This hook must be implemented to lower outgoing return values, described by Val, into the specified virtual registers VRegs. More...
 
virtual bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI) const
 This hook behaves as the extended lowerReturn function, but for targets that do not support swifterror value promotion. More...
 
virtual bool fallBackToDAGISel (const MachineFunction &MF) const
 
virtual bool lowerFormalArguments (MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< ArrayRef< Register >> VRegs, FunctionLoweringInfo &FLI) const
 This hook must be implemented to lower the incoming (formal) arguments, described by VRegs, for GlobalISel. More...
 
virtual bool lowerCall (MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const
 This hook must be implemented to lower the given call instruction, including argument and return value marshalling. More...
 
bool lowerCall (MachineIRBuilder &MIRBuilder, const CallBase &Call, ArrayRef< Register > ResRegs, ArrayRef< ArrayRef< Register >> ArgRegs, Register SwiftErrorVReg, std::function< unsigned()> GetCalleeReg) const
 Lower the given call instruction, including argument and return value marshalling. More...
 
virtual bool isTypeIsValidForThisReturn (EVT Ty) const
 For targets which support the "returned" parameter attribute, returns true if the given type is a valid one to use with "returned". More...
 

Protected Member Functions

const TargetLoweringgetTLI () const
 Getter for generic TargetLowering class. More...
 
template<class XXXTargetLowering >
const XXXTargetLowering * getTLI () const
 Getter for target specific TargetLowering class. More...
 
ISD::ArgFlagsTy getAttributesForArgIdx (const CallBase &Call, unsigned ArgIdx) const
 
void addArgFlagsFromAttributes (ISD::ArgFlagsTy &Flags, const AttributeList &Attrs, unsigned OpIdx) const
 Adds flags to Flags based off of the attributes in Attrs. More...
 
template<typename FuncInfoTy >
void setArgFlags (ArgInfo &Arg, unsigned OpIdx, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
 
void splitToValueTypes (const ArgInfo &OrigArgInfo, SmallVectorImpl< ArgInfo > &SplitArgs, const DataLayout &DL, CallingConv::ID CallConv) const
 Break OrigArgInfo into one or more pieces the calling convention can process, returned in SplitArgs. More...
 
void unpackRegs (ArrayRef< Register > DstRegs, Register SrcReg, Type *PackedTy, MachineIRBuilder &MIRBuilder) const
 Generate instructions for unpacking SrcReg into the DstRegs corresponding to the aggregate type PackedTy. More...
 
bool determineAssignments (ValueAssigner &Assigner, SmallVectorImpl< ArgInfo > &Args, CCState &CCInfo) const
 Analyze the argument list in Args, using Assigner to populate CCInfo. More...
 
bool determineAndHandleAssignments (ValueHandler &Handler, ValueAssigner &Assigner, SmallVectorImpl< ArgInfo > &Args, MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, bool IsVarArg, Register ThisReturnReg=Register()) const
 Invoke ValueAssigner::assignArg on each of the given Args and then use Handler to move them to the assigned locations. More...
 
bool handleAssignments (ValueHandler &Handler, SmallVectorImpl< ArgInfo > &Args, CCState &CCState, SmallVectorImpl< CCValAssign > &ArgLocs, MachineIRBuilder &MIRBuilder, Register ThisReturnReg=Register()) const
 Use Handler to insert code to handle the argument/return values represented by Args. More...
 
bool parametersInCSRMatch (const MachineRegisterInfo &MRI, const uint32_t *CallerPreservedMask, const SmallVectorImpl< CCValAssign > &ArgLocs, const SmallVectorImpl< ArgInfo > &OutVals) const
 Check whether parameters to a call that are passed in callee saved registers are the same as from the calling function. More...
 
bool resultsCompatible (CallLoweringInfo &Info, MachineFunction &MF, SmallVectorImpl< ArgInfo > &InArgs, ValueAssigner &CalleeAssigner, ValueAssigner &CallerAssigner) const
 

Detailed Description

Definition at line 43 of file CallLowering.h.

Constructor & Destructor Documentation

◆ CallLowering()

llvm::CallLowering::CallLowering ( const TargetLowering TLI)
inline

Definition at line 422 of file CallLowering.h.

◆ ~CallLowering()

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

Member Function Documentation

◆ addArgFlagsFromAttributes()

void CallLowering::addArgFlagsFromAttributes ( ISD::ArgFlagsTy Flags,
const AttributeList Attrs,
unsigned  OpIdx 
) const
protected

Adds flags to Flags based off of the attributes in Attrs.

OpIdx is the index in Attrs to add flags from.

Definition at line 72 of file CallLowering.cpp.

References addFlagsUsingAttrFn(), Attrs, and llvm::Function::hasAttribute().

Referenced by getReturnInfo(), and setArgFlags().

◆ canLowerReturn()

virtual bool llvm::CallLowering::canLowerReturn ( MachineFunction MF,
CallingConv::ID  CallConv,
SmallVectorImpl< BaseArgInfo > &  Outs,
bool  IsVarArg 
) const
inlinevirtual

This hook must be implemented to check whether the return values described by Outs can fit into the return registers.

If false is returned, an sret-demotion is performed.

Definition at line 477 of file CallLowering.h.

Referenced by checkReturnTypeForCallConv(), and lowerCall().

◆ checkReturn()

bool CallLowering::checkReturn ( CCState CCInfo,
SmallVectorImpl< BaseArgInfo > &  Outs,
CCAssignFn Fn 
) const
Returns
True if the return type described by Outs can be returned without performing sret demotion.

Definition at line 868 of file CallLowering.cpp.

References E, llvm::CCValAssign::Full, llvm::MVT::getVT(), and I.

◆ checkReturnTypeForCallConv()

bool CallLowering::checkReturnTypeForCallConv ( MachineFunction MF) const

Toplevel function to check the return type based on the target calling convention.

Returns
True if the return value of MF can be returned without performing sret demotion.

Definition at line 902 of file CallLowering.cpp.

References canLowerReturn(), F, llvm::MachineFunction::getDataLayout(), llvm::MachineFunction::getFunction(), and getReturnInfo().

Referenced by llvm::IRTranslator::runOnMachineFunction().

◆ determineAndHandleAssignments()

bool CallLowering::determineAndHandleAssignments ( ValueHandler Handler,
ValueAssigner Assigner,
SmallVectorImpl< ArgInfo > &  Args,
MachineIRBuilder MIRBuilder,
CallingConv::ID  CallConv,
bool  IsVarArg,
Register  ThisReturnReg = Register() 
) const
protected

◆ determineAssignments()

bool CallLowering::determineAssignments ( ValueAssigner Assigner,
SmallVectorImpl< ArgInfo > &  Args,
CCState CCInfo 
) const
protected

Analyze the argument list in Args, using Assigner to populate CCInfo.

This will determine the types and locations to use for passed or returned values. This may resize fields in Args if the value is split across multiple registers or stack slots.

This is independent of the function state and can be used to determine how a call would pass arguments without needing to change the function. This can be used to check if arguments are suitable for tail call lowering.

Returns
True if everything has succeeded, false otherwise.

Definition at line 536 of file CallLowering.cpp.

References Align, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::CallLowering::ValueAssigner::assignArg(), llvm::CCValAssign::Full, llvm::CCState::getCallingConv(), llvm::CCState::getContext(), llvm::EVT::getEVT(), llvm::TargetLoweringBase::getNumRegistersForCallingConv(), llvm::TargetLoweringBase::getRegisterTypeForCallingConv(), llvm::EVT::getSizeInBits(), llvm::MVT::getSizeInBits(), i, llvm::CallLowering::ValueAssigner::isIncomingArgumentHandler(), llvm::ISD::ArgFlagsTy::isReturned(), llvm::ISD::ArgFlagsTy::setOrigAlign(), llvm::ISD::ArgFlagsTy::setReturned(), llvm::ISD::ArgFlagsTy::setSplit(), and llvm::ISD::ArgFlagsTy::setSplitEnd().

Referenced by llvm::AMDGPUCallLowering::areCalleeOutgoingArgsTailCallable(), determineAndHandleAssignments(), llvm::AMDGPUCallLowering::lowerCall(), llvm::AMDGPUCallLowering::lowerFormalArguments(), llvm::AMDGPUCallLowering::lowerTailCall(), and resultsCompatible().

◆ fallBackToDAGISel()

virtual bool llvm::CallLowering::fallBackToDAGISel ( const MachineFunction MF) const
inlinevirtual

Reimplemented in llvm::AArch64CallLowering.

Definition at line 511 of file CallLowering.h.

Referenced by llvm::IRTranslator::runOnMachineFunction().

◆ getAttributesForArgIdx()

ISD::ArgFlagsTy CallLowering::getAttributesForArgIdx ( const CallBase Call,
unsigned  ArgIdx 
) const
protected
Returns
Flags corresponding to the attributes on the ArgIdx-th parameter of Call.

Definition at line 63 of file CallLowering.cpp.

References addFlagsUsingAttrFn().

Referenced by lowerCall().

◆ getReturnInfo()

void CallLowering::getReturnInfo ( CallingConv::ID  CallConv,
Type RetTy,
AttributeList  Attrs,
SmallVectorImpl< BaseArgInfo > &  Outs,
const DataLayout DL 
) const

◆ getTLI() [1/2]

const TargetLowering* llvm::CallLowering::getTLI ( ) const
inlineprotected

Getter for generic TargetLowering class.

Definition at line 323 of file CallLowering.h.

Referenced by setArgFlags().

◆ getTLI() [2/2]

template<class XXXTargetLowering >
const XXXTargetLowering* llvm::CallLowering::getTLI ( ) const
inlineprotected

Getter for target specific TargetLowering class.

Definition at line 329 of file CallLowering.h.

◆ handleAssignments()

bool CallLowering::handleAssignments ( ValueHandler Handler,
SmallVectorImpl< ArgInfo > &  Args,
CCState CCState,
SmallVectorImpl< CCValAssign > &  ArgLocs,
MachineIRBuilder MIRBuilder,
Register  ThisReturnReg = Register() 
) const
protected

Use Handler to insert code to handle the argument/return values represented by Args.

It's expected determineAssignments previously processed these arguments to populate CCState and ArgLocs.

Definition at line 607 of file CallLowering.cpp.

References llvm::AMDGPU::HSAMD::Kernel::Key::Args, assert(), llvm::CallLowering::ValueHandler::assignCustomValue(), llvm::CallLowering::ValueHandler::assignValueToAddress(), llvm::CallLowering::ValueHandler::assignValueToReg(), llvm::MachineIRBuilder::buildCopy(), buildCopyFromRegs(), buildCopyToRegs(), llvm::CallLowering::ValueHandler::copyArgumentMemory(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), DL, extendOpFromFlags(), F, llvm::LLT::getAddressSpace(), llvm::ISD::ArgFlagsTy::getByValSize(), llvm::EVT::getEVT(), llvm::MachineFunction::getFunction(), llvm::getLLTForType(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), llvm::CCValAssign::getLocVT(), llvm::MachineIRBuilder::getMF(), llvm::ISD::ArgFlagsTy::getNonZeroByValAlign(), llvm::MachineFunction::getRegInfo(), llvm::CallLowering::ValueHandler::getStackAddress(), llvm::CallLowering::ValueHandler::getStackValueStoreSize(), llvm::MachineRegisterInfo::getType(), llvm::CCValAssign::getValNo(), llvm::CCValAssign::getValVT(), i, llvm::inferAlignFromPtrInfo(), llvm::ISD::ArgFlagsTy::isByVal(), llvm::CallLowering::ValueHandler::isIncomingArgumentHandler(), llvm::CCValAssign::isMemLoc(), isTypeIsValidForThisReturn(), llvm::Register::isValid(), j(), llvm::makeArrayRef(), llvm::max(), MRI, llvm::CCValAssign::needsCustom(), and Offset.

Referenced by determineAndHandleAssignments(), llvm::AMDGPUCallLowering::lowerCall(), llvm::AMDGPUCallLowering::lowerFormalArguments(), and llvm::AMDGPUCallLowering::lowerTailCall().

◆ insertSRetIncomingArgument()

void CallLowering::insertSRetIncomingArgument ( const Function F,
SmallVectorImpl< ArgInfo > &  SplitArgs,
Register DemoteReg,
MachineRegisterInfo MRI,
const DataLayout DL 
) const

Insert the hidden sret ArgInfo to the beginning of SplitArgs.

This function should be called from the target specific lowerFormalArguments when F requires the sret demotion.

Definition at line 826 of file CallLowering.cpp.

References assert(), llvm::ComputeValueVTs(), llvm::MachineRegisterInfo::createGenericVirtualRegister(), DL, F, llvm::CallLowering::BaseArgInfo::Flags, llvm::PointerType::get(), llvm::Type::getContext(), llvm::SmallVectorImpl< T >::insert(), MRI, llvm::LLT::pointer(), llvm::AttributeList::ReturnIndex, and setArgFlags().

Referenced by llvm::AMDGPUCallLowering::lowerFormalArguments().

◆ insertSRetLoads()

void CallLowering::insertSRetLoads ( MachineIRBuilder MIRBuilder,
Type RetTy,
ArrayRef< Register VRegs,
Register  DemoteReg,
int  FI 
) const

◆ insertSRetOutgoingArgument()

void CallLowering::insertSRetOutgoingArgument ( MachineIRBuilder MIRBuilder,
const CallBase CB,
CallLoweringInfo Info 
) const

◆ insertSRetStores()

void CallLowering::insertSRetStores ( MachineIRBuilder MIRBuilder,
Type RetTy,
ArrayRef< Register VRegs,
Register  DemoteReg 
) const

◆ isTypeIsValidForThisReturn()

virtual bool llvm::CallLowering::isTypeIsValidForThisReturn ( EVT  Ty) const
inlinevirtual

For targets which support the "returned" parameter attribute, returns true if the given type is a valid one to use with "returned".

Reimplemented in llvm::AArch64CallLowering.

Definition at line 573 of file CallLowering.h.

Referenced by handleAssignments().

◆ lowerCall() [1/2]

virtual bool llvm::CallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
CallLoweringInfo Info 
) const
inlinevirtual

This hook must be implemented to lower the given call instruction, including argument and return value marshalling.

Returns
true if the lowering succeeded, false otherwise.

Reimplemented in llvm::AMDGPUCallLowering, llvm::MipsCallLowering, llvm::AArch64CallLowering, llvm::ARMCallLowering, llvm::X86CallLowering, llvm::RISCVCallLowering, and llvm::PPCCallLowering.

Definition at line 537 of file CallLowering.h.

Referenced by lowerCall().

◆ lowerCall() [2/2]

bool CallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
const CallBase Call,
ArrayRef< Register ResRegs,
ArrayRef< ArrayRef< Register >>  ArgRegs,
Register  SwiftErrorVReg,
std::function< unsigned()>  GetCalleeReg 
) const

Lower the given call instruction, including argument and return value marshalling.

CI is the call/invoke instruction.

ResRegs are the registers where the call's return value should be stored (or 0 if there is no return value). There will be one register for each non-aggregate type, as returned by computeValueLLTs.

ArgRegs is a list of lists of virtual registers containing each argument that needs to be passed (argument i should be placed in ArgRegs[i]). For each argument, there will be one register for each non-aggregate type, as returned by computeValueLLTs.

SwiftErrorVReg is non-zero if the call has a swifterror inout parameter, and contains the vreg that the swifterror should be copied into after the call.

GetCalleeReg is a callback to materialize a register for the callee if the target determines it cannot jump to the destination based purely on CI. This might be because CI is indirect, or because of the limited range of an immediate jump.

Returns
true if the lowering succeeded, false otherwise.

Definition at line 80 of file CallLowering.cpp.

References Arg, llvm::CallBase::args(), canLowerReturn(), llvm::MachineOperand::CreateGA(), llvm::MachineOperand::CreateReg(), DL, F, llvm::AttributeList::FirstArgIndex, llvm::CallBase::getAttributes(), getAttributesForArgIdx(), llvm::CallBase::getCalledOperand(), llvm::CallBase::getCallingConv(), llvm::MachineIRBuilder::getDataLayout(), llvm::Function::getFnAttribute(), llvm::MachineFunction::getFunction(), llvm::CallBase::getFunctionType(), llvm::Instruction::getMetadata(), llvm::MachineIRBuilder::getMF(), llvm::FunctionType::getNumParams(), getReturnInfo(), llvm::MachineFunction::getTarget(), llvm::Value::getType(), llvm::Attribute::getValueAsString(), i, Info, insertSRetOutgoingArgument(), llvm::isInTailCallPosition(), llvm::CallBase::isMustTailCall(), llvm::CallBase::isTailCall(), llvm::FunctionType::isVarArg(), lowerCall(), NumFixedArgs, llvm::AttributeList::ReturnIndex, setArgFlags(), and llvm::Value::stripPointerCasts().

◆ lowerFormalArguments()

virtual bool llvm::CallLowering::lowerFormalArguments ( MachineIRBuilder MIRBuilder,
const Function F,
ArrayRef< ArrayRef< Register >>  VRegs,
FunctionLoweringInfo FLI 
) const
inlinevirtual

This hook must be implemented to lower the incoming (formal) arguments, described by VRegs, for GlobalISel.

Each argument must end up in the related virtual registers described by VRegs. In other words, the first argument should end up in VRegs[0], the second in VRegs[1], and so on. For each argument, there will be one register for each non-aggregate type, as returned by computeValueLLTs. MIRBuilder is set to the proper insertion for the argument lowering. FLI is required for sret demotion.

Returns
True if the lowering succeeded, false otherwise.

Reimplemented in llvm::MipsCallLowering, llvm::AArch64CallLowering, llvm::ARMCallLowering, llvm::X86CallLowering, llvm::RISCVCallLowering, llvm::PPCCallLowering, and llvm::AMDGPUCallLowering.

Definition at line 525 of file CallLowering.h.

Referenced by llvm::IRTranslator::runOnMachineFunction().

◆ lowerReturn() [1/2]

virtual bool llvm::CallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
ArrayRef< Register VRegs,
FunctionLoweringInfo FLI 
) const
inlinevirtual

This hook behaves as the extended lowerReturn function, but for targets that do not support swifterror value promotion.

Reimplemented in llvm::RISCVCallLowering, llvm::MipsCallLowering, llvm::ARMCallLowering, llvm::X86CallLowering, and llvm::AMDGPUCallLowering.

Definition at line 505 of file CallLowering.h.

◆ lowerReturn() [2/2]

virtual bool llvm::CallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
ArrayRef< Register VRegs,
FunctionLoweringInfo FLI,
Register  SwiftErrorVReg 
) const
inlinevirtual

This hook must be implemented to lower outgoing return values, described by Val, into the specified virtual registers VRegs.

This hook is used by GlobalISel.

FLI is required for sret demotion.

SwiftErrorVReg is non-zero if the function has a swifterror parameter that needs to be implicitly returned.

Returns
True if the lowering succeeds, false otherwise.

Reimplemented in llvm::AArch64CallLowering, and llvm::PPCCallLowering.

Definition at line 493 of file CallLowering.h.

References assert(), and supportSwiftError().

◆ parametersInCSRMatch()

bool CallLowering::parametersInCSRMatch ( const MachineRegisterInfo MRI,
const uint32_t CallerPreservedMask,
const SmallVectorImpl< CCValAssign > &  ArgLocs,
const SmallVectorImpl< ArgInfo > &  OutVals 
) const
protected

Check whether parameters to a call that are passed in callee saved registers are the same as from the calling function.

This needs to be checked for tail call eligibility.

Definition at line 913 of file CallLowering.cpp.

References llvm::MachineOperand::clobbersPhysReg(), llvm::dbgs(), llvm::getDefIgnoringCopies(), llvm::MachineInstr::getOpcode(), llvm::MachineInstr::getOperand(), llvm::MachineOperand::getReg(), i, LLVM_DEBUG, MRI, and llvm::CallLowering::ArgInfo::Regs.

Referenced by llvm::AMDGPUCallLowering::areCalleeOutgoingArgsTailCallable().

◆ resultsCompatible()

bool CallLowering::resultsCompatible ( CallLoweringInfo Info,
MachineFunction MF,
SmallVectorImpl< ArgInfo > &  InArgs,
ValueAssigner CalleeAssigner,
ValueAssigner CallerAssigner 
) const
protected
Returns
True if the calling convention for a callee and its caller pass results in the same way. Typically used for tail call eligibility checks.

Info is the CallLoweringInfo for the call. MF is the MachineFunction for the caller. InArgs contains the results of the call. CalleeAssigner specifies the target's handling of the argument types for the callee. CallerAssigner specifies the target's handling of the argument types for the caller.

Definition at line 965 of file CallLowering.cpp.

References determineAssignments(), llvm::numbers::e, F, llvm::MachineFunction::getFunction(), llvm::CCValAssign::getLocMemOffset(), llvm::CCValAssign::getLocReg(), i, Info, and llvm::CCValAssign::isRegLoc().

Referenced by llvm::AMDGPUCallLowering::doCallerAndCalleePassArgsTheSameWay().

◆ setArgFlags()

template<typename FuncInfoTy >
template void CallLowering::setArgFlags< CallBase > ( ArgInfo Arg,
unsigned  OpIdx,
const DataLayout DL,
const FuncInfoTy &  FuncInfo 
) const
protected

◆ splitToValueTypes()

void CallLowering::splitToValueTypes ( const ArgInfo OrigArgInfo,
SmallVectorImpl< ArgInfo > &  SplitArgs,
const DataLayout DL,
CallingConv::ID  CallConv 
) const
protected

◆ supportSwiftError()

virtual bool llvm::CallLowering::supportSwiftError ( ) const
inlinevirtual
Returns
true if the target is capable of handling swifterror values that have been promoted to a specified register. The extended versions of lowerReturn and lowerCall should be implemented.

Reimplemented in llvm::AArch64CallLowering.

Definition at line 428 of file CallLowering.h.

Referenced by lowerReturn().

◆ unpackRegs()

void CallLowering::unpackRegs ( ArrayRef< Register DstRegs,
Register  SrcReg,
Type PackedTy,
MachineIRBuilder MIRBuilder 
) const
protected

Generate instructions for unpacking SrcReg into the DstRegs corresponding to the aggregate type PackedTy.

Parameters
DstRegsshould contain one virtual register for each base type in PackedTy, as returned by computeValueLLTs.

Definition at line 239 of file CallLowering.cpp.

References assert(), llvm::MachineIRBuilder::buildExtract(), llvm::computeValueLLTs(), DL, llvm::MachineIRBuilder::getDataLayout(), i, and llvm::ArrayRef< T >::size().

Referenced by llvm::AMDGPUCallLowering::lowerFormalArgumentsKernel().


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