LLVM  8.0.1
Classes | Public Member Functions | List of all members
llvm::MipsCallLowering Class Reference

#include "Target/Mips/MipsCallLowering.h"

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

Classes

class  MipsHandler
 

Public Member Functions

 MipsCallLowering (const MipsTargetLowering &TLI)
 
bool lowerReturn (MachineIRBuilder &MIRBuilder, const Value *Val, ArrayRef< unsigned > VRegs) const override
 This hook must be implemented to lower outgoing return values, described by Val, into the specified virtual registers VRegs. More...
 
bool lowerFormalArguments (MachineIRBuilder &MIRBuilder, const Function &F, ArrayRef< unsigned > VRegs) const override
 This hook must be implemented to lower the incoming (formal) arguments, described by Args, for GlobalISel. More...
 
bool lowerCall (MachineIRBuilder &MIRBuilder, CallingConv::ID CallConv, const MachineOperand &Callee, const ArgInfo &OrigRet, ArrayRef< ArgInfo > OrigArgs) 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
 
bool lowerCall (MachineIRBuilder &MIRBuilder, ImmutableCallSite CS, unsigned ResReg, ArrayRef< unsigned > ArgRegs, std::function< unsigned()> GetCalleeReg) const
 Lower the given call instruction, including argument and return value marshalling. 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...
 
template<typename FuncInfoTy >
void setArgFlags (ArgInfo &Arg, unsigned OpIdx, const DataLayout &DL, const FuncInfoTy &FuncInfo) const
 
bool handleAssignments (MachineIRBuilder &MIRBuilder, ArrayRef< ArgInfo > Args, ValueHandler &Handler) const
 Invoke Handler::assignArg on each of the given Args and then use Callback to move them to the assigned locations. More...
 

Detailed Description

Definition at line 24 of file MipsCallLowering.h.

Constructor & Destructor Documentation

◆ MipsCallLowering()

MipsCallLowering::MipsCallLowering ( const MipsTargetLowering TLI)

Member Function Documentation

◆ lowerCall()

bool MipsCallLowering::lowerCall ( MachineIRBuilder MIRBuilder,
CallingConv::ID  CallConv,
const MachineOperand Callee,
const ArgInfo OrigRet,
ArrayRef< ArgInfo OrigArgs 
) const
overridevirtual

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

CallConv is the calling convention to be used for the call.

Callee is the destination of the call. It should be either a register, globaladdress, or externalsymbol.

ResTy is the type returned by the function

ResReg is the generic virtual register that the returned value should be lowered into.

ArgTys is a list of the types each member of ArgRegs has; used by the target to decide which register/stack slot should be allocated.

ArgRegs is a list of virtual registers containing each argument that needs to be passed.

Returns
true if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 432 of file MipsCallLowering.cpp.

References llvm::MachineInstrBuilder::add(), llvm::MachineInstrBuilder::addDef(), llvm::MachineInstrBuilder::addImm(), llvm::MachineInstrBuilder::addRegMask(), llvm::alignTo(), llvm::CCState::AllocateStack(), llvm::MipsCCState::AnalyzeCallResult(), Arg, llvm::AMDGPU::HSAMD::Kernel::Key::Args, llvm::MachineIRBuilder::buildInstr(), llvm::MachineIRBuilder::buildInstrNoInsert(), llvm::CallingConv::C, llvm::MipsTargetLowering::CCAssignFnForCall(), llvm::MipsTargetLowering::CCAssignFnForReturn(), llvm::SmallVectorImpl< T >::clear(), llvm::SmallVectorImpl< T >::emplace_back(), F(), llvm::MipsTargetLowering::getABIAlignmentForCallingConv(), llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::Function::getCallingConv(), llvm::TargetRegisterInfo::getCallPreservedMask(), llvm::Function::getContext(), llvm::Module::getDataLayout(), llvm::TargetSubtargetInfo::getFrameLowering(), llvm::MachineFunction::getFunction(), llvm::MachineIRBuilder::getMF(), llvm::MipsTargetLowering::getNumRegistersForCallingConv(), llvm::GlobalValue::getParent(), llvm::MachineFunction::getRegInfo(), llvm::TargetSubtargetInfo::getRegisterInfo(), llvm::MipsTargetLowering::getRegisterTypeForCallingConv(), llvm::TargetFrameLowering::getStackAlignment(), llvm::MachineFunction::getSubtarget(), llvm::MachineOperand::getSymbolName(), llvm::MachineFunction::getTarget(), llvm::TargetLoweringBase::getValueType(), llvm::RegState::Implicit, llvm::MipsISD::Ins, llvm::MachineIRBuilder::insertInstr(), llvm::MachineOperand::isReg(), isSupportedType(), llvm::MachineOperand::isSymbol(), llvm::Function::isVarArg(), llvm::SmallVectorTemplateBase< T >::push_back(), llvm::SmallVectorTemplateBase< T, bool >::push_back(), llvm::CallLowering::ArgInfo::Reg, setLocInfo(), llvm::ISD::ArgFlagsTy::setOrigAlign(), llvm::SystemZISD::TM, TRI, llvm::CallLowering::ArgInfo::Ty, and llvm::TargetLoweringBase::ArgListEntry::Ty.

◆ lowerFormalArguments()

bool MipsCallLowering::lowerFormalArguments ( MachineIRBuilder MIRBuilder,
const Function F,
ArrayRef< unsigned VRegs 
) const
overridevirtual

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

Each argument must end up in the related virtual register described by VRegs. In other words, the first argument should end up in VRegs[0], the second in VRegs[1], and so on. MIRBuilder is set to the proper insertion for the argument lowering.

Returns
True if the lowering succeeded, false otherwise.

Reimplemented from llvm::CallLowering.

Definition at line 379 of file MipsCallLowering.cpp.

References Arg, llvm::Function::arg_empty(), llvm::Function::args(), llvm::MipsTargetLowering::CCAssignFnForCall(), llvm::AttributeList::FirstArgIndex, llvm::MipsABIInfo::GetCalleeAllocdArgSizeInBytes(), llvm::Function::getCallingConv(), llvm::Function::getContext(), llvm::MachineFunction::getDataLayout(), llvm::MachineIRBuilder::getMF(), llvm::MachineFunction::getRegInfo(), llvm::MachineFunction::getTarget(), llvm::Value::getType(), llvm::MipsISD::Ins, isSupportedType(), llvm::Function::isVarArg(), llvm::CallLowering::setArgFlags(), setLocInfo(), and llvm::SystemZISD::TM.

◆ lowerReturn()

bool MipsCallLowering::lowerReturn ( MachineIRBuilder MIRBuilder,
const Value Val,
ArrayRef< unsigned VRegs 
) const
overridevirtual

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