LLVM  14.0.0git
Public Member Functions | List of all members
llvm::ARMCallLowering Class Reference

#include "Target/ARM/ARMCallLowering.h"

Inheritance diagram for llvm::ARMCallLowering:
Inheritance graph
[legend]
Collaboration diagram for llvm::ARMCallLowering:
Collaboration graph
[legend]

Public Member Functions

 ARMCallLowering (const ARMTargetLowering &TLI)
 
bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< Register > VRegs, FunctionLoweringInfo &FLI) const override
 This hook behaves as the extended lowerReturn function, but for targets that do not support swifterror value promotion. More...
 
bool lowerFormalArguments (MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< ArrayRef< Register >> VRegs, FunctionLoweringInfo &FLI) const override
 This hook must be implemented to lower the incoming (formal) arguments, described by VRegs, for GlobalISel. More...
 
bool lowerCall (MachineIRBuilder &MIRBuilder, CallLoweringInfo &Info) const override
 This hook must be implemented to lower the given call instruction, including argument and return value marshalling. More...
 
- Public Member Functions inherited from llvm::CallLowering
 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 fallBackToDAGISel (const MachineFunction &MF) const
 
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 enableBigEndian () const
 For targets which want to use big-endian can enable it with enableBigEndian() hook. 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...
 

Additional Inherited Members

- Protected Member Functions inherited from llvm::CallLowering
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, SmallVectorImpl< uint64_t > *Offsets=nullptr) const
 Break OrigArgInfo into one or more pieces the calling convention can process, returned in SplitArgs. 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 31 of file ARMCallLowering.h.

Constructor & Destructor Documentation

◆ ARMCallLowering()

ARMCallLowering::ARMCallLowering ( const ARMTargetLowering TLI)

Definition at line 53 of file ARMCallLowering.cpp.

Member Function Documentation

◆ lowerCall()

bool ARMCallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
CallLoweringInfo Info 
) const
overridevirtual

◆ lowerFormalArguments()

bool ARMCallLowering::lowerFormalArguments ( MachineIRBuilder MIRBuilder,
const Function F,
ArrayRef< ArrayRef< Register >>  VRegs,
FunctionLoweringInfo FLI 
) const
overridevirtual

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 from llvm::CallLowering.

Definition at line 363 of file ARMCallLowering.cpp.

References Arg, llvm::MachineBasicBlock::begin(), llvm::CallLowering::determineAndHandleAssignments(), DL, llvm::MachineBasicBlock::empty(), F, llvm::AttributeList::FirstArgIndex, llvm::MachineFunction::getDataLayout(), llvm::MachineIRBuilder::getMBB(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), isSupportedType(), MBB, llvm::CallLowering::setArgFlags(), llvm::MachineIRBuilder::setInstr(), llvm::MachineIRBuilder::setMBB(), and llvm::CallLowering::splitToValueTypes().

◆ lowerReturn()

bool ARMCallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
ArrayRef< Register VRegs,
FunctionLoweringInfo FLI 
) const
overridevirtual

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